public class PrintTalkNavigator
extends org.cip4.lib.xjdf.xml.internal.XmlNavigator
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BUSINESS_ID
XPath to attribute 'BusinessID' of PurchaseOrder Node in PrintTalk Document.
|
static java.lang.String |
CURRENCY
XPath to attribute 'Currency' of PurchaseOrder Node in PrintTalk Document.
|
static java.lang.String |
TIMESTAMP
XPath to attribute 'TimeStamp' in PrintTalk Document.
|
static java.lang.String |
XJDF
XPath to embedded XJDF Document in PrintTalk Document.
|
| Constructor and Description |
|---|
PrintTalkNavigator(byte[] xPrintTalkBytes)
Custom constructor.
|
PrintTalkNavigator(byte[] xPrintTalkBytes,
boolean namespaceAware)
Custom constructor.
|
PrintTalkNavigator(java.io.File ptkFile)
Custom constructor.
|
PrintTalkNavigator(java.io.File ptkFile,
boolean namespaceAware)
Custom constructor.
|
PrintTalkNavigator(java.io.InputStream xPrintTalkStream)
Custom constructor.
|
PrintTalkNavigator(java.io.InputStream xPrintTalkStream,
boolean namespaceAware)
Custom constructor.
|
PrintTalkNavigator(java.lang.String ptkPath)
Custom constructor.
|
PrintTalkNavigator(java.lang.String ptkPath,
boolean namespaceAware)
Custom constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
extractNode(java.lang.String xPath)
Evaluates an XPath expression on PrintTalk Document and returns a parsed Node object as result.
|
byte[] |
getPtkBytes()
Returns the PrintTalk Document as Byte Array.
|
java.io.InputStream |
getPtkStream()
Returns the PrintTalk Document as Stream.
|
java.lang.String |
readXJdfAttribute(java.lang.String xPathXJdf)
Read attribute from embedded XJdf Document in PrintTalk.
|
void |
replaceNode(java.lang.String xPath,
java.lang.Object replacement)
Replace a node in PrintTalk Document located by the XPath expression.
|
addNamespace, evaluate, evaluateBoolean, evaluateDouble, evaluateInt, evaluateLong, evaluateNode, evaluateNodeList, evaluateString, extractNode, getXmlBytes, getXmlDocument, getXmlStream, readAttribute, readAttribute, removeNode, replaceNode, updateAttribute, updateAttributepublic static final java.lang.String TIMESTAMP
public static final java.lang.String BUSINESS_ID
public static final java.lang.String CURRENCY
public static final java.lang.String XJDF
public PrintTalkNavigator(java.io.InputStream xPrintTalkStream)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
xPrintTalkStream - The PrintTalk Document as Input Stream.javax.xml.parsers.ParserConfigurationException - if a DocumentBuilder cannot be created
which satisfies the configuration requested.org.xml.sax.SAXException - - If any parse errors occur.java.io.IOException - - If any IO errors occur.public PrintTalkNavigator(java.io.InputStream xPrintTalkStream,
boolean namespaceAware)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
xPrintTalkStream - The PrintTalk Document as Input Stream.namespaceAware - True if navigator should be XML Namespace aware.javax.xml.parsers.ParserConfigurationException - if a DocumentBuilder cannot be created
which satisfies the configuration requested.org.xml.sax.SAXException - - If any parse errors occur.java.io.IOException - - If any IO errors occur.public PrintTalkNavigator(byte[] xPrintTalkBytes)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
xPrintTalkBytes - The PrintTalk Document as Byte Array.javax.xml.parsers.ParserConfigurationException - if a DocumentBuilder cannot be created
which satisfies the configuration requested.org.xml.sax.SAXException - - If any parse errors occur.java.io.IOException - - If any IO errors occur.public PrintTalkNavigator(byte[] xPrintTalkBytes,
boolean namespaceAware)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
xPrintTalkBytes - The PrintTalk Document as Byte Array.namespaceAware - True if navigator should be XML Namespace aware.javax.xml.parsers.ParserConfigurationException - if a DocumentBuilder cannot be created
which satisfies the configuration requested.org.xml.sax.SAXException - - If any parse errors occur.java.io.IOException - - If any IO errors occur.public PrintTalkNavigator(java.lang.String ptkPath)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
ptkPath - The path to the PrintTalk Document.javax.xml.parsers.ParserConfigurationException - if a DocumentBuilder cannot be created
which satisfies the configuration requested.org.xml.sax.SAXException - - If any parse errors occur.java.io.IOException - - If any IO errors occur.public PrintTalkNavigator(java.lang.String ptkPath,
boolean namespaceAware)
throws java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
ptkPath - The path to the PrintTalk Document.namespaceAware - True if navigator should be XML Namespace aware.javax.xml.parsers.ParserConfigurationException - if a DocumentBuilder cannot be created
which satisfies the configuration requested.org.xml.sax.SAXException - - If any parse errors occur.java.io.IOException - - If any IO errors occur.public PrintTalkNavigator(java.io.File ptkFile)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
ptkFile - The file of the PrintTalk Document.javax.xml.parsers.ParserConfigurationException - if a DocumentBuilder cannot be created
which satisfies the configuration requested.org.xml.sax.SAXException - - If any parse errors occur.java.io.IOException - - If any IO errors occur.public PrintTalkNavigator(java.io.File ptkFile,
boolean namespaceAware)
throws java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
ptkFile - The file of the PrintTalk Document.namespaceAware - True if navigator should be XML Namespace aware.javax.xml.parsers.ParserConfigurationException - if a DocumentBuilder cannot be created
which satisfies the configuration requested.org.xml.sax.SAXException - - If any parse errors occur.java.io.IOException - - If any IO errors occur.public byte[] getPtkBytes()
throws javax.xml.transform.TransformerException,
java.io.IOException
javax.xml.transform.TransformerException - If this document could not be transformed.java.io.IOException - - If any IO errors occur.public java.io.InputStream getPtkStream()
throws javax.xml.transform.TransformerException,
java.io.IOException
javax.xml.transform.TransformerException - If this document could not be transformed.java.io.IOException - - If any IO errors occur.public java.lang.String readXJdfAttribute(java.lang.String xPathXJdf)
throws javax.xml.xpath.XPathExpressionException
xPathXJdf - XPath expression of XJDF attribute needed.javax.xml.xpath.XPathExpressionException - Is being thrown in case an exception occurs.public java.lang.Object extractNode(java.lang.String xPath)
throws javax.xml.xpath.XPathExpressionException,
javax.xml.bind.JAXBException
xPath - XPath expression to execute to.javax.xml.xpath.XPathExpressionExceptionjavax.xml.bind.JAXBExceptionpublic void replaceNode(java.lang.String xPath,
java.lang.Object replacement)
throws javax.xml.xpath.XPathExpressionException,
javax.xml.bind.JAXBException,
javax.xml.parsers.ParserConfigurationException
xPath - Location of the node to be replaced.replacement - The new node.javax.xml.parsers.ParserConfigurationExceptionjavax.xml.bind.JAXBExceptionjavax.xml.xpath.XPathExpressionException