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, evaluateLong, evaluateNode, evaluateNodeList, evaluateString, extractNode, getXmlBytes, getXmlDocument, getXmlStream, readAttribute, readAttribute, removeNode, replaceNode, updateAttribute, updateAttribute
public 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 ParserConfigurationException, SAXException, IOException
xPrintTalkStream
- The PrintTalk Document as Input Stream.ParserConfigurationException
- if a DocumentBuilder cannot be created
which satisfies the configuration requested.SAXException
- - If any parse errors occur.IOException
- - If any IO errors occur.public PrintTalkNavigator(InputStream xPrintTalkStream, boolean namespaceAware) throws IOException, SAXException, ParserConfigurationException
xPrintTalkStream
- The PrintTalk Document as Input Stream.namespaceAware
- True if navigator should be XML Namespace aware.ParserConfigurationException
- if a DocumentBuilder cannot be created
which satisfies the configuration requested.SAXException
- - If any parse errors occur.IOException
- - If any IO errors occur.public PrintTalkNavigator(byte[] xPrintTalkBytes) throws ParserConfigurationException, SAXException, IOException
xPrintTalkBytes
- The PrintTalk Document as Byte Array.ParserConfigurationException
- if a DocumentBuilder cannot be created
which satisfies the configuration requested.SAXException
- - If any parse errors occur.IOException
- - If any IO errors occur.public PrintTalkNavigator(byte[] xPrintTalkBytes, boolean namespaceAware) throws ParserConfigurationException, SAXException, IOException
xPrintTalkBytes
- The PrintTalk Document as Byte Array.namespaceAware
- True if navigator should be XML Namespace aware.ParserConfigurationException
- if a DocumentBuilder cannot be created
which satisfies the configuration requested.SAXException
- - If any parse errors occur.IOException
- - If any IO errors occur.public PrintTalkNavigator(String ptkPath) throws IOException, SAXException, ParserConfigurationException
ptkPath
- The path to the PrintTalk Document.ParserConfigurationException
- if a DocumentBuilder cannot be created
which satisfies the configuration requested.SAXException
- - If any parse errors occur.IOException
- - If any IO errors occur.public PrintTalkNavigator(String ptkPath, boolean namespaceAware) throws IOException, ParserConfigurationException, SAXException
ptkPath
- The path to the PrintTalk Document.namespaceAware
- True if navigator should be XML Namespace aware.ParserConfigurationException
- if a DocumentBuilder cannot be created
which satisfies the configuration requested.SAXException
- - If any parse errors occur.IOException
- - If any IO errors occur.public PrintTalkNavigator(File ptkFile) throws IOException, SAXException, ParserConfigurationException
ptkFile
- The file of the PrintTalk Document.ParserConfigurationException
- if a DocumentBuilder cannot be created
which satisfies the configuration requested.SAXException
- - If any parse errors occur.IOException
- - If any IO errors occur.public PrintTalkNavigator(File ptkFile, boolean namespaceAware) throws IOException, ParserConfigurationException, SAXException
ptkFile
- The file of the PrintTalk Document.namespaceAware
- True if navigator should be XML Namespace aware.ParserConfigurationException
- if a DocumentBuilder cannot be created
which satisfies the configuration requested.SAXException
- - If any parse errors occur.IOException
- - If any IO errors occur.public byte[] getPtkBytes() throws TransformerException, IOException
TransformerException
- If this document could not be transformed.IOException
- - If any IO errors occur.public InputStream getPtkStream() throws TransformerException, IOException
TransformerException
- If this document could not be transformed.IOException
- - If any IO errors occur.public String readXJdfAttribute(String xPathXJdf) throws XPathExpressionException
xPathXJdf
- 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.XPathExpressionException
JAXBException
public void replaceNode(String xPath, Object replacement) throws XPathExpressionException, JAXBException, ParserConfigurationException
xPath
- Location of the node to be replaced.replacement
- The new node.ParserConfigurationException
JAXBException
XPathExpressionException
Copyright © 2016. All rights reserved.