Class JDFRunList

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, IStreamWriter, org.w3c.dom.Element, org.w3c.dom.ElementTraversal, org.w3c.dom.events.EventTarget, org.w3c.dom.Node, org.w3c.dom.NodeList, org.w3c.dom.TypeInfo

    public class JDFRunList
    extends JDFAutoRunList
    Wrapper around a JDF RunList
    See Also:
    Serialized Form
    • Constructor Detail

      • JDFRunList

        public JDFRunList​(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                          java.lang.String qualifiedName)
                   throws org.w3c.dom.DOMException
        Constructor for JDFRunList
        Parameters:
        myOwnerDocument -
        qualifiedName -
        Throws:
        org.w3c.dom.DOMException
      • JDFRunList

        public JDFRunList​(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                          java.lang.String myNamespaceURI,
                          java.lang.String qualifiedName)
                   throws org.w3c.dom.DOMException
        Constructor for JDFRunList
        Parameters:
        myOwnerDocument -
        myNamespaceURI -
        qualifiedName -
        Throws:
        org.w3c.dom.DOMException
      • JDFRunList

        public JDFRunList​(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                          java.lang.String myNamespaceURI,
                          java.lang.String qualifiedName,
                          java.lang.String myLocalName)
                   throws org.w3c.dom.DOMException
        Constructor for JDFRunList
        Parameters:
        myOwnerDocument -
        myNamespaceURI -
        qualifiedName -
        myLocalName -
        Throws:
        org.w3c.dom.DOMException
    • Method Detail

      • toString

        public java.lang.String toString()
        toString
        Overrides:
        toString in class KElement
        Returns:
        String
        See Also:
        Object.toString()
      • addRun

        @Deprecated
        public JDFRunList addRun​(java.lang.String fileName)
        Deprecated.
        addRun
        Parameters:
        fileName -
        Returns:
        JDFRunList
      • addRun

        @Deprecated
        public JDFRunList addRun​(java.lang.String fileName,
                                 int first)
        Deprecated.
        addRun
        Parameters:
        fileName -
        first -
        Returns:
        JDFRunList
      • addRun

        public JDFRunList addRun​(java.lang.String fileName,
                                 int first,
                                 int last)
        addRun
        Parameters:
        fileName -
        first -
        last -
        Returns:
        JDFRunList
      • addPDF

        @Deprecated
        public JDFRunList addPDF​(java.lang.String fileName)
        Deprecated.
        addPDF
        Parameters:
        fileName -
        Returns:
        JDFRunList
      • addPDF

        @Deprecated
        public JDFRunList addPDF​(java.lang.String fileName,
                                 int first)
        Deprecated.
        addPDF
        Parameters:
        fileName -
        first -
        Returns:
        JDFRunList
      • addPDF

        public JDFRunList addPDF​(java.lang.String fileName,
                                 int first,
                                 int last)
        addPDF add a pdf file to this RunList
        Parameters:
        fileName - the URL (!) of the file
        first - 0 based first page in the file
        last - 0 based last page in the file
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.util.Vector fileNames,
                                    java.util.Vector sepNames)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.util.Vector fileNames,
                                    java.util.Vector sepNames,
                                    int first)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        first -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.util.Vector fileNames,
                                    java.util.Vector sepNames,
                                    int first,
                                    int n)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        first -
        n -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.util.Vector fileNames,
                                    java.util.Vector sepNames,
                                    int first,
                                    boolean pageMajor)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        first -
        pageMajor -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.util.Vector fileNames,
                                    java.util.Vector sepNames,
                                    boolean pageMajor)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        pageMajor -
        Returns:
        JDFRunList
      • addSepRun

        public JDFRunList addSepRun​(java.util.Vector fileNames,
                                    java.util.Vector sepNames,
                                    int first,
                                    int n,
                                    boolean pageMajor)
        add a run separation
        Parameters:
        fileNames - vector of file names for the URL attribute of the FileSpec in the LayoutElement
        sepNames - parallel vector of separation names.
        first - index of the first page in the file - Sets the RunList FirstPage attribute
        n - the number of logical pages in this run
        pageMajor - if true, separations are ordered as page Major, i.e CMYKCMYK
        if false, ordering is CCMMYYKK
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(VElement fileSpec,
                                    java.util.Vector sepNames)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(VElement fileSpec,
                                    java.util.Vector sepNames,
                                    int first)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        first -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(VElement fileSpec,
                                    java.util.Vector sepNames,
                                    int first,
                                    int n)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        first -
        n -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(VElement fileSpec,
                                    java.util.Vector sepNames,
                                    int first,
                                    boolean pageMajor)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        first -
        pageMajor -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(VElement fileSpec,
                                    java.util.Vector sepNames,
                                    boolean pageMajor)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        pageMajor -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(VElement fileSpec,
                                    java.util.Vector sepNames,
                                    int first,
                                    int n,
                                    boolean pageMajor)
        Deprecated.
        060503 use the version with VString VString
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        first -
        n -
        pageMajor -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(JDFResource fileSpec,
                                    java.lang.String sepNames)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(JDFResource fileSpec,
                                    java.lang.String sepNames,
                                    int first)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        first -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(JDFResource fileSpec,
                                    java.lang.String sepNames,
                                    int first,
                                    int n)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        first -
        n -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(JDFResource fileSpec,
                                    java.lang.String sepNames,
                                    int first,
                                    boolean pageMajor)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        first -
        pageMajor -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(JDFResource fileSpec,
                                    java.lang.String sepNames,
                                    boolean pageMajor)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        pageMajor -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(JDFResource fileSpec,
                                    java.lang.String sepNames,
                                    java.lang.String sep)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        sep -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(JDFResource fileSpec,
                                    java.lang.String sepNames,
                                    int first,
                                    java.lang.String sep)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        first -
        sep -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(JDFResource fileSpec,
                                    java.lang.String sepNames,
                                    int first,
                                    int n,
                                    java.lang.String sep)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        first -
        n -
        sep -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(JDFResource fileSpec,
                                    java.lang.String sepNames,
                                    int first,
                                    boolean pageMajor,
                                    java.lang.String sep)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        first -
        pageMajor -
        sep -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(JDFResource fileSpec,
                                    java.lang.String sepNames,
                                    boolean pageMajor,
                                    java.lang.String sep)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        pageMajor -
        sep -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(JDFResource fileSpec,
                                    java.lang.String sepNames,
                                    int first,
                                    int n,
                                    boolean pageMajor,
                                    java.lang.String sep)
        Deprecated.
        addSepRun
        Parameters:
        fileSpec -
        sepNames -
        first -
        n -
        pageMajor -
        sep -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.lang.String fileNames,
                                    java.lang.String sepNames)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.lang.String fileNames,
                                    java.lang.String sepNames,
                                    int first)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        first -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.lang.String fileNames,
                                    java.lang.String sepNames,
                                    int first,
                                    int n)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        first -
        n -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.lang.String fileNames,
                                    java.lang.String sepNames,
                                    int first,
                                    boolean pageMajor)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        first -
        pageMajor -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.lang.String fileNames,
                                    java.lang.String sepNames,
                                    boolean pageMajor)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        pageMajor -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.lang.String fileNames,
                                    java.lang.String sepNames,
                                    java.lang.String sep)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        sep -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.lang.String fileNames,
                                    java.lang.String sepNames,
                                    int first,
                                    java.lang.String sep)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        first -
        sep -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.lang.String fileNames,
                                    java.lang.String sepNames,
                                    int first,
                                    int n,
                                    java.lang.String sep)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        first -
        n -
        sep -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.lang.String fileNames,
                                    java.lang.String sepNames,
                                    int first,
                                    boolean pageMajor,
                                    java.lang.String sep)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        first -
        pageMajor -
        sep -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.lang.String fileNames,
                                    java.lang.String sepNames,
                                    boolean pageMajor,
                                    java.lang.String sep)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        pageMajor -
        sep -
        Returns:
        JDFRunList
      • addSepRun

        @Deprecated
        public JDFRunList addSepRun​(java.lang.String fileNames,
                                    java.lang.String sepNames,
                                    int first,
                                    int n,
                                    boolean pageMajor,
                                    java.lang.String sep)
        Deprecated.
        addSepRun
        Parameters:
        fileNames -
        sepNames -
        first -
        n -
        pageMajor -
        sep -
        Returns:
        JDFRunList
      • setFileURL

        public boolean setFileURL​(java.lang.String url)
        set RunList/LayoutElement/FileSpec/@URL
        Parameters:
        url - the url to set
        Returns:
        true if ok
      • setFileSpecURL

        public boolean setFileSpecURL​(java.lang.String url)
        set RunList/FileSpec/@URL - only for 2.0
        Parameters:
        url - the url to set
        Returns:
        true if ok
      • getCreateFileSpec

        public JDFFileSpec getCreateFileSpec()
        (25) getCreateFileSpec
        Returns:
        JDFFileSpec the element
      • setByteMapURL

        public boolean setByteMapURL​(java.lang.String url)
        set RunList/ByteMap/FileSpec/@URL
        Parameters:
        url - the url to set
        Returns:
        true if ok
      • getFileURL

        public java.lang.String getFileURL()
        get RunList/LayoutElement/FileSpec/@URL also evaluate RunList/@directory and concatinate Directory + URL in case URL is a relative URL
        Returns:
        URL if a URL or Directory attribute exists, else null
      • getFileMimeType

        public java.lang.String getFileMimeType()
        get RunList/LayoutElement/FileSpec/@MimeType
        Returns:
        MIMEType if it exists, else null
      • getFileSpec

        public JDFFileSpec getFileSpec()
        get RunList/LayoutElement/FileSpec or RunList/FileSpec in case of XJDF
        Returns:
        JDFFileSpec FileSpec if it exists, else null
      • getCommonURLFileSpecMap

        public java.util.HashMap<java.lang.String,​VJDFAttributeMap> getCommonURLFileSpecMap()
        get a map of VJDFAttributeMap that are sorted by the fileSpec URL key
        each url key maps the leaves that share the same URL
        Returns:
        fileSpecMap a map of VJDFAttributeMap
      • getFirstIndex

        public int getFirstIndex()
        gets the first logical RunIndex for this partition
        Returns:
        the first RunIndex that this RunList partition specifies
      • getFirstIndex

        protected int getFirstIndex​(JDFRunList.JDFRunData last)
        gets the first logical RunIndex for this partition
        Parameters:
        last -
        Returns:
        the first RunIndex that this RunList partition specifies
      • getPageLeaves

        public VElement getPageLeaves()
        get the list of RunList Leaves with IsPage=true
        Returns:
      • getLastIndex

        public int getLastIndex()
        gets the last logical RunIndex for this partition
        Returns:
        the last RunIndex that this RunList partition specifies
      • getLastIndex

        protected int getLastIndex​(JDFRunList.JDFRunData last)
        gets the last logical RunIndex for this partition
        Parameters:
        last -
        Returns:
        the last RunIndex that this RunList partition specifies
      • getIndexPartition

        public JDFRunList getIndexPartition​(int index)
        get the Partition that corresponds to a given runIndex
        Parameters:
        index - the runIndex to search for
        Returns:
        JDFRunList the partition that contains this index. use @see getPageInFile to find the correct page warning blindly calling this from inside a loop may cause performance issues - use the getPageIterator if you need performance optimized access
      • getPageInFile

        public int getPageInFile​(int runIndex)
        get the 0 based page number in the specified file
        Parameters:
        runIndex -
        Returns:
        the page number in the file; -1 if ot of range
      • collapse

        public void collapse​(boolean bCollapseToNode,
                             boolean bCollapseElements)
        collapse all redundant attributes and elements
        Overrides:
        collapse in class JDFResource
        Parameters:
        bCollapseToNode - only collapse redundant attriutes and elements that pre-exist in the nodes
        bCollapseElements - if true, collapse elements, else only collapse attributes
      • expand

        public void expand​(boolean bDeleteFromNode)
        Description copied from class: JDFResource
        Expand so that each leaf is complete (except for ID)
        Overrides:
        expand in class JDFResource
        Parameters:
        bDeleteFromNode - if true, removes all intermediate elements and attributes
        See Also:
        JDFResource.expand(boolean)
      • fixNPage

        public void fixNPage()
        write NPage into all leaves with IsPage=true and write the appropriate value into the lower level nodes
      • getTruePage

        public JDFRunList getTruePage()
        get the first matching parent or this with IsPage==true
        Returns:
      • isPageLeaf

        public boolean isPageLeaf()
        get the first matching parent or this with IsPage==true
        Returns:
      • getFileSpecNPage

        public int getFileSpecNPage()
      • getPageListIndex

        public JDFIntegerRangeList getPageListIndex()
        get the pageListIndex with a reasonable def for number of pages
        first try the pagelist, then do for local npage
        Overrides:
        getPageListIndex in class JDFAutoRunList
        Returns:
        JDFIntegerRangeList the value of the attribute, null if a the attribute value is not a valid to create a JDFIntegerRangeList
        See Also:
        JDFAutoRunList.getPageListIndex()