Class XmlSchemaClasspathInputSource

  • All Implemented Interfaces:
    LSInput

    public class XmlSchemaClasspathInputSource
    extends Object
    implements LSInput
    The XmlSchemaClasspathInputSource class provides an implementation of the org.w3c.dom.ls.LSInput interface that allows resources to be retrieved from the classpath.
    Author:
    Marcus Portmann
    • Constructor Detail

      • XmlSchemaClasspathInputSource

        public XmlSchemaClasspathInputSource​(String namespaceURI,
                                             String publicId,
                                             String systemId,
                                             String baseURI,
                                             String classpathName)
        Constructs a new XmlSchemaClasspathInputSource.
        Parameters:
        namespaceURI - the namespace for this input source
        publicId - the public identifier for this input source.
        systemId - the system identifier for this input source
        baseURI - the base URI to be used for resolving a relative systemId to an absolute URI
        classpathName - the name of the resource on the classpath for this input source
    • Method Detail

      • getBaseURI

        public String getBaseURI()
        Returns the base URI to be used for resolving a relative systemId to an absolute URI.
        Specified by:
        getBaseURI in interface LSInput
        Returns:
        the base URI to be used for resolving a relative systemId to an absolute URI
      • getByteStream

        public InputStream getByteStream()
        Returns the InputStream for the input source.
        Specified by:
        getByteStream in interface LSInput
        Returns:
        the InputStream for the input source
      • getCertifiedText

        public boolean getCertifiedText()
        Returns true if the input source is certified or false otherwise.
        Specified by:
        getCertifiedText in interface LSInput
        Returns:
        true if the input source is certified or false otherwise
      • getCharacterStream

        public Reader getCharacterStream()
        Returns the character stream for the input source.
        Specified by:
        getCharacterStream in interface LSInput
        Returns:
        the character stream for the input source
      • getEncoding

        public String getEncoding()
        Returns the character encoding for the input source.
        Specified by:
        getEncoding in interface LSInput
        Returns:
        the character encoding for the input source
      • getNamespaceURI

        public String getNamespaceURI()
        Returns the namespace for this input source.
        Returns:
        the namespace for this input source
      • getPublicId

        public String getPublicId()
        Returns the public identifier for this input source.
        Specified by:
        getPublicId in interface LSInput
        Returns:
        the public identifier for this input source
      • getStringData

        public String getStringData()
        Returns the String data for the input source
        Specified by:
        getStringData in interface LSInput
        Returns:
        the String data for the input source
      • getSystemId

        public String getSystemId()
        Returns the system identifier for this input source.
        Specified by:
        getSystemId in interface LSInput
        Returns:
        the system identifier for this input source
      • setBaseURI

        public void setBaseURI​(String baseURI)
        Set the base URI to be used for resolving a relative systemId to an absolute URI.
        Specified by:
        setBaseURI in interface LSInput
        Parameters:
        baseURI - the base URI to be used for resolving a relative systemId to an absolute URI
      • setByteStream

        public void setByteStream​(InputStream byteStream)
        Set the byte stream for the input source.
        Specified by:
        setByteStream in interface LSInput
        Parameters:
        byteStream - the byte stream for the input source
      • setCertifiedText

        public void setCertifiedText​(boolean certifiedText)
        Set whether the input source is certified.
        Specified by:
        setCertifiedText in interface LSInput
        Parameters:
        certifiedText - true if the input source is certified or false otherwise
      • setCharacterStream

        public void setCharacterStream​(Reader characterStream)
        Set the character stream for the input source
        Specified by:
        setCharacterStream in interface LSInput
        Parameters:
        characterStream - the character stream for the input source
      • setEncoding

        public void setEncoding​(String encoding)
        Set the character encoding for the input source.
        Specified by:
        setEncoding in interface LSInput
        Parameters:
        encoding - the character encoding for the input source
      • setPublicId

        public void setPublicId​(String publicId)
        Set the public identifier for this input source.
        Specified by:
        setPublicId in interface LSInput
        Parameters:
        publicId - the public identifier for this input source
      • setStringData

        public void setStringData​(String stringData)
        Set the String data for the input source.
        Specified by:
        setStringData in interface LSInput
        Parameters:
        stringData - the String data for the input source
      • setSystemId

        public void setSystemId​(String systemId)
        Set the system identifier for this input source.
        Specified by:
        setSystemId in interface LSInput
        Parameters:
        systemId - the system identifier for this input source