Return true if the systemId denotes an absolute URI .

@param systemId The systemId string
@return true if the systemId is an an absolute URI
197507
public static boolean isAbsoluteURI(String systemId)
  {
     /** http://www.ietf.org/rfc/rfc2396.txt
      *   Authors should be aware that a path segment which contains a colon
      * character cannot be used as the first segment of a relative URI path
      * (e.g., "this:that"), because it would be mistaken for a scheme name.
     **/
     /** 
      * %REVIEW% Can we assume here that systemId is a valid URI?
      * It looks like we cannot ( See discussion of this common problem in 
      * Bugzilla Bug 22777 ). 
     **/
     //"fix" for Bugzilla Bug 22777
    if(isWindowsAbsolutePath(systemId)){
        return false;
     }
    
    final int fragmentIndex = systemId.indexOf('#');
    final int queryIndex = systemId.indexOf('?');
    final int slashIndex = systemId.indexOf('/');
    final int colonIndex = systemId.indexOf(':');
    
    //finding substring  before '#', '?', and '/' 
    int index = systemId.length() -1;
    if(fragmentIndex > 0) 
        index = fragmentIndex;
    if((queryIndex > 0) && (queryIndex <index)) 
        index = queryIndex;
    if((slashIndex > 0) && (slashIndex <index))
        index = slashIndex; 
    // return true if there is ':' before '#', '?', and '/'
    return ((colonIndex >0) && (colonIndex<index));
    
  }
534109
@Override
    public boolean isCollectionURI(final AtomRequest areq) {
        LOG.debug("isCollectionURI");
        // workspace/collection-plural
        // if length is 2 and points to a valid collection then YES
        final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/");
        if (pathInfo.length == 2) {
            final String handle = pathInfo[0];
            final String collection = pathInfo[1];
            if (service.findCollectionByHandle(handle, collection) != null) {
                return true;
            }
        }
        return false;

    }
94990
public static boolean isAbsolutePath(String uri) {
        boolean absolute = false;
        if (uri != null) {
            if (uri.indexOf(":/") != -1) {
                absolute = true;
            } else if (uri.indexOf(":\\") != -1) {
                absolute = true;
            }
        }

        return absolute;
    }
90617
private boolean isNewId(String id) {

        if (id.contains("#")) {
            id = id.substring(0, id.indexOf("#"));
        }
        return !CmsUUID.isValidUUID(id);
    }
708540
private static URI buildDefaultURI(final String userId) {
        // Construct the default URI for the user ID that is not a URI.
        String userAgentBaseUri = System.getProperty(USER_AGENT_BASE_URI_PROPERTY);
        if (isNullOrEmpty(userAgentBaseUri)) {
            // use the default local user agent base uri
            userAgentBaseUri = DEFAULT_USER_AGENT_BASE_URI;
        }

        final String userAgentUri = userAgentBaseUri + userId;

        LOGGER.trace("Default URI is created for user {}: {}", userId, userAgentUri);
        return URI.create(userAgentUri);
    }
598315
public boolean considerAsAddDirective(String suri) {
        String u = suri.trim();
        if(u.length()==0) {
            // empty string: consider a mistake
            return false; 
        }
        if(u.indexOf("(")>0) {
            // formal SURT prefix; toLowerCase just in case
            add(u.toLowerCase());
        } else {
            // hostname/normal form URI from which 
            // to deduce SURT prefix
            addFromPlain(u);
        }
        return true;
       
    }
354930
@Override
    public boolean isCategoriesURI(final AtomRequest areq) {
        LOG.debug("isCategoriesDocumentURI");
        final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/");
        if (pathInfo.length == 3 && "categories".equals(pathInfo[2])) {
            return true;
        }
        return false;
    }
1027471
protected boolean isForbidden(URI uri)
    {
        String scheme = uri.getScheme();
        String host = uri.getHost();
        int port = uri.getPort();
        return isForbidden(scheme, host, port, true);
    }
712662
public URI attachmentUri(String documentId, String attachmentId) {
        String base_uri = String.format(
                "%s/%s/%s",
                this.rootUriString,
                this.encodeId(documentId),
                this.encodeId(attachmentId)
        );
        return uriFor(base_uri);
    }
718706
public boolean remoteExists(URI uri) throws IOException {
    try {
      FileSystems.matchSingleFileSpec(uri.toString());
      return true;
    } catch (FileNotFoundException e) {
      return false;
    }
  }
432243
@Nullable
    public synchronized URI getSystemType() throws IllegalArgumentException {
        URI result = null;
        for (final URI type : get(RDF.TYPE, URI.class)) {
            if (type.getNamespace().equals(KS.NAMESPACE)) {
                Preconditions.checkArgument(result == null, "Multiple system types: " + result
                        + ", " + type);
                result = type;
            }
        }
        return result;
    }
1303242
public boolean contains(String id) {
        Misc.checkNotNullOrEmpty(id, "id");
        try {
            getDocumentRev(id);
            return true;
        } catch (Exception e) {
            return false;
        }
    }
1265817
public boolean contains(int partitionId) {
        if (lowerID < upperID) { //"Proper" id range
            return lowerID <= partitionId && upperID > partitionId;
        } else { //Id range "wraps around"
            return (lowerID <= partitionId && partitionId < idUpperBound) ||
                    (upperID > partitionId && partitionId >= 0);
        }
    }
71543
public static boolean isGroupAccessId(String accessId) {
        return isAccessId(accessId) && accessId.startsWith(AccessIdUtil.TYPE_GROUP + AccessIdUtil.TYPE_SEPARATOR);
    }
186253
private static URL clearUserInfo(String systemID) {
    try {
      URL url = new URL(systemID);
      // Do not clear user info on "file" urls 'cause on Windows the drive will
      // have no ":"...
      if (!"file".equals(url.getProtocol())) {
        return attachUserInfo(url, null, null);
      }
      return url;
    } catch (MalformedURLException e) {
      return null;
    }
  }
630218
public static boolean isLocalResourceUri(@Nullable Uri uri) {
    final String scheme = getSchemeOrNull(uri);
    return LOCAL_RESOURCE_SCHEME.equals(scheme);
  }
1227499
@Trivial
    public static boolean pathIsAbsolute(String normalizedPath) {
        // Absolute path with leading /
        if (normalizedPath.length() > 0 && normalizedPath.charAt(0) == '/')
            return true;

        // Absolute path with symbolic
        if (isSymbol(normalizedPath))
            return true;

        if (normalizedPath.contains(":")) {
            // Absolute windows path with leading c:/
            if (normalizedPath.length() > 3 && normalizedPath.charAt(1) == ':' && normalizedPath.charAt(2) == '/')
                return true;

            // Absolute path with scheme, e.g. file://whatever
            Matcher m = ABSOLUTE_URI.matcher(normalizedPath);
            if (m.matches())
                return true;
        }

        return false;
    }