Class XMLCatalog


  • public class XMLCatalog
    extends org.apache.xml.resolver.Catalog
    Class that extends the Catalog class found in the Apache XML-Commons library.
    Author:
    mcayanan
    • Field Summary

      • Fields inherited from class org.apache.xml.resolver.Catalog

        base, BASE, CATALOG, catalogCwd, catalogEntries, catalogFiles, catalogManager, catalogs, default_override, DELEGATE_PUBLIC, DELEGATE_SYSTEM, DELEGATE_URI, DOCTYPE, DOCUMENT, DTDDECL, ENTITY, LINKTYPE, localCatalogFiles, localDelegate, NOTATION, OVERRIDE, PUBLIC, readerArr, readerMap, REWRITE_SYSTEM, REWRITE_URI, SGMLDECL, SYSTEM, SYSTEM_SUFFIX, URI, URI_SUFFIX
    • Constructor Summary

      Constructors 
      Constructor Description
      XMLCatalog()
      Constructs an empty Catalog.
      XMLCatalog​(org.apache.xml.resolver.CatalogManager manager)
      Constructs an empty Catalog with a specific CatalogManager.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void parseCatalogFile​(String fileName)
      Parse a single catalog file, augmenting internal data structures.
      protected String resolveLocalSystem​(String systemId)
      Return the applicable SYSTEM system identifier in this catalog.
      protected String resolveLocalURI​(String uri)
      Return the applicable URI in this catalog.
      • Methods inherited from class org.apache.xml.resolver.Catalog

        addDelegate, addEntry, addReader, copyReaders, encodedByte, fixSlashes, getCatalogManager, getCurrentBase, getDefaultOverride, loadSystemCatalogs, makeAbsolute, newCatalog, normalizeURI, parseAllCatalogs, parseCatalog, parseCatalog, parseCatalog, parsePendingCatalogs, resolveDoctype, resolveDocument, resolveEntity, resolveLocalPublic, resolveNotation, resolvePublic, resolveSubordinateCatalogs, resolveSystem, resolveURI, setCatalogManager, setupReaders, unknownEntry
    • Constructor Detail

      • XMLCatalog

        public XMLCatalog()
        Constructs an empty Catalog.

        The constructor interrogates the relevant system properties using the default (static) CatalogManager and initializes the catalog data structures.

      • XMLCatalog

        public XMLCatalog​(org.apache.xml.resolver.CatalogManager manager)
        Constructs an empty Catalog with a specific CatalogManager.

        The constructor interrogates the relevant system properties using the specified Catalog Manager and initializes the catalog data structures.

    • Method Detail

      • parseCatalogFile

        protected void parseCatalogFile​(String fileName)
                                 throws MalformedURLException,
                                        IOException,
                                        org.apache.xml.resolver.CatalogException
        Parse a single catalog file, augmenting internal data structures.
        Overrides:
        parseCatalogFile in class org.apache.xml.resolver.Catalog
        Parameters:
        fileName - The filename of the catalog file to process
        Throws:
        MalformedURLException - The fileName cannot be turned into a valid URL.
        IOException - Error reading catalog file.
        org.apache.xml.resolver.CatalogException
      • resolveLocalSystem

        protected String resolveLocalSystem​(String systemId)
                                     throws MalformedURLException,
                                            IOException
        Return the applicable SYSTEM system identifier in this catalog.

        If a SYSTEM entry exists in the catalog file for the system ID specified, return the mapped value.

        Overrides:
        resolveLocalSystem in class org.apache.xml.resolver.Catalog
        Parameters:
        systemId - The system ID to locate in the catalog
        Returns:
        The mapped system identifier or null
        Throws:
        MalformedURLException
        IOException
      • resolveLocalURI

        protected String resolveLocalURI​(String uri)
                                  throws MalformedURLException,
                                         IOException
        Return the applicable URI in this catalog.

        If a URI entry exists in the catalog file for the URI specified, return the mapped value.

        Overrides:
        resolveLocalURI in class org.apache.xml.resolver.Catalog
        Parameters:
        uri - The URI to locate in the catalog
        Returns:
        The mapped URI or null
        Throws:
        MalformedURLException
        IOException