public abstract class AbstractXmlParser<T> extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractXmlParser(JAXBContext jaxbContext)
Custom constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected com.sun.xml.bind.marshaller.NamespacePrefixMapper |
getNamespacePrefixMapper()
Returns a new specific NamespacePrefixMapper implementation.
|
protected String |
getXmlHeader()
Returns the XML Header for marshaling.
|
protected T |
parseBytes(byte[] bytes)
Parse a byte array to a object tree.
|
protected Object |
parseNode(Node w3cNode)
Parse a W3C Node to a XML Node.
|
protected void |
parseNode(Object xmlNode,
Node w3cNode)
Parse an XML Node to a W3C Node
|
protected T |
parseStream(InputStream is)
Parse a binary input stream to a object tree.
|
protected byte[] |
parseXml(T obj,
boolean skipValidation,
Class abstractValidatorClass)
Parse a object tree to a byte array.
|
protected byte[] |
parseXml(T obj,
Class abstractValidatorClass)
Parse a object tree to a byte array.
|
protected void |
parseXml(T obj,
OutputStream os,
boolean skipValidation,
Class abstractValidatorClass)
Parse a object tree to a binary output stream.
|
protected void |
parseXml(T obj,
OutputStream os,
Class abstractValidatorClass)
Parse a object tree to a binary output stream.
|
protected AbstractXmlParser(JAXBContext jaxbContext)
protected Object parseNode(Node w3cNode) throws JAXBException
w3cNode - The W3C Node to be parsed.JAXBExceptionprotected void parseNode(Object xmlNode, Node w3cNode) throws JAXBException
xmlNode - The XML Node to be parsed.w3cNode - The W3C Result node.JAXBExceptionprotected byte[] parseXml(T obj, Class abstractValidatorClass) throws Exception
obj - Object tree for parsing.abstractValidatorClass - Exception - Is thrown in case an exception occurs.protected void parseXml(T obj, OutputStream os, Class abstractValidatorClass) throws Exception
object - Object tree for parsing.os - Target OutputStream where XJdfDocument is being parsed.ValidationException - Is thrown in case XJDF is not valid and validation process is not being skipped.Exception - Is thrown in case an exception occurs.protected byte[] parseXml(T obj, boolean skipValidation, Class abstractValidatorClass) throws Exception
obj - Object tree for parsing.abstractValidatorClass - skipValidation - Skip validation.Exception - Is thrown in case an exception occurs.protected void parseXml(T obj, OutputStream os, boolean skipValidation, Class abstractValidatorClass) throws Exception
obj - Object tree object for parsing.os - Target OutputStream where XJdfDocument is being parsed.skipValidation - Indicates whether or not validation has to be skipped.ValidationException - Is thrown in case XJDF is not valid and validation process is not being skipped.Exception - Is thrown in case an exception occurs.protected T parseBytes(byte[] bytes) throws Exception
bytes - Byte Array for parsing.Exception - Is thrown in cas an exception occurs.protected T parseStream(InputStream is) throws Exception
is - Binary xjdf input stream for parsing.Exception - Is thrown in case an exception occurs.protected com.sun.xml.bind.marshaller.NamespacePrefixMapper getNamespacePrefixMapper()
protected String getXmlHeader()
Copyright © 2014. All Rights Reserved.