|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.adactus.mpeg21.xml.schema.ErrorHandlerImpl com.adactus.mpeg21.xml.schema.DocumentSource com.adactus.mpeg21.xml.schema.ValidatingDocumentSource
public class ValidatingDocumentSource
Create a w3c XML Document object using validation. Pattern:
1. DocumentBuilderFactory
using a SchemaFactory
2. DocumentBuilder
3. Document
Any errors and warnings are printed during the parsing by using the ErrorHandler
interface.
Constructor Summary | |
---|---|
ValidatingDocumentSource(boolean xincludeAware)
Create a validating document source. |
Method Summary | |
---|---|
org.w3c.dom.ls.LSResourceResolver |
getResourceResolver()
|
javax.xml.validation.Schema |
getSchema()
Get the compiled schema |
void |
initFactory()
Initialize DocumentBuilderFactory . |
void |
setResourceResolver(org.w3c.dom.ls.LSResourceResolver resourceResolver)
|
void |
setSchema(java.lang.String[] urls)
|
void |
setSchema(java.net.URL[] schema)
|
void |
setSources(javax.xml.transform.Source[] sources)
|
void |
validate(byte[] document,
java.lang.String encoding)
|
void |
validate(java.io.InputStream document,
java.lang.String encoding)
|
void |
validate(javax.xml.transform.Source source)
Validate a document without building a document Usage example: validate(new SAXSource(new InputSource(inputstream))); |
void |
validate(java.lang.String document)
|
Methods inherited from class com.adactus.mpeg21.xml.schema.DocumentSource |
---|
getDocument, getDocument, getDocument, getDocument, getEntityResolver, initBuilder, newDocument, newInstance, recycle, setEntityResolver |
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 ValidatingDocumentSource(boolean xincludeAware)
xincludeAware
- XInclude enabledMethod Detail |
---|
public org.w3c.dom.ls.LSResourceResolver getResourceResolver()
public javax.xml.validation.Schema getSchema()
public void initFactory() throws java.lang.Exception
DocumentSource
DocumentBuilderFactory
.
initFactory
in class DocumentSource
java.lang.Exception
public void setResourceResolver(org.w3c.dom.ls.LSResourceResolver resourceResolver)
public void setSchema(java.lang.String[] urls) throws java.io.IOException
java.io.IOException
public void setSchema(java.net.URL[] schema) throws java.io.IOException
java.io.IOException
public void setSources(javax.xml.transform.Source[] sources)
public void validate(byte[] document, java.lang.String encoding) throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXException
java.io.IOException
public void validate(java.io.InputStream document, java.lang.String encoding) throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXException
java.io.IOException
public void validate(javax.xml.transform.Source source) throws org.xml.sax.SAXException, java.io.IOException
source
-
org.xml.sax.SAXException
java.io.IOException
public void validate(java.lang.String document) throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |