Package org.cip4.lib.xprinttalk.xml
Class PrintTalkParser
- java.lang.Object
-
- org.cip4.lib.xjdf.xml.internal.AbstractXmlParser<PrintTalk>
-
- org.cip4.lib.xprinttalk.xml.PrintTalkParser
-
public class PrintTalkParser extends org.cip4.lib.xjdf.xml.internal.AbstractXmlParser<PrintTalk>
Parsing logic for building a XML Document from PrintTalk DOM-Tree and the way around.
-
-
Constructor Summary
Constructors Constructor Description PrintTalkParser()Private default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.cip4.lib.xjdf.xml.internal.AbstractXmlValidatorcreateValidator()protected com.sun.xml.bind.marshaller.NamespacePrefixMappergetNamespacePrefixMapper()Returns a new specific NamespacePrefixMapper implementation.protected java.lang.StringgetXmlHeader()Returns the XML Header for marshaling.byte[]parsePrintTalk(PrintTalk printTalk)Parse a PrintTalk Object Tree to a byte array.byte[]parsePrintTalk(PrintTalk printTalk, boolean skipValidation)Parse a PrintTalk Object Tree to a byte array.voidparsePrintTalk(PrintTalk printTalk, java.io.OutputStream os)Parse a PrintTalk Object Tree to a binary output stream.voidparsePrintTalk(PrintTalk printTalk, java.io.OutputStream os, boolean skipValidation)Parse a PrintTalk Object Tree to a binary output stream.
-
-
-
Method Detail
-
parsePrintTalk
public final void parsePrintTalk(PrintTalk printTalk, java.io.OutputStream os) throws javax.xml.parsers.ParserConfigurationException, javax.xml.bind.JAXBException, org.xml.sax.SAXException, java.io.IOException
Parse a PrintTalk Object Tree to a binary output stream.- Parameters:
printTalk- PrintTalk Object Tree for parsing.os- Target OutputStream where PrintTalk Document is being parsed.- Throws:
javax.xml.parsers.ParserConfigurationException- Is thrown in case a serious configuration error occurs.javax.xml.bind.JAXBException- Is thrown in case any error while un-/marshalling occurs.org.xml.sax.SAXException- Is thrown in case parsing an xml document fails.java.io.IOException- Is thrown in case any IO error occurs.
-
parsePrintTalk
public final void parsePrintTalk(PrintTalk printTalk, java.io.OutputStream os, boolean skipValidation) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, javax.xml.bind.JAXBException
Parse a PrintTalk Object Tree to a binary output stream.- Parameters:
printTalk- PrintTalk Object Tree for parsing.os- Target OutputStream where PrintTalk Document is being parsed.skipValidation- Indicates whether or not validation has to be skipped.- Throws:
javax.xml.parsers.ParserConfigurationException- Is thrown in case a serious configuration error occurs.javax.xml.bind.JAXBException- Is thrown in case any error while un-/marshalling occurs.org.xml.sax.SAXException- Is thrown in case parsing an xml document fails.java.io.IOException- Is thrown in case any IO error occurs.
-
parsePrintTalk
public final byte[] parsePrintTalk(PrintTalk printTalk) throws javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException, javax.xml.bind.JAXBException
Parse a PrintTalk Object Tree to a byte array.- Parameters:
printTalk- PrintTalk Object Tree for parsing.- Returns:
- PrintTalk as byte array.
- Throws:
javax.xml.parsers.ParserConfigurationException- Is thrown in case a serious configuration error occurs.javax.xml.bind.JAXBException- Is thrown in case any error while un-/marshalling occurs.org.xml.sax.SAXException- Is thrown in case parsing an xml document fails.java.io.IOException- Is thrown in case any IO error occurs.
-
parsePrintTalk
public final byte[] parsePrintTalk(PrintTalk printTalk, boolean skipValidation) throws javax.xml.parsers.ParserConfigurationException, javax.xml.bind.JAXBException, org.xml.sax.SAXException, java.io.IOException
Parse a PrintTalk Object Tree to a byte array.- Parameters:
printTalk- PrintTalk Object Tree for parsing.skipValidation- Skip validation.- Returns:
- PrintTalk as byte array.
- Throws:
javax.xml.parsers.ParserConfigurationException- Is thrown in case a serious configuration error occurs.javax.xml.bind.JAXBException- Is thrown in case any error while un-/marshalling occurs.org.xml.sax.SAXException- Is thrown in case parsing an xml document fails.java.io.IOException- Is thrown in case any IO error occurs.
-
getNamespacePrefixMapper
protected final com.sun.xml.bind.marshaller.NamespacePrefixMapper getNamespacePrefixMapper()
Returns a new specific NamespacePrefixMapper implementation.- Specified by:
getNamespacePrefixMapperin classorg.cip4.lib.xjdf.xml.internal.AbstractXmlParser<PrintTalk>- Returns:
- New specific NamespacePrefixMapper implementation.
-
getXmlHeader
protected final java.lang.String getXmlHeader()
Returns the XML Header for marshaling.- Specified by:
getXmlHeaderin classorg.cip4.lib.xjdf.xml.internal.AbstractXmlParser<PrintTalk>- Returns:
- XML Header as String
-
createValidator
protected final org.cip4.lib.xjdf.xml.internal.AbstractXmlValidator createValidator()
- Specified by:
createValidatorin classorg.cip4.lib.xjdf.xml.internal.AbstractXmlParser<PrintTalk>
-
-