while (local.hasMoreElements()) { CatalogEntry dpe = (CatalogEntry) local.nextElement(); String dp = dpe.getEntryArg(0); if (dp.equals(partial)) {
/** * Find the URNs for a given system identifier in the current catalog. * * @param systemId The system ID to locate. * * @return A vector of URNs that map to the systemId. */ private Vector resolveLocalSystemReverse(String systemId) { Vector map = new Vector(); String osname = System.getProperty("os.name"); boolean windows = (osname.indexOf("Windows") >= 0); Enumeration en = catalogEntries.elements(); while (en.hasMoreElements()) { CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == SYSTEM && (e.getEntryArg(1).equals(systemId) || (windows && e.getEntryArg(1).equalsIgnoreCase(systemId)))) { map.addElement(e.getEntryArg(0)); } } if (map.size() == 0) { return null; } else { return map; } }
/** * Find the URNs for a given system identifier in the current catalog. * * @param systemId The system ID to locate. * * @return A vector of URNs that map to the systemId. */ private Vector resolveLocalSystemReverse(String systemId) { Vector map = new Vector(); String osname = System.getProperty("os.name"); boolean windows = (osname.indexOf("Windows") >= 0); Enumeration en = catalogEntries.elements(); while (en.hasMoreElements()) { CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == SYSTEM && (e.getEntryArg(1).equals(systemId) || (windows && e.getEntryArg(1).equalsIgnoreCase(systemId)))) { map.addElement(e.getEntryArg(0)); } } if (map.size() == 0) { return null; } else { return map; } }
CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == SYSTEM && (e.getEntryArg(0).equals(systemId) || (windows && e.getEntryArg(0).equalsIgnoreCase(systemId)))) { map.addElement(e.getEntryArg(1));
/** * Find the URNs for a given system identifier in the current catalog. * * @param systemId The system ID to locate. * * @return A vector of URNs that map to the systemId. */ private Vector resolveLocalSystemReverse(String systemId) { Vector map = new Vector(); String osname = System.getProperty("os.name"); boolean windows = (osname.indexOf("Windows") >= 0); Enumeration en = catalogEntries.elements(); while (en.hasMoreElements()) { CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == SYSTEM && (e.getEntryArg(1).equals(systemId) || (windows && e.getEntryArg(1).equalsIgnoreCase(systemId)))) { map.addElement(e.getEntryArg(0)); } } if (map.size() == 0) { return null; } else { return map; } }
CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == SYSTEM && (e.getEntryArg(0).equals(systemId) || (windows && e.getEntryArg(0).equalsIgnoreCase(systemId)))) { map.addElement(e.getEntryArg(1));
String partial = entry.getEntryArg(0); String dp = dpe.getEntryArg(0); if (dp.equals(partial)) {
CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == SYSTEM && (e.getEntryArg(0).equals(systemId) || (windows && e.getEntryArg(0).equalsIgnoreCase(systemId)))) { map.addElement(e.getEntryArg(1));
String partial = entry.getEntryArg(0); String dp = dpe.getEntryArg(0); if (dp.equals(partial)) {
/** * Return the applicable DOCUMENT entry. * * @return The system identifier to use for the doctype. * * @throws MalformedURLException The formal system identifier of a * subordinate catalog cannot be turned into a valid URL. * @throws IOException Error reading subordinate catalog file. */ public String resolveDocument() throws MalformedURLException, IOException { // If there's a DOCUMENT entry, return it catalogManager.debug.message(3, "resolveDocument"); Enumeration en = catalogEntries.elements(); while (en.hasMoreElements()) { CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == DOCUMENT) { return e.getEntryArg(0); } } return resolveSubordinateCatalogs(DOCUMENT, null, null, null); }
CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == RESOLVER) { resolved = resolveExternalSystem(uri, e.getEntryArg(0)); if (resolved != null) { return resolved; String suffix = e.getEntryArg(0); String result = e.getEntryArg(1);
CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == RESOLVER) { resolved = resolveExternalSystem(systemId, e.getEntryArg(0)); if (resolved != null) { return resolved; String suffix = e.getEntryArg(0); String result = e.getEntryArg(1);
CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == RESOLVER) { resolved = resolveExternalSystem(uri, e.getEntryArg(0)); if (resolved != null) { return resolved; String suffix = e.getEntryArg(0); String result = e.getEntryArg(1);
/** * Return the applicable DOCUMENT entry. * * @return The system identifier to use for the doctype. * * @throws MalformedURLException The formal system identifier of a * subordinate catalog cannot be turned into a valid URL. * @throws IOException Error reading subordinate catalog file. */ public String resolveDocument() throws MalformedURLException, IOException { // If there's a DOCUMENT entry, return it catalogManager.debug.message(3, "resolveDocument"); Enumeration en = catalogEntries.elements(); while (en.hasMoreElements()) { CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == DOCUMENT) { return e.getEntryArg(0); } } return resolveSubordinateCatalogs(DOCUMENT, null, null, null); }
if (systemId != null) { resolved = resolveExternalSystem(systemId, e.getEntryArg(0)); if (resolved != null) { return resolved; resolved = resolveExternalPublic(publicId, e.getEntryArg(0)); if (resolved != null) { return resolved;
/** * Cleanup and process a Catalog entry. * * <p>This method processes each Catalog entry, changing mapped * relative system identifiers into absolute ones (based on the current * base URI), and maintaining other information about the current * catalog.</p> * * @param entry The CatalogEntry to process. */ public void addEntry(CatalogEntry entry) { int type = entry.getEntryType(); if (type == URISUFFIX) { String suffix = normalizeURI(entry.getEntryArg(0)); String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1))); entry.setEntryArg(1, fsi); catalogManager.debug.message(4, "URISUFFIX", suffix, fsi); } else if (type == SYSTEMSUFFIX) { String suffix = normalizeURI(entry.getEntryArg(0)); String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1))); entry.setEntryArg(1, fsi); catalogManager.debug.message(4, "SYSTEMSUFFIX", suffix, fsi); } super.addEntry(entry); }
/** * Cleanup and process a Catalog entry. * * <p>This method processes each Catalog entry, changing mapped * relative system identifiers into absolute ones (based on the current * base URI), and maintaining other information about the current * catalog.</p> * * @param entry The CatalogEntry to process. */ public void addEntry(CatalogEntry entry) { int type = entry.getEntryType(); if (type == URISUFFIX) { String suffix = normalizeURI(entry.getEntryArg(0)); String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1))); entry.setEntryArg(1, fsi); catalogManager.debug.message(4, "URISUFFIX", suffix, fsi); } else if (type == SYSTEMSUFFIX) { String suffix = normalizeURI(entry.getEntryArg(0)); String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1))); entry.setEntryArg(1, fsi); catalogManager.debug.message(4, "SYSTEMSUFFIX", suffix, fsi); } super.addEntry(entry); }
final String publicid = PublicId.normalize(entry.getEntryArg(0)); final String systemid = normalizeURI(entry.getEntryArg(1)); final String uri = normalizeURI(entry.getEntryArg(0)); final String altURI = normalizeURI(entry.getEntryArg(1));
/** * Cleanup and process a Catalog entry. * * <p>This method processes each Catalog entry, changing mapped * relative system identifiers into absolute ones (based on the current * base URI), and maintaining other information about the current * catalog.</p> * * @param entry The CatalogEntry to process. */ public void addEntry(CatalogEntry entry) { int type = entry.getEntryType(); if (type == URISUFFIX) { String suffix = normalizeURI(entry.getEntryArg(0)); String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1))); entry.setEntryArg(1, fsi); catalogManager.debug.message(4, "URISUFFIX", suffix, fsi); } else if (type == SYSTEMSUFFIX) { String suffix = normalizeURI(entry.getEntryArg(0)); String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1))); entry.setEntryArg(1, fsi); catalogManager.debug.message(4, "SYSTEMSUFFIX", suffix, fsi); } super.addEntry(entry); }
|| e.getEntryType() == DELEGATE_URI) { Catalog dcat = newCatalog(); dcat.parseCatalog(e.getEntryArg(1));