public class PrintTalkNavigator
extends org.cip4.lib.xjdf.xml.internal.XmlNavigator
| Modifier and Type | Field and Description |
|---|---|
static String |
BUSINESS_ID
XPath to attribute 'BusinessID' of PurchaseOrder Node in PrintTalk Document.
|
static String |
CURRENCY
XPath to attribute 'Currency' of PurchaseOrder Node in PrintTalk Document.
|
static String |
TIMESTAMP
XPath to attribute 'TimeStamp' in PrintTalk Document.
|
static 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(File ptkFile)
Custom constructor.
|
PrintTalkNavigator(File ptkFile,
boolean namespaceAware)
Custom constructor.
|
PrintTalkNavigator(InputStream xPrintTalkStream)
Custom constructor.
|
PrintTalkNavigator(InputStream xPrintTalkStream,
boolean namespaceAware)
Custom constructor.
|
PrintTalkNavigator(String ptkPath)
Custom constructor.
|
PrintTalkNavigator(String ptkPath,
boolean namespaceAware)
Custom constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
extractNode(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.
|
InputStream |
getPtkStream()
Returns the PrintTalk Document as Stream.
|
String |
readXJdfAttribute(String xPathXJdf)
Read attribute from embedded XJdf Document in PrintTalk.
|
void |
replaceNode(String xPath,
Object replacement)
Replace a node in PrintTalk Document located by the XPath expression.
|
addNamespace, evaluate, evaluateBoolean, evaluateDouble, evaluateInt, evaluateNode, evaluateNodeList, evaluateString, extractNode, getXmlBytes, getXmlDocument, getXmlStream, readAttribute, readAttribute, removeNode, replaceNode, updateAttribute, updateAttributepublic static final String TIMESTAMP
public static final String BUSINESS_ID
public static final String CURRENCY
public static final String XJDF
public PrintTalkNavigator(InputStream xPrintTalkStream) throws Exception
xPrintTalkStream - The PrintTalk Document as Input Stream.Exceptionpublic PrintTalkNavigator(InputStream xPrintTalkStream, boolean namespaceAware) throws Exception
xPrintTalkStream - The PrintTalk Document as Input Stream.namespaceAware - True if navigator should be XML Namespace aware.Exceptionpublic PrintTalkNavigator(byte[] xPrintTalkBytes)
throws Exception
xPrintTalkBytes - The PrintTalk Document as Byte Array.Exceptionpublic PrintTalkNavigator(byte[] xPrintTalkBytes,
boolean namespaceAware)
throws Exception
xPrintTalkBytes - The PrintTalk Document as Byte Array.namespaceAware - True if navigator should be XML Namespace aware.Exceptionpublic PrintTalkNavigator(String ptkPath) throws Exception
ptkPath - The path to the PrintTalk Document.Exceptionpublic PrintTalkNavigator(String ptkPath, boolean namespaceAware) throws Exception
ptkPath - The path to the PrintTalk Document.namespaceAware - True if navigator should be XML Namespace aware.Exceptionpublic PrintTalkNavigator(File ptkFile) throws Exception
ptkPath - The file of the PrintTalk Document.Exceptionpublic byte[] getPtkBytes()
throws Exception
Exception - Is thrown in case an exception occurs.public InputStream getPtkStream() throws Exception
Exception - Is thrown in case an exception occurs.public String readXJdfAttribute(String xPathXJdf) throws XPathExpressionException
xPath - XPath expression of XJDF attribute needed.XPathExpressionException - Is being thrown in case an exception occurs.public Object extractNode(String xPath) throws XPathExpressionException, JAXBException
xPath - XPath expression to execute to.XPathExpressionExceptionJAXBExceptionpublic void replaceNode(String xPath, Object replacement) throws XPathExpressionException, JAXBException, ParserConfigurationException
xPath - Location of the node to be replaced.replacement - The new node.ParserConfigurationExceptionJAXBExceptionXPathExpressionExceptionCopyright © 2014. All Rights Reserved.