Class XExtensionParser


  • public class XExtensionParser
    extends java.lang.Object
    Parser for extension definition files.
    Author:
    Christian W. Guenther (christian@deckfour.org)
    • Constructor Detail

      • XExtensionParser

        public XExtensionParser()
    • Method Detail

      • instance

        public static XExtensionParser instance()
        Provides access to the singleton parser.
        Returns:
        The parser.
      • parse

        public XExtension parse​(java.io.File file)
                         throws java.io.IOException,
                                javax.xml.parsers.ParserConfigurationException,
                                org.xml.sax.SAXException
        Parses an extension from a definition file.
        Parameters:
        file - The definition file containing the extension.
        Returns:
        The extension object, as defined in the provided file.
        Throws:
        java.io.IOException
        javax.xml.parsers.ParserConfigurationException
        org.xml.sax.SAXException
      • parse

        public XExtension parse​(java.net.URI uri)
                         throws java.io.IOException,
                                javax.xml.parsers.ParserConfigurationException,
                                org.xml.sax.SAXException
        Parses an extension from a URI.
        Parameters:
        file - The URI which represents the extension definition file.
        Returns:
        The extension object, as defined in the file referenced by the given URI.
        Throws:
        java.io.IOException
        javax.xml.parsers.ParserConfigurationException
        org.xml.sax.SAXException