Lines Matching defs:systemId

102    * Return true if the systemId denotes an absolute URI .
104 * @param systemId The systemId string
105 * @return true if the systemId is an an absolute URI
107 public static boolean isAbsoluteURI(String systemId)
115 * %REVIEW% Can we assume here that systemId is a valid URI?
120 if(isWindowsAbsolutePath(systemId)){
124 final int fragmentIndex = systemId.indexOf('#');
125 final int queryIndex = systemId.indexOf('?');
126 final int slashIndex = systemId.indexOf('/');
127 final int colonIndex = systemId.indexOf(':');
130 int index = systemId.length() -1;
145 * @param systemId The path string
148 public static boolean isAbsolutePath(String systemId)
150 if(systemId == null)
152 final File file = new File(systemId);
160 * @param systemId The path string
163 private static boolean isWindowsAbsolutePath(String systemId)
165 if(!isAbsolutePath(systemId))
168 if (systemId.length() > 2
169 && systemId.charAt(1) == ':'
170 && Character.isLetter(systemId.charAt(0))
171 && (systemId.charAt(2) == '\\' || systemId.charAt(2) == '/'))
212 * @param systemId A URI string, which may be absolute or relative.
216 public static String getAbsoluteURI(String systemId)
218 String absoluteURI = systemId;
219 if (isAbsoluteURI(systemId))
221 // Only process the systemId if it starts with "file:".
222 if (systemId.startsWith("file:"))
224 String str = systemId.substring(5);
226 // Resolve the absolute path if the systemId starts with "file:///"
234 int secondColonIndex = systemId.indexOf(':', 5);
237 String localPath = systemId.substring(secondColonIndex-1);
240 absoluteURI = systemId.substring(0, secondColonIndex-1) +
244 return systemId;
251 return getAbsoluteURIFromRelative(systemId.substring(5));
257 return systemId;
260 return getAbsoluteURIFromRelative(systemId);