Class JDFLayout

  • 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 JDFLayout
    extends JDFSurface
    See Also:
    Serialized Form
    • Constructor Detail

      • JDFLayout

        public JDFLayout​(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                         java.lang.String qualifiedName)
        Constructor for JDFLayout
        Parameters:
        myOwnerDocument -
        qualifiedName -
      • JDFLayout

        public JDFLayout​(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                         java.lang.String myNamespaceURI,
                         java.lang.String qualifiedName)
        Constructor for JDFLayout
        Parameters:
        myOwnerDocument -
        myNamespaceURI -
        qualifiedName -
      • JDFLayout

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

      • getAllOrds

        public java.util.Vector<java.lang.Integer> getAllOrds()
        get a vector of all Ord Values, multiple entries are entered multiple times
        Returns:
      • calcMaxOrd

        public int calcMaxOrd()
        calculate maxOrd from all ord values, note that this is one based, i.e. the number of objects
        Returns:
        maxOrd, -1 if none is found
      • calcNumSame

        public int calcNumSame()
        calculate number of same printed elements, non existing slots (i.e. ords that are not on the sheet at all) are ignored
        Returns:
        the number of equivalent elements, if always the same, else -1
      • toNewLayout

        public boolean toNewLayout()
        generate a JDF 1.3 compatible Layout from this (1.2)
        Returns:
        true if successful
      • fromNewLayout

        public boolean fromNewLayout()
        generate a JDF 1.2 compatible Layout from this (1.3)
        Returns:
        bool true if successful
      • isNewLayout

        public static boolean isNewLayout​(JDFResource sheet)
        heuristics to check which version an element of a Layout is in: 1.3 or 1.2 Note that this routine is static since it must be used on all sheets, surfaces etc.
        Parameters:
        sheet - the Sheet, Surface, Signature or Layout to check
        Returns:
        true if this is a new, i.e. partitioned Layout
      • numSignatures

        public int numSignatures()
        counts the number of signatures in both old and new Layouts if old: the number of elements if new: the number of SignatureName partition leaves
        Returns:
        the number of signatures
      • getCreateSignature

        public JDFSignature getCreateSignature​(int iSkip)
        gets or appends a signature in both old and new Layouts if old: a element if new: a SignatureName partition leaf
        Overrides:
        getCreateSignature in class JDFAutoLayout
        Parameters:
        iSkip - the number of signatures to skip
        Returns:
        JDFSignature the element
      • getSignature

        public JDFSignature getSignature​(int iSkip)
        gets a signature in both old and new Layouts if old: a element if new: a SignatureName partition leaf
        Overrides:
        getSignature in class JDFAutoLayout
        Parameters:
        iSkip - the number of signatures to skip
        Returns:
        JDFSignature the element default is getSignature(0)
      • getSignature

        public JDFSignature getSignature​(java.lang.String signatureName)
        gets a signature in both old and new Layouts if old: a element if new: a SignatureName partition leaf
        Parameters:
        signatureName - the SignatureName partition key value(new) or Signature/@Name(old)
        Returns:
        the signature
      • getCreateSignature

        public JDFSignature getCreateSignature​(java.lang.String signatureName)
                                        throws JDFException
        gets a signature in both old and new Layouts if old: a creates it if it does not exist element if new: a SignatureName partition leaf
        Parameters:
        signatureName - the SignatureName partition key value(new) or Signature/@Name(old)
        Returns:
        the signature
        Throws:
        JDFException
      • getSignatureVector

        public VElement getSignatureVector()
        get the vector of sheets in this signature
        Returns:
        VElement the vector of signatures in this