|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adactus.mpeg21.xml.schema.ErrorHandlerImpl
com.adactus.mpeg21.xml.schema.DocumentSource
public class DocumentSource
Create a w3c XML Document object. Pattern:
1. DocumentBuilderFactory
2. DocumentBuilder
3. Document
Any errors and warnings are printed during the parsing by using the ErrorHandling interface.
This class it not thread safe.
| Constructor Summary | |
|---|---|
DocumentSource()
|
|
DocumentSource(boolean namespaceAware)
Create a non-validating document source. |
|
| Method Summary | |
|---|---|
org.w3c.dom.Document |
getDocument(java.io.InputStream in)
Create document from an InputStream. |
org.w3c.dom.Document |
getDocument(java.io.Reader reader)
Create document from an InputStream. |
org.w3c.dom.Document |
getDocument(java.lang.String urlString)
Create document from a String. |
org.w3c.dom.Document |
getDocument(java.net.URL url)
Create document from an URL. |
org.xml.sax.EntityResolver |
getEntityResolver()
|
void |
initBuilder()
Initialize DocumentBuilder. |
void |
initFactory()
Initialize DocumentBuilderFactory. |
org.w3c.dom.Document |
newDocument()
Create a new, empty Document. |
static DocumentSource |
newInstance()
|
static void |
recycle(DocumentSource ck)
|
void |
setEntityResolver(org.xml.sax.EntityResolver entityResolver)
|
| Methods inherited from class com.adactus.mpeg21.xml.schema.ErrorHandlerImpl |
|---|
error, fatalError, getStatus, reset, warning, wasError, wasFatalError, wasWaring |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DocumentSource()
public DocumentSource(boolean namespaceAware)
namespaceAware - namespace aware enabled or disabled| Method Detail |
|---|
public org.w3c.dom.Document getDocument(java.io.InputStream in)
throws java.lang.Exception
InputStream.
in - the input stream
java.lang.Exception
public org.w3c.dom.Document getDocument(java.io.Reader reader)
throws java.lang.Exception
InputStream.
reader - the reader
java.lang.Exception
public org.w3c.dom.Document getDocument(java.lang.String urlString)
throws java.lang.Exception
String.
urlString - the input url location
java.lang.Exception
public org.w3c.dom.Document getDocument(java.net.URL url)
throws java.lang.Exception
URL.
url - the location of the input
java.lang.Exceptionpublic org.xml.sax.EntityResolver getEntityResolver()
public void initBuilder()
throws java.lang.Exception
DocumentBuilder.
java.lang.Exception
public void initFactory()
throws java.lang.Exception
DocumentBuilderFactory.
java.lang.Exceptionpublic org.w3c.dom.Document newDocument()
Document.
public static DocumentSource newInstance()
public static void recycle(DocumentSource ck)
public void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||