Class XJdfNavigator


  • public class XJdfNavigator
    extends XmlNavigator
    Navigator class which simplify XPath handling using XJdf Documents.
    • Field Detail

      • JOB_ID

        public static final java.lang.String JOB_ID
        XPath to attribute 'JobID' in XJDF Document.
        See Also:
        Constant Field Values
      • CATEGORY

        public static final java.lang.String CATEGORY
        XPath to attribute 'Category' in XJDF Document.
        See Also:
        Constant Field Values
      • GENERAL_CATALOG_ID

        public static final java.lang.String GENERAL_CATALOG_ID
        XPath to attribute 'IDValue' of GeneralID 'CatalogID' in XJDF Document.
        See Also:
        Constant Field Values
      • GENERAL_LINE_ID

        public static final java.lang.String GENERAL_LINE_ID
        XPath to attribute 'IDValue' of GeneralID 'LineID' in XJDF Document.
        See Also:
        Constant Field Values
      • FILE_SPEC_URL

        public static final java.lang.String FILE_SPEC_URL
        XPath to attribute 'URL' of a single RunList/FileSpec definition in XJDF Document.
        See Also:
        Constant Field Values
      • MIN_APPROVALS

        public static final java.lang.String MIN_APPROVALS
        XPath to attribute 'MinApprovals' of ApprovalParams Node in XJDF Document.
        See Also:
        Constant Field Values
      • CUSTOMER_ID

        public static final java.lang.String CUSTOMER_ID
        XPath to attribute 'CustomerID' of CustomerInfo Node in XJDF Document.
        See Also:
        Constant Field Values
      • AMOUNT

        public static final java.lang.String AMOUNT
        XPath to attribute 'Amount' of Product Node in XJDF Document.
        See Also:
        Constant Field Values
      • MEDIA_QUALITY

        public static final java.lang.String MEDIA_QUALITY
        XPath to attribute 'MediaQuality' of MediaIntent Node in XJDF Document.
        See Also:
        Constant Field Values
      • LAYOUT_FINISHED_DIMENSIONS

        public static final java.lang.String LAYOUT_FINISHED_DIMENSIONS
        XPath to attribute 'FinishedDimensions' of LayoutIntent Node in XJDF Document.
        See Also:
        Constant Field Values
      • LAYOUT_DIMENSIONS

        public static final java.lang.String LAYOUT_DIMENSIONS
        XPath to attribute 'Dimensions' of LayoutIntent Node in XJDF Document.
        See Also:
        Constant Field Values
      • PRODUCTION_PRINT_PROCESS

        public static final java.lang.String PRODUCTION_PRINT_PROCESS
        XPath to attribute 'PrintProcess' of ProductionIntent Node in XJDF Document.
        See Also:
        Constant Field Values
      • FOLD_CATALOG

        public static final java.lang.String FOLD_CATALOG
        XPath to attribute 'FoldCatalog' of FoldingIntent Node in XJDF Document.
        See Also:
        Constant Field Values
      • COLOR_NUM_COLORS

        public static final java.lang.String COLOR_NUM_COLORS
        XPath to attribute 'NumColors' of ColorIntent Node in XJDF Document.
        See Also:
        Constant Field Values
    • Constructor Detail

      • XJdfNavigator

        public XJdfNavigator​(java.io.InputStream xJdfStream)
                      throws javax.xml.parsers.ParserConfigurationException,
                             org.xml.sax.SAXException,
                             java.io.IOException
        Custom constructor. Accepting a XJdf InputStream for initializing.
        Parameters:
        xJdfStream - The XJDF Input Stream.
        Throws:
        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.
      • XJdfNavigator

        public XJdfNavigator​(java.io.InputStream xJdfStream,
                             boolean namespaceAware)
                      throws java.io.IOException,
                             org.xml.sax.SAXException,
                             javax.xml.parsers.ParserConfigurationException
        Custom constructor. Accepting a XJdf InputStream for initializing.
        Parameters:
        xJdfStream - The XJDF Input Stream.
        namespaceAware - True if navigator should be XML Namespace aware.
        Throws:
        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.
      • XJdfNavigator

        public XJdfNavigator​(java.lang.String xjdfPath)
                      throws java.io.IOException,
                             org.xml.sax.SAXException,
                             javax.xml.parsers.ParserConfigurationException
        Custom constructor. Accepting a path for initializing.
        Parameters:
        xjdfPath - The path to the XJDF Document.
        Throws:
        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.
      • XJdfNavigator

        public XJdfNavigator​(java.lang.String xjdfPath,
                             boolean namespaceAware)
                      throws java.io.IOException,
                             javax.xml.parsers.ParserConfigurationException,
                             org.xml.sax.SAXException
        Custom constructor. Accepting a path for initializing.
        Parameters:
        xjdfPath - The path to the XJDF Document.
        namespaceAware - True if navigator should be XML Namespace aware.
        Throws:
        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.
      • XJdfNavigator

        public XJdfNavigator​(java.io.File xjdfFile)
                      throws java.io.IOException,
                             org.xml.sax.SAXException,
                             javax.xml.parsers.ParserConfigurationException
        Custom constructor. Accepting a file for initializing.
        Parameters:
        xjdfFile - The file of the XJDF Document.
        Throws:
        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.
      • XJdfNavigator

        public XJdfNavigator​(java.io.File xjdfFile,
                             boolean namespaceAware)
                      throws java.io.IOException,
                             javax.xml.parsers.ParserConfigurationException,
                             org.xml.sax.SAXException
        Custom constructor. Accepting a file for initializing.
        Parameters:
        xjdfFile - The file of the XJDF Document.
        namespaceAware - True if navigator should be XML Namespace aware.
        Throws:
        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.
      • XJdfNavigator

        public XJdfNavigator​(byte[] xJdfBytes)
                      throws java.io.IOException,
                             org.xml.sax.SAXException,
                             javax.xml.parsers.ParserConfigurationException
        Custom constructor. Accepting a XJdf InputStream for initializing.
        Parameters:
        xJdfBytes - The XJDF as byte array.
        Throws:
        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.
      • XJdfNavigator

        public XJdfNavigator​(byte[] xJdfBytes,
                             boolean namespaceAware)
                      throws javax.xml.parsers.ParserConfigurationException,
                             org.xml.sax.SAXException,
                             java.io.IOException
        Custom constructor. Accepting a XJdf InputStream for initializing.
        Parameters:
        xJdfBytes - The XJDF as byte array.
        namespaceAware - True if navigator should be XML Namespace aware.
        Throws:
        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.
    • Method Detail

      • extractNode

        public java.lang.Object extractNode​(java.lang.String xPath)
                                     throws javax.xml.xpath.XPathExpressionException,
                                            jakarta.xml.bind.JAXBException
        Evaluates an XPath expression on XML Document and returns a parsed Node object as result.
        Parameters:
        xPath - XPath expression to execute to.
        Returns:
        The parsed XJDF Node object.
        Throws:
        javax.xml.xpath.XPathExpressionException
        jakarta.xml.bind.JAXBException
      • replaceNode

        public void replaceNode​(java.lang.String xPath,
                                java.lang.Object replacement)
                         throws javax.xml.xpath.XPathExpressionException,
                                jakarta.xml.bind.JAXBException,
                                javax.xml.parsers.ParserConfigurationException
        Replace a node in XML Document located by the XPath expression.
        Parameters:
        xPath - Location of the node to be replaced.
        replacement - The new node.
        Throws:
        javax.xml.xpath.XPathExpressionException
        jakarta.xml.bind.JAXBException
        javax.xml.parsers.ParserConfigurationException