Class CatalogUtils


  • public class CatalogUtils
    extends Object
    Utility functions for working with XML catalog documents
    • Constructor Detail

      • CatalogUtils

        public CatalogUtils()
    • Method Detail

      • getCatalogEntries

        public static List<CatalogEntry> getCatalogEntries​(DOMDocument document)
        Returns a list of all the catalog entries in the given document, or an empty list if the document is not a catalog.
        Returns:
        a list of all the catalog entries in the given document, or an empty list if the document is not a catalog.
      • getCatalogEntryURI

        public static DOMAttr getCatalogEntryURI​(DOMElement element)
        Returns the uri attribute node of the given catalog entry or null if there is no uri attribute
        Parameters:
        element - The catalog entry to get the uri attribute of
        Returns:
        the uri attribute node of the given catalog entry or null if there is no uri attribute
      • getCatalogEntryCatalog

        public static DOMAttr getCatalogEntryCatalog​(DOMElement element)
        Returns the catalog attribute node of the given catalog entry or null if there is no catalog attribute
        Parameters:
        element - The catalog entry to get the catalog attribute of
        Returns:
        the catalog attribute node of the given catalog entry or null if there is no catalog attribute
      • getResolvedLocation

        public static String getResolvedLocation​(DOMDocument document,
                                                 CatalogEntry catalogEntry)
        Returns the expanded system location
        Parameters:
        document - the xml document
        catalogEntry - the catalog entry
        Returns:
        the expanded system location