org.clazzes.util.xml
Class ClasspathLSInput

java.lang.Object
  extended by org.clazzes.util.xml.ClasspathLSInput
All Implemented Interfaces:
org.w3c.dom.ls.LSInput

public class ClasspathLSInput
extends java.lang.Object
implements org.w3c.dom.ls.LSInput

This implementation of LSInput represents an XML input source for classpath-resident schema or DTD descriptions, which are emitted by a handcrafted instance of LSResourceResolver.

Author:
wglas

Constructor Summary
ClasspathLSInput(java.lang.ClassLoader classLoader, java.lang.String resourcePath, java.lang.String publicId, java.lang.String systemId, java.lang.String baseURI)
          Construct a classpath-resident LSInput instance.
ClasspathLSInput(java.lang.ClassLoader classLoader, java.lang.String resourcePath, java.lang.String publicId, java.lang.String systemId, java.lang.String baseURI, boolean certifiedText)
          Construct a classpath-resident LSInput instance.
ClasspathLSInput(java.lang.String resourcePath, java.lang.String publicId, java.lang.String systemId, java.lang.String baseURI)
          Construct a classpath-resident LSInput instance.
ClasspathLSInput(java.lang.String resourcePath, java.lang.String publicId, java.lang.String systemId, java.lang.String baseURI, boolean certifiedText)
          Construct a classpath-resident LSInput instance.
 
Method Summary
 java.lang.String getBaseURI()
           
 java.io.InputStream getByteStream()
           
 boolean getCertifiedText()
           
 java.io.Reader getCharacterStream()
           
 java.lang.String getEncoding()
           
 java.lang.String getPublicId()
           
 java.lang.String getStringData()
           
 java.lang.String getSystemId()
           
 void setBaseURI(java.lang.String baseURI)
           
 void setByteStream(java.io.InputStream byteStream)
           
 void setCertifiedText(boolean certifiedText)
           
 void setCharacterStream(java.io.Reader characterStream)
           
 void setEncoding(java.lang.String encoding)
           
 void setPublicId(java.lang.String publicId)
           
 void setStringData(java.lang.String stringData)
           
 void setSystemId(java.lang.String systemId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClasspathLSInput

public ClasspathLSInput(java.lang.ClassLoader classLoader,
                        java.lang.String resourcePath,
                        java.lang.String publicId,
                        java.lang.String systemId,
                        java.lang.String baseURI,
                        boolean certifiedText)
Construct a classpath-resident LSInput instance.

Parameters:
classLoader - The class loader from which to retrieve the resource stream.
resourcePath - The path, where the resource is located. Will be passed to ClassLoader.getResourceAsStream(String).
publicId - The XML public ID of the resource.
systemId - The XML system ID of the resource.
baseURI - The XML base URI of the resource.
certifiedText - The XML-1.1 flag, which marks the resource as certified.

ClasspathLSInput

public ClasspathLSInput(java.lang.ClassLoader classLoader,
                        java.lang.String resourcePath,
                        java.lang.String publicId,
                        java.lang.String systemId,
                        java.lang.String baseURI)
Construct a classpath-resident LSInput instance.

Parameters:
classLoader - The class loader from which to retrieve the resource stream.
resourcePath - The path, where the resource is located. Will be passed to ClassLoader.getResourceAsStream(String).
publicId - The XML public ID of the resource.
systemId - The XML system ID of the resource.
baseURI - The XML base URI of the resource.

ClasspathLSInput

public ClasspathLSInput(java.lang.String resourcePath,
                        java.lang.String publicId,
                        java.lang.String systemId,
                        java.lang.String baseURI,
                        boolean certifiedText)
Construct a classpath-resident LSInput instance. This constructor loads from the class loader of the ClasspathLSInput class itself.

Parameters:
resourcePath - The path, where the resource is located. Will be passed to ClassLoader.getResourceAsStream(String).
publicId - The XML public ID of the resource.
systemId - The XML system ID of the resource.
baseURI - The XML base URI of the resource.
certifiedText - The XML-1.1 flag, which marks the resource as certified.

ClasspathLSInput

public ClasspathLSInput(java.lang.String resourcePath,
                        java.lang.String publicId,
                        java.lang.String systemId,
                        java.lang.String baseURI)
Construct a classpath-resident LSInput instance. This constructor loads from the class loader of the ClasspathLSInput class itself.

Parameters:
resourcePath - The path, where the resource is located. Will be passed to ClassLoader.getResourceAsStream(String).
publicId - The XML public ID of the resource.
systemId - The XML system ID of the resource.
baseURI - The XML base URI of the resource.
Method Detail

getBaseURI

public java.lang.String getBaseURI()
Specified by:
getBaseURI in interface org.w3c.dom.ls.LSInput

getByteStream

public java.io.InputStream getByteStream()
Specified by:
getByteStream in interface org.w3c.dom.ls.LSInput

getCertifiedText

public boolean getCertifiedText()
Specified by:
getCertifiedText in interface org.w3c.dom.ls.LSInput

getCharacterStream

public java.io.Reader getCharacterStream()
Specified by:
getCharacterStream in interface org.w3c.dom.ls.LSInput

getEncoding

public java.lang.String getEncoding()
Specified by:
getEncoding in interface org.w3c.dom.ls.LSInput

getPublicId

public java.lang.String getPublicId()
Specified by:
getPublicId in interface org.w3c.dom.ls.LSInput

getStringData

public java.lang.String getStringData()
Specified by:
getStringData in interface org.w3c.dom.ls.LSInput

getSystemId

public java.lang.String getSystemId()
Specified by:
getSystemId in interface org.w3c.dom.ls.LSInput

setBaseURI

public void setBaseURI(java.lang.String baseURI)
Specified by:
setBaseURI in interface org.w3c.dom.ls.LSInput

setByteStream

public void setByteStream(java.io.InputStream byteStream)
Specified by:
setByteStream in interface org.w3c.dom.ls.LSInput

setCertifiedText

public void setCertifiedText(boolean certifiedText)
Specified by:
setCertifiedText in interface org.w3c.dom.ls.LSInput

setCharacterStream

public void setCharacterStream(java.io.Reader characterStream)
Specified by:
setCharacterStream in interface org.w3c.dom.ls.LSInput

setEncoding

public void setEncoding(java.lang.String encoding)
Specified by:
setEncoding in interface org.w3c.dom.ls.LSInput

setPublicId

public void setPublicId(java.lang.String publicId)
Specified by:
setPublicId in interface org.w3c.dom.ls.LSInput

setStringData

public void setStringData(java.lang.String stringData)
Specified by:
setStringData in interface org.w3c.dom.ls.LSInput

setSystemId

public void setSystemId(java.lang.String systemId)
Specified by:
setSystemId in interface org.w3c.dom.ls.LSInput


Copyright © 2010. All Rights Reserved.