Class DefaultXmlDocumentInfo

  • All Implemented Interfaces:
    XmlDocumentInfo

    public class DefaultXmlDocumentInfo
    extends java.lang.Object
    implements XmlDocumentInfo
    A data class that holds all relevant information about a XML document to make a decision on what parser to use to interpret the XML content.
    Author:
    Thomas Morgner
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDefaultNameSpace()
      Returns the default-namespace declared on the root-element.
      java.lang.String getPublicDTDId()
      Returns the Public-ID of the Document's DTD (if there's any).
      java.lang.String getRootElement()
      Returns the tag name of the root-level element.
      org.xml.sax.Attributes getRootElementAttributes()  
      java.lang.String getRootElementNameSpace()
      Returns the namespace URI for the root-element of the document.
      java.lang.String getSystemDTDId()
      Returns the System-ID of the document's DTD.
      void setDefaultNameSpace​(java.lang.String defaultNameSpace)
      Defines the default-namespace declared on the root-element.
      void setPublicDTDId​(java.lang.String publicDTDId)
      Defines the Public-ID of the Document's DTD (if there's any).
      void setRootElement​(java.lang.String rootElement)
      Defines the tag name of the root-level element.
      void setRootElementAttributes​(org.xml.sax.Attributes rootElementAttributes)  
      void setRootElementNameSpace​(java.lang.String rootElementNameSpace)
      Defines the namespace URI for the root-element of the document.
      void setSystemDTDId​(java.lang.String systemDTDId)
      Defines the System-ID of the document's DTD.
      java.lang.String toString()
      Returns a string representation of the document info.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DefaultXmlDocumentInfo

        public DefaultXmlDocumentInfo()
        Default-Constructor.
    • Method Detail

      • getRootElement

        public java.lang.String getRootElement()
        Returns the tag name of the root-level element.
        Specified by:
        getRootElement in interface XmlDocumentInfo
        Returns:
        the root-tag-name.
      • setRootElement

        public void setRootElement​(java.lang.String rootElement)
        Defines the tag name of the root-level element.
        Parameters:
        rootElement - the root-tag-name.
      • getRootElementNameSpace

        public java.lang.String getRootElementNameSpace()
        Returns the namespace URI for the root-element of the document.
        Specified by:
        getRootElementNameSpace in interface XmlDocumentInfo
        Returns:
        the namespace of the root-element.
      • setRootElementNameSpace

        public void setRootElementNameSpace​(java.lang.String rootElementNameSpace)
        Defines the namespace URI for the root-element of the document.
        Parameters:
        rootElementNameSpace - the namespace of the root-element.
      • setRootElementAttributes

        public void setRootElementAttributes​(org.xml.sax.Attributes rootElementAttributes)
      • getPublicDTDId

        public java.lang.String getPublicDTDId()
        Returns the Public-ID of the Document's DTD (if there's any).
        Specified by:
        getPublicDTDId in interface XmlDocumentInfo
        Returns:
        the public id.
      • setPublicDTDId

        public void setPublicDTDId​(java.lang.String publicDTDId)
        Defines the Public-ID of the Document's DTD (if there's any).
        Parameters:
        publicDTDId - the public id.
      • getSystemDTDId

        public java.lang.String getSystemDTDId()
        Returns the System-ID of the document's DTD.
        Specified by:
        getSystemDTDId in interface XmlDocumentInfo
        Returns:
        the system-id.
      • setSystemDTDId

        public void setSystemDTDId​(java.lang.String systemDTDId)
        Defines the System-ID of the document's DTD.
        Parameters:
        systemDTDId - the system-id.
      • toString

        public java.lang.String toString()
        Returns a string representation of the document info. This is for debugging purposes only.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string version of the document info.
      • getDefaultNameSpace

        public java.lang.String getDefaultNameSpace()
        Returns the default-namespace declared on the root-element. It is not guaranteed that this information is filled until a XmlFactoryModule has been selected.
        Specified by:
        getDefaultNameSpace in interface XmlDocumentInfo
        Returns:
        the default-namespace.
      • setDefaultNameSpace

        public void setDefaultNameSpace​(java.lang.String defaultNameSpace)
        Defines the default-namespace declared on the root-element. It is not guaranteed that this information is filled until a XmlFactoryModule has been selected.
        Parameters:
        defaultNameSpace - the default-namespace.