/* */ public String resolveURI(String uri) /* */ throws MalformedURLException, IOException /* */ { /* 165 */ String resolved = super.resolveURI(uri); /* 166 */ if (resolved != null) { /* 167 */ return resolved; /* */ } /* */ /* 170 */ Enumeration en = this.catalogEntries.elements(); /* 171 */ while (en.hasMoreElements()) { /* 172 */ CatalogEntry e = (CatalogEntry) en.nextElement(); /* 173 */ if (e.getEntryType() == RESOLVER) { /* 174 */ resolved = resolveExternalSystem(uri, e.getEntryArg(0)); /* 175 */ if (resolved != null) /* 176 */ return resolved; /* */ } /* 178 */ else if (e.getEntryType() == URISUFFIX) { /* 179 */ String suffix = e.getEntryArg(0); /* 180 */ String result = e.getEntryArg(1); /* */ /* 182 */ if ((suffix.length() <= uri.length()) && (uri.substring(uri.length() - suffix.length()).equals(suffix))) /* */ { /* 184 */ return result; /* */ } /* */ } /* */ /* */ } /* */ /* 190 */ return resolveSubordinateCatalogs(Catalog.URI, null, null, uri); /* */ }
/* */ public String resolvePublic(String publicId, String systemId) /* */ throws MalformedURLException, IOException /* */ { /* 284 */ String resolved = super.resolvePublic(publicId, systemId); /* 285 */ if (resolved != null) { /* 286 */ return resolved; /* */ } /* */ /* 289 */ Enumeration en = this.catalogEntries.elements(); /* 290 */ while (en.hasMoreElements()) { /* 291 */ CatalogEntry e = (CatalogEntry) en.nextElement(); /* 292 */ if (e.getEntryType() == RESOLVER) { /* 293 */ if (systemId != null) { /* 294 */ resolved = resolveExternalSystem(systemId, e.getEntryArg(0)); /* */ /* 296 */ if (resolved != null) { /* 297 */ return resolved; /* */ } /* */ } /* 300 */ resolved = resolveExternalPublic(publicId, e.getEntryArg(0)); /* 301 */ if (resolved != null) { /* 302 */ return resolved; /* */ } /* */ } /* */ } /* */ /* 307 */ return resolveSubordinateCatalogs(Catalog.PUBLIC, null, publicId, systemId); /* */ }
/* */ public String resolveSystem(String systemId) /* */ throws MalformedURLException, IOException /* */ { /* 222 */ String resolved = super.resolveSystem(systemId); /* 223 */ if (resolved != null) { /* 224 */ return resolved; /* */ } /* */ /* 227 */ Enumeration en = this.catalogEntries.elements(); /* 228 */ while (en.hasMoreElements()) { /* 229 */ CatalogEntry e = (CatalogEntry) en.nextElement(); /* 230 */ if (e.getEntryType() == RESOLVER) { /* 231 */ resolved = resolveExternalSystem(systemId, e.getEntryArg(0)); /* 232 */ if (resolved != null) /* 233 */ return resolved; /* */ } /* 235 */ else if (e.getEntryType() == SYSTEMSUFFIX) { /* 236 */ String suffix = e.getEntryArg(0); /* 237 */ String result = e.getEntryArg(1); /* */ /* 239 */ if ((suffix.length() <= systemId.length()) && (systemId.substring(systemId.length() - suffix.length()).equals(suffix))) /* */ { /* 241 */ return result; /* */ } /* */ } /* */ } /* */ /* 246 */ return resolveSubordinateCatalogs(Catalog.SYSTEM, null, null, systemId); /* */ }
/* */ private Vector resolveLocalSystemReverse(String systemId) /* */ { /* 555 */ Vector map = new Vector(); /* 556 */ String osname = SecuritySupport.getSystemProperty("os.name"); /* 557 */ boolean windows = osname.indexOf("Windows") >= 0; /* 558 */ Enumeration en = this.catalogEntries.elements(); /* 559 */ while (en.hasMoreElements()) { /* 560 */ CatalogEntry e = (CatalogEntry) en.nextElement(); /* 561 */ if ((e.getEntryType() == SYSTEM) && ((e.getEntryArg(1).equals(systemId)) || ((windows) && (e.getEntryArg(1).equalsIgnoreCase(systemId))))) /* */ { /* 565 */ map.addElement(e.getEntryArg(0)); /* */ } /* */ } /* 568 */ if (map.size() == 0) { /* 569 */ return null; /* */ } /* 571 */ return map; /* */ }
/* */ public void addEntry(CatalogEntry entry) /* */ { /* 121 */ int type = entry.getEntryType(); /* */ /* 123 */ if (type == URISUFFIX) { /* 124 */ String suffix = normalizeURI(entry.getEntryArg(0)); /* 125 */ String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1))); /* */ /* 127 */ entry.setEntryArg(1, fsi); /* */ /* 129 */ this.catalogManager.debug.message(4, "URISUFFIX", suffix, fsi); /* 130 */ } else if (type == SYSTEMSUFFIX) { /* 131 */ String suffix = normalizeURI(entry.getEntryArg(0)); /* 132 */ String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1))); /* */ /* 134 */ entry.setEntryArg(1, fsi); /* */ /* 136 */ this.catalogManager.debug.message(4, "SYSTEMSUFFIX", suffix, fsi); /* */ } /* */ /* 139 */ super.addEntry(entry); /* */ }