Package org.cip4.lib.xjdf.xml
Class XJmfParser
Parsing logic for building a XML Document from XJMF DOM-Tree and the way around.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final AbstractXmlValidatorCreate validator for validating documents.protected final com.sun.xml.bind.marshaller.NamespacePrefixMapperReturns a new specific NamespacePrefixMapper implementation.protected StringReturns the XML Header for marshaling.final byte[]Parse a XJMF Object Tree to a byte array.final byte[]Parse a XJMF Object Tree to a byte array.final voidparseXJmf(XJMF xjmf, OutputStream os) Parse a XJMF Object Tree to a binary output stream.final voidparseXJmf(XJMF xjmf, OutputStream os, boolean skipValidation) Parse a XJMF Object Tree to a binary output stream.Methods inherited from class org.cip4.lib.xjdf.xml.internal.AbstractXmlParser
parseNode, parseNode, parseStream, parseXml, parseXml, parseXml, parseXml
-
Constructor Details
-
XJmfParser
public XJmfParser() throws javax.xml.bind.JAXBExceptionDefault constructor.- Throws:
javax.xml.bind.JAXBException- Thrown in case a JAXBException occurs.
-
-
Method Details
-
parseXJmf
Parse a XJMF Object Tree to a binary output stream.- Parameters:
xjmf- XJMF Object Tree for parsing.os- Target OutputStream where XJMF is being parsed.- Throws:
javax.xml.bind.JAXBException- Is thrown in case any error while un-/marshalling occurs.
-
parseXJmf
public final void parseXJmf(XJMF xjmf, OutputStream os, boolean skipValidation) throws javax.xml.bind.JAXBException Parse a XJMF Object Tree to a binary output stream.- Parameters:
xjmf- XJMF Object Tree for parsing.os- Target OutputStream where XJMF is being parsed.skipValidation- Skip validation.- Throws:
javax.xml.bind.JAXBException
-
parseXJmf
Parse a XJMF Object Tree to a byte array.- Parameters:
xjmf- XJMF Object Tree for parsing.- Returns:
- XJMF as byte array.
- Throws:
IOException- Is thrown in case any IO error occurs.javax.xml.bind.JAXBException
-
parseXJmf
public final byte[] parseXJmf(XJMF xjmf, boolean skipValidation) throws javax.xml.bind.JAXBException, IOException Parse a XJMF Object Tree to a byte array.- Parameters:
xjmf- XJMF Object Tree for parsing.skipValidation- Skip validation.- Returns:
- XJMF as byte array.
- Throws:
javax.xml.bind.JAXBException- Is thrown in case any error while un-/marshalling occurs.IOException- Is thrown in case any IO error occurs.
-
getNamespacePrefixMapper
protected final com.sun.xml.bind.marshaller.NamespacePrefixMapper getNamespacePrefixMapper()Description copied from class:AbstractXmlParserReturns a new specific NamespacePrefixMapper implementation.- Specified by:
getNamespacePrefixMapperin classAbstractXmlParser<XJMF>- Returns:
- New specific NamespacePrefixMapper implementation.
-
getXmlHeader
Description copied from class:AbstractXmlParserReturns the XML Header for marshaling.- Specified by:
getXmlHeaderin classAbstractXmlParser<XJMF>- Returns:
- XML Header as String
-
createValidator
Description copied from class:AbstractXmlParserCreate validator for validating documents.- Specified by:
createValidatorin classAbstractXmlParser<XJMF>- Returns:
- Validator
-