Class XmlSourceFormat

  • All Implemented Interfaces:
    StreamSourceFormat

    public final class XmlSourceFormat
    extends Object
    implements StreamSourceFormat
    The source type representing an XML source. $Id: XmlSourceFormat.java 1839288 2018-08-27 09:48:33Z tv $
    • Constructor Detail

      • XmlSourceFormat

        public XmlSourceFormat()
    • Method Detail

      • parse

        public SourceElement parse​(InputStream xmlStream,
                                   ControllerState controllerState)
                            throws SourceException
        Parses a stream containing xml data and creates a source element hierarchy from it.
        Specified by:
        parse in interface StreamSourceFormat
        Parameters:
        xmlStream - the stream containing the xml data, not null.
        controllerState - the controller state, not null.
        Returns:
        the root element of the created hierarchy.
        Throws:
        SourceException - if an error occurs reading the input stream, parsing the XML data or if the SAX parser is not configured correctly.
      • hashCode

        public int hashCode()
        Returns a hash code of this instance consistent with equals.. As all instances of this class are equal to each other, the hash code is always the same.
        Overrides:
        hashCode in class Object
        Returns:
        1.
      • equals

        public boolean equals​(Object other)
        Checks whether other is equal to this instance. All instances of this class are equal to each other.
        Overrides:
        equals in class Object
        Returns:
        true if other is a XmlSourceType, false otherwise.