/** * Find out how many arguments an entry is required to have. * * @param name The name of the catalog entry type. * @return The number of arguments that entry type is required to have. * @throws InvalidCatalogEntryTypeException if no entry has the * specified name. */ public static int getEntryArgCount(String name) throws CatalogException { return getEntryArgCount(getEntryType(name)); }
/** * Find out how many arguments an entry is required to have. * * @param name The name of the catalog entry type. * @return The number of arguments that entry type is required to have. * @throws InvalidCatalogEntryTypeException if no entry has the * specified name. */ public static int getEntryArgCount(String name) throws CatalogException { return getEntryArgCount(getEntryType(name)); }
/** * Find out how many arguments an entry is required to have. * * @param name The name of the catalog entry type. * @return The number of arguments that entry type is required to have. * @throws InvalidCatalogEntryTypeException if no entry has the * specified name. */ public static int getEntryArgCount(String name) throws CatalogException { return getEntryArgCount(getEntryType(name)); }
/** * 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; } }
while (en.hasMoreElements()) { CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == SYSTEM && (e.getEntryArg(0).equals(systemId) || (windows
while (en.hasMoreElements()) { CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == SYSTEM && (e.getEntryArg(0).equals(systemId) || (windows
/** * 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; } }
while (en.hasMoreElements()) { CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == SYSTEM && (e.getEntryArg(0).equals(systemId) || (windows
/** * 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); }
/** * 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); }
while (en.hasMoreElements()) { CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == DELEGATE_PUBLIC || e.getEntryType() == DELEGATE_SYSTEM || e.getEntryType() == DELEGATE_URI) { Catalog dcat = newCatalog(); dcat.parseCatalog(e.getEntryArg(1));
while (en.hasMoreElements()) { CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == RESOLVER) { resolved = resolveExternalSystem(uri, e.getEntryArg(0)); if (resolved != null) { return resolved; } else if (e.getEntryType() == URISUFFIX) { String suffix = e.getEntryArg(0); String result = e.getEntryArg(1);
while (en.hasMoreElements()) { CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == RESOLVER) { resolved = resolveExternalSystem(systemId, e.getEntryArg(0)); if (resolved != null) { return resolved; } else if (e.getEntryType() == SYSTEMSUFFIX) { String suffix = e.getEntryArg(0); String result = e.getEntryArg(1);
while (en.hasMoreElements()) { CatalogEntry e = (CatalogEntry) en.nextElement(); if (e.getEntryType() == RESOLVER) { resolved = resolveExternalSystem(uri, e.getEntryArg(0)); if (resolved != null) { return resolved; } else if (e.getEntryType() == URISUFFIX) { String suffix = e.getEntryArg(0); String result = e.getEntryArg(1);
int type = CatalogEntry.getEntryType(entryToken); int numArgs = CatalogEntry.getEntryArgCount(type); Vector args = new Vector();
/** * 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); }
public void addEntry(final CatalogEntry entry) { final int type = entry.getEntryType();
/** * 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); }