Class JDFResource

    • Constructor Detail

      • JDFResource

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

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

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

      • setAvailable

        @Deprecated
        public void setAvailable​(boolean bAvailable)
        Deprecated.
        use SetStatus(EnumResStatus) default: setAvailable(true)
        Status related shorthand for really lazy people Sets Status of resource as Available if bAvailable=true or as Unavailable if bAvailable=false
        Parameters:
        bAvailable -
      • isAvailable

        @Deprecated
        public boolean isAvailable​(boolean bRecurseRefs)
        Deprecated.
        use getStatus default: IsAvailable(false)
        Tests whether Status of resource is Available
        Parameters:
        bRecurseRefs - if bRecurseRefs is set to true, also recurses into all resources linked by rRefs and returns true if the minimum Status is Status_Available
        Returns:
        boolean true, if Status is Available
      • isRootElement

        public boolean isRootElement()
        Tests, whether 'this' is root of partition (i.e. there is no element with the same name over 'this')
        Returns:
        boolean true, if 'this' is a root
      • isQuantity

        public boolean isQuantity()
        Checks, whether this resourse is a quantity resource. For quantity resource the class of 'this' must be either Quantity or Consumable
        Returns:
        boolean true, if 'this' is a quantity resource
      • isParameter

        public boolean isParameter()
        Checks, whether this resourse is a parameter resource
        Returns:
        boolean true, if 'this' is a parameter resource
      • getLock

        @Deprecated
        public boolean getLock()
        Deprecated.
        [BLD009] use getLocked
        getLock
        Returns:
        boolean
      • lock

        @Deprecated
        public void lock​(boolean bLock)
        Deprecated.
        [BLD009] use setLocked()
        Lock
        Parameters:
        bLock -
      • isPhysical

        public boolean isPhysical()
        Checks, whether the resource is one of the physical resource classes
        Returns:
        boolean true, if the resource is one of the physical resource classes
      • getResourceRoot

        public JDFResource getResourceRoot()
        Gets the root resource of 'this'
        Returns:
        JDFResource - the root resource element
        Throws:
        JDFException - if GetResourceRoot ran into the JDF node while searching
      • getResourceRoot

        public static JDFResource getResourceRoot​(KElement elem)
        Gets the root resource of 'this'
        Parameters:
        elem - the element to get the root of
        Returns:
        JDFResource - the root resource element
        Throws:
        JDFException - if GetResourceRoot ran into the JDF node while searching
      • getPool

        @Deprecated
        public JDFResourcePool getPool()
        Deprecated.
        [BLD009] use GetResourcePool instead
        Gets the resourcepool that 'this' lives in
        Returns:
        JDFResourcePool: the ResourcePool where 'this' lives
      • init

        public boolean init()
        default initialization
        Overrides:
        init in class JDFElement
        Returns:
        boolean true, if successful
        See Also:
        KElement.init()
      • makeRootResource

        public JDFResource makeRootResource​(java.lang.String alias,
                                            JDFElement parentPool,
                                            boolean bLinkHere)
        Makes from 'this' resource subelement a root resource element (direct child) of the specified parentPool or (in default case) of ResourcePool, where it lives.
        The Status and SpawnStatus attribute values of the new root resource are taken from the old root resource.
        Parameters:
        alias - id attribute of the newly created resource
        parentPool - the pool where the newly created resource is stored
        if null the local pool is used. Must use JDFElement for the pool because of recursive #defines
        bLinkHere - if true, creates a refelement (link) to the newly created resource at the position where 'this' originally resided.
        Returns:
        JDFResource the moved resource
      • getCreator

        public VElement getCreator​(boolean bCreate)
        Gets the creators (bCreate=true) or consumers (bCreate=false) of this resource
        Parameters:
        bCreate - switcher for getter: if true gets creators, otherwise gets consumers
        Returns:
        VElement list of JDF nodes that create or consume this resource
      • mergePartition

        @Deprecated
        public void mergePartition​(JDFResource resToMerge,
                                   java.lang.String spawnID,
                                   JDFResource.EnumAmountMerge amountPolicy,
                                   boolean bLocalResource)
        Deprecated.
        used only by merge - moved there
        Merges partitioned resources into this resource uses PartIDKey to identify the correct resources
        Parameters:
        resToMerge - the resource leaf to merge into this
        spawnID - the spawnID of the spawning that will now be merged
        amountPolicy - how to clean up the Resource amounts after merging
        bLocalResource - must be true for the local resources in a spawned node and its subnodes, which default to RW
        Throws:
        JDFException - if here is an attempt to merge incompatible resources
        JDFException - if here is an attempt to merge incompatible partitions
      • setPartIDKeys

        public void setPartIDKeys​(VString partIDKeys)
        set the partIDKeys attribute of the root of this
        Parameters:
        partIDKeys - the value to set key to
      • setPartIDKeyList

        public void setPartIDKeyList​(java.util.List<java.lang.String> partIDKeys)
        Parameters:
        partIDKeys -
      • mergeCloneResource

        public JDFResource mergeCloneResource​(JDFResource oldRes)
        Clone the resource element oldRes and merge it with this resource
        Parameters:
        oldRes - the resource element to clone and to merge with this resource
        Returns:
        JDFResource merged resource
      • getLinks

        @Deprecated
        public VElement getLinks​(java.lang.String linkName)
        Deprecated.
        [BLD009] use getLinks(linkName, null)
        Gets all elements with name linkName, which contain resource links that point to this resource
        Parameters:
        linkName - defaults to any
        Returns:
        VElement vector of all found elements
      • getLinks

        public VElement getLinks​(java.lang.String linkName,
                                 java.lang.String nameSpaceURI)
        Gets all elements with name linkName, which contain id/idrefs that point to this resource
        Parameters:
        linkName - defaults to any
        nameSpaceURI - attribute namespace you are searching in
        Returns:
        VElement - vector of all found elements
      • getLinksAndRefs

        @Deprecated
        public VElement getLinksAndRefs()
        Deprecated.
        use getLinksAndRefs(true,true);
        Gets all resourcelinks and refelements that link to this
        Returns:
        VElement - vector of all found elements, null if none found
      • getLinksAndRefs

        public VElement getLinksAndRefs​(boolean bLink,
                                        boolean bRef)
        Gets all resourcelinks and refelements that link to this
        note that this method may be tim consuming in a large loop
        - in case of massive cleanup, use LinkRefFinder and access the complete map of references from within the loop @see LinkRefFinder
        Parameters:
        bLink - if true, include resource links
        bRef - if true include resource refs
        Returns:
        VElement - vector of all found elements, null if none found
      • isResourceElement

        public boolean isResourceElement()
        Tests, if the first ancestor with a name different from the node name is not one of DropItemIntent,CustomerInfo,NodeInfo,ResourcePool,PipeParams, ResourceInfo,ResourceCmdParams.
        In other words: if this resource is a subelement, but not a resourceroot
        Returns:
        boolean true, if this is a subelement but not a root
      • getPartition

        @Deprecated
        public JDFResource getPartition​(JDFAttributeMap m,
                                        boolean bIncomplete)
        Deprecated.
        use getPartition(JDFAttributeMap m, JDFResource.EnumPartUsage partUsage)
        Gets the first part that matches mAttribute
        Parameters:
        m - the map of key-value partitions (where key - PartIDKey, value - its value)
        bIncomplete - if true, also accept nodes that are are not completely specified in the partmap,
        e.g. if partitioned by run, RunPage and only Run is specified
        Returns:
        JDFResource - the first matching resource leaf or node
      • getPartition

        public JDFResource getPartition​(JDFAttributeMap m,
                                        JDFResource.EnumPartUsage partUsage)
        Gets the first part that matches mAttribute
        Parameters:
        m - the map of key-value partitions (where key - PartIDKey, value - its value)
        partUsage - also accept nodes that are are not completely specified in the partmap, e.g. if partitioned by run, RunPage and only Run is specified
        Returns:
        JDFResource: the first matching resource leaf or node
      • getPartition

        @Deprecated
        public JDFResource getPartition​(JDFResource.EnumPartIDKey key,
                                        java.lang.String value,
                                        boolean bIncomplete)
        Deprecated.
        use getPartition(JDFAttributeMap m, JDFResource.EnumPartUsage partUsage)
        Gets the first part that matches key-value pair
        Parameters:
        key - the PartIDKey attribute name
        value - the string value of the partition key
        bIncomplete - if true, also accept nodes that are are not completely specified in the partmap, e.g. if partitioned by run, RunPage and only Run is specified
        Returns:
        JDFResource the first matching resource leaf or node
      • clonePartitions

        public void clonePartitions​(JDFResource r,
                                    VString partIDKeys)
        applies the partitioning of r to this.
        Ideally called only for unpartitioned resources, but will work on consistently partitioned resources
        Parameters:
        r - the resource from which to clone the partitioning
        partIDKeys - the partIDKeys to clone, if null use the existing list from r
        Throws:
        JDFException - if this is already inconsistently partitioned
      • reorderPartitions

        public void reorderPartitions​(java.util.List<java.lang.String> newPartIDKeys)
        Parameters:
        newPartIDKeys -
      • fillSparse

        public void fillSparse()
      • getCreatePartition

        public JDFResource getCreatePartition​(JDFAttributeMap partMap,
                                              VString vPartKeys)
        Recursively adds the partition leaves defined in partMap
        Parameters:
        partMap - the map of part keys
        vPartKeys - the vector of partIDKeys strings of the resource. If empty (the default), the Resource PartIDKeys attribute is used
        Returns:
        JDFResource the last created partition leaf
        Throws:
        JDFException - if there are in the partMap not matching partitions
        JDFException - if there is an attempt to fill non-matching partIDKeys
        JDFException - if by adding of last partition key there is either non-continuous partmap or left more than one key
      • getCreatePartition

        public JDFResource getCreatePartition​(JDFResource.EnumPartIDKey key,
                                              java.lang.String value,
                                              VString vPartIDKeys)
        Gets the first part that matches key-value if it does not exist, create it
        Parameters:
        key - the PartIDKey attribute name
        value - the string value of the partition key
        vPartIDKeys - the vector of partIDKeys strings of the resource.
        Returns:
        JDFResource the matching resource
      • consistentPartIDKeys

        protected boolean consistentPartIDKeys​(JDFResource.EnumPartIDKey key,
                                               JDFResource root,
                                               VString partIDKeys)
        Tests, if this leaf has a consistent PartIDKey as specified by key
        Parameters:
        key - the PartIDKey attribute name
        root -
        partIDKeys -
        Returns:
        boolean true, if key exists in this leaf is in PartIDKeys
      • consistentPartIDKeys

        public boolean consistentPartIDKeys​(JDFResource.EnumPartIDKey key)
        Tests, if this leaf has a consistent PartIDKey as specified by key
        Parameters:
        key - the PartIDKey attribute name
        Returns:
        boolean true, if key exists in this leaf is in PartIDKeys
      • getDeepPart

        @Deprecated
        public JDFResource getDeepPart​(JDFAttributeMap m,
                                       boolean bIncomplete)
        Deprecated.
        use the partUsage dependent version instead
        Gets a matching part from somewhere down there returns the closest ancestor of all matching elements within the target vector
        Parameters:
        m -
        bIncomplete -
        Returns:
        JDFResource
      • getDeepPart

        public JDFResource getDeepPart​(JDFAttributeMap m,
                                       JDFResource.EnumPartUsage partUsage)
        Gets a matching part from somewhere down there,
        returns the closest ancestor of all matching elements within the target vector
        Parameters:
        m - map of attributes that should fit
        partUsage - also accept nodes that are are not completely specified in the partmap, e.g. if partitioned by run, RunPage and only Run is specified
        Returns:
        the first found matching resource node or leaf
      • getLeaves

        public VElement getLeaves​(boolean bAll)
        Gets a list of all direct leaves
        Parameters:
        bAll - if true include all intermediate and leaf nodes including this
        if false, include only the final leaves
        Returns:
        VElement - the vector of all leaves - never null
      • getLeafArray

        public java.util.List<JDFResource> getLeafArray​(boolean bAll)
        Gets a list of all direct leaves
        Parameters:
        bAll - if true include all intermediate and leaf nodes including this
        if false, include only the final leaves
        Returns:
        VElement - the vector of all leaves - never null
      • getDirectPartitionVector

        public java.util.Vector<? extends KElement> getDirectPartitionVector()
        Returns:
      • getDirectPartitionArray

        public java.util.List<? extends KElement> getDirectPartitionArray()
        Returns:
      • getDirectPartition

        public JDFResource getDirectPartition​(int i)
        Returns:
      • isLeaf

        public boolean isLeaf()
        Tests, whether 'this' is the end of a partition (i.e. there is no element with the same name directly below)
        Returns:
        boolean true, if 'this' is a leaf
      • getPartValues

        public VString getPartValues​(JDFResource.EnumPartIDKey partType)
        Gets a list of the values for attribute part type within the leaves
        Parameters:
        partType - the PartIDKey attribute name
        Returns:
        Vector - a list of values of the specified partition key
      • getAttribute

        public java.lang.String getAttribute​(java.lang.String attrib,
                                             java.lang.String nameSpaceURI,
                                             java.lang.String def)
        Gets an attribute value. Also follows partition parents to the resource root
        Overrides:
        getAttribute in class KElement
        Parameters:
        attrib - attribute name to get
        nameSpaceURI - namespace to search for
        def - attribute default that is returned if no attribute exists
        Returns:
        WString - attribute value
      • getChildrenByClass

        @Deprecated
        public <a extends KElement> java.util.Vector<a> getChildrenByClass​(java.lang.Class<a> clazz,
                                                                           boolean bRecurse,
                                                                           int nMax)
        Deprecated.
        use getChildArrayByClass
        Overrides:
        getChildrenByClass in class KElement
        Parameters:
        clazz -
        bRecurse -
        nMax -
        Returns:
      • getChildWithAttribute

        public <A extends KElement> A getChildWithAttribute​(java.lang.Class<A> clazz,
                                                            java.lang.String attName,
                                                            java.lang.String attVal)
        Overrides:
        getChildWithAttribute in class KElement
      • getAttributeMap

        public JDFAttributeMap getAttributeMap()
        Get the Attribute Map of the actual element also following inheritance
        Overrides:
        getAttributeMap in class KElement
        Returns:
        JDFAttributeMap the attribute map of the actual element
      • hasAttribute

        public boolean hasAttribute​(java.lang.String attrib,
                                    java.lang.String nameSpaceURI,
                                    boolean bInherit)
        Checks if the actual element has a specific attribute
        this version checks within the resource and its partitioned parent xml elements
        Overrides:
        hasAttribute in class KElement
        Parameters:
        attrib - the name of the attribute to look for
        nameSpaceURI - the nameSpace to look in
        bInherit - if true also check recursively in parent elements, regardless of partitioning
        Returns:
        boolean true, if the attribute is present
      • numChildElements

        public int numChildElements​(java.lang.String nodeName,
                                    java.lang.String nameSpaceURI)
        The same as JDFElement.numChildElements but also follows References
        Overrides:
        numChildElements in class JDFElement
        Parameters:
        nodeName - the nodes to count
        nameSpaceURI - the nameSpace to look in
        Returns:
        int - the number of child elements
      • getCreateElement_JDFResource

        public KElement getCreateElement_JDFResource​(java.lang.String nodeName,
                                                     java.lang.String nameSpaceURI,
                                                     int iSkip)
        Recursive GetElement that also checks parent nodes up to the part root this was added in order to implement the c++ JDFResource::GetCreateElement
        Parameters:
        nodeName - name of the child node to get
        nameSpaceURI - namespace to search for
        iSkip - get the iSkipth element that fits
        Returns:
        KElement - the matching element
      • getElement

        public KElement getElement​(java.lang.String nodeName,
                                   java.lang.String nameSpaceURI,
                                   int iSkip)
        same as KElement.getElement, but also follows references and searches parents
        Overrides:
        getElement in class JDFElement
        Parameters:
        nodeName - name of the child node to get
        nameSpaceURI - namespace to search for
        iSkip - get the iSkipth element that fits
        Returns:
        KElement: the matching element default: getElement(nodeName, null, 0)
        See Also:
        KElement.getElement(java.lang.String, java.lang.String, int)
      • addPartitions

        public VElement addPartitions​(JDFResource.EnumPartIDKey partType,
                                      VString values)
        Creates parts of part type 'partType' with values as defined in 'values'; the number of values is defined by the number of elements in 'values'
        Parameters:
        partType - part type of a new part
        values - its value
        Returns:
        VElement - vector of newly created parts
      • addPartition

        public JDFResource addPartition​(JDFResource.EnumPartIDKey partType,
                                        org.apache.commons.lang.enums.ValuedEnum enumPart)
        Adds a new part to this node, also handles PartIDKeys in the root etc. convenience method to allow for partIDKey enums rather than strings
        Parameters:
        partType - part type of a new part
        enumPart - its value
        Returns:
        JDFResource - the newly created part
      • addPartition

        public JDFResource addPartition​(JDFResource.EnumPartIDKey partType,
                                        java.lang.String value)
        Adds a new part to this node, also handles PartIDKeys in the root etc.
        Parameters:
        partType - part type of a new part
        value - its value
        Returns:
        JDFResource - the newly created part
      • getAttributeVector

        public VString getAttributeVector()
        Gets all local attribute names as an vector of strings.
        Is called from KElement.getMissingAttributeVector() as a virtual method
        Overrides:
        getAttributeVector in class KElement
        Returns:
        VString - the vector of attribute names
      • getAttributeVector_JDFResource

        public VString getAttributeVector_JDFResource()
        Gets all local attribute names as an vector of strings
        Returns:
        VString the vector of attribute names
      • getAttributePart

        public JDFResource getAttributePart​(java.lang.String key)
        Gets the parent element that actually contains the attribute key in a partitioned resource
        Parameters:
        key - attribute key to look for
        Returns:
        JDFResource - the parent element that actually contains the attribute key
      • getAttributePartVector

        public VElement getAttributePartVector​(java.lang.String key)
        Gets a unique vector of resource leaf elements that actually contain the attribute key
        Parameters:
        key - attribute key to look for
        Returns:
        VElement a vector of resource leaf elements that actually contain the attribute key
      • buildXPath

        public java.lang.String buildXPath​(java.lang.String relativeTo,
                                           int methCountSiblings)
        Gets the XPath full tree representation of 'this'
        Overrides:
        buildXPath in class KElement
        Parameters:
        relativeTo - relative path to which to create an xpath
        methCountSiblings - , if 1 count siblings, i.e. add '[n]' if 0, only specify the path of parents
        Returns:
        String the XPath representation of 'this' e.g. /root/parent/element
        null if parent of this is null (e.g. called on rootnode)
      • getLocalPartitionKey

        public java.lang.String getLocalPartitionKey()
        get the local partition key of this leaf
        Returns:
        the key, if one exists, null otherwise
      • cleanResourceAttributes

        public void cleanResourceAttributes()
        remove any resource specific attribute when making this to an element
      • removeInheritedAttributes

        public void removeInheritedAttributes​(java.lang.String attrib,
                                              java.lang.String nameSpaceURI)
        Removes all local and inherited attributes down to the resource root
        Parameters:
        attrib - the attribute key to remove
        nameSpaceURI - the attribute nameSpaceURI to remove
      • removeAttribute

        public void removeAttribute​(java.lang.String attrib,
                                    java.lang.String nameSpaceURI)
        Removes local attributes
        Overrides:
        removeAttribute in class KElement
        Parameters:
        attrib - the attribute key to remove
        nameSpaceURI - the attribute nameSpaceURI to remove
      • removeAttributeFromLeaves

        public void removeAttributeFromLeaves​(java.lang.String attrib,
                                              java.lang.String nameSpaceURI)
        Removes attributes, also removes overwrites in any child parts
        Parameters:
        attrib - the attribute key to remove
        nameSpaceURI - the attribute nameSpaceURI to remove
      • reducePartitions

        public void reducePartitions​(VJDFAttributeMap vValidParts)
        Reduces partition so that only the parts that overlap with vResources remain
        Parameters:
        vValidParts - vector of partmaps that define the individual valid parts.
        The individual PartMaps are ored to define the final resource.
      • clearPartitions

        public void clearPartitions()
        make sure we don't have any old crap
      • reduceParts

        @Deprecated
        public void reduceParts​(java.util.Vector vParts)
        Deprecated.
        [BLD009] not in C++ anymore, not used internally here
        reduceParts
        Parameters:
        vParts -
      • getPartMap

        public JDFAttributeMap getPartMap​(java.util.List<java.lang.String> partIDKeys)
        Gets a map of all partition key-value pairs for this leaf / node. This includes a recursion to the part root.
        Parameters:
        partIDKeys -
        Returns:
        the part attribute map for 'this' leaf / node - reused for performance enhancement; never null
      • getPartMap

        public JDFAttributeMap getPartMap()
        Gets a map of all partition key-value pairs for this leaf / node this includes a recursion to the part root; never null
        Overrides:
        getPartMap in class JDFElement
        Returns:
        JDFAttributeMap - the part attribute map for 'this' leaf / node
      • getLinkString

        public java.lang.String getLinkString()
        Gets nodename of a ResourceLink that links to 'this'
        Returns:
        String - name of a link to 'this'
      • mergeSpawnIDs

        @Deprecated
        public void mergeSpawnIDs​(JDFResource resToMerge,
                                  VString previousMergeIDs)
        Deprecated.
        use JDFMerge.mergeSpawnIDS
        Merges the spawnIDs of the various partitions
        also updates SpawnStatus, if necessary
        this routine is needed to correctly handle nested spawning and merging
        Parameters:
        resToMerge - the resource with potentially new spawnIDs
        previousMergeIDs - vector of already merged spawnIDs that may still be in a partition
      • expand

        public void expand​(boolean bDeleteFromNode)
        Expand so that each leaf is complete (except for ID)
        Parameters:
        bDeleteFromNode - if true, removes all intermediate elements and attributes
      • expandLeaf

        public void expandLeaf()
        expand a leaf to contain the data of all intermediate leaves
      • getRootPartAtts

        public VString getRootPartAtts()
        get the list of attributes that are administrative only
        Returns:
        the VString that lists all adminstrative and partition keys
      • collapse

        @Deprecated
        public void collapse​(boolean bCollapseToNode)
        Deprecated.
        - use 2 parameter version
        collapse all redundant attributes and elements
        Parameters:
        bCollapseToNode - only collapse redundant attriutes and elements that pre-exist in the nodes
      • collapse

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

        public boolean unpartition​(boolean bForce)
        unpartition this resource by collapsing and removing any empty leaves
        Parameters:
        bForce - if true force collapse by removing non-identical elements
        Returns:
        true if successfully unpartitioned
      • spawnPart

        @Deprecated
        public void spawnPart​(java.lang.String spawnID,
                              JDFResource.EnumSpawnStatus spawnStatus,
                              VJDFAttributeMap vParts,
                              boolean bStayInMain)
        Deprecated.
        use JDFSpawn.spawnPart
        Spawns a given partition for a given SpawnID
        Parameters:
        spawnID - the SpawnID that it was spawned with
        spawnStatus - SpawnStatus to spawn this resource with
        vParts - vector of partitions that it was spawned with
        bStayInMain - if true, the function is applied to the main JDF, else to the spawned JDF
      • unSpawnPart

        public void unSpawnPart​(java.lang.String spawnID,
                                JDFResource.EnumSpawnStatus spawnStatus)
        Find the appropriate partition for a given SpawnID and undo the spawn procedure
        Parameters:
        spawnID - the SpawnID that it was spawned with
        spawnStatus - SpawnStatus this resource was spawned with
      • getNodesWithSpawnID

        public java.util.List<JDFResource> getNodesWithSpawnID​(java.lang.String spawnID)
        Gets of 'this' all leaves and intermediate nodes that have an explicit spawnID set
        Parameters:
        spawnID - the spawnID to look for
        Returns:
        VElement - the vector of nodes or leaves of 'this' that contain spawnID
      • getPartitionVector

        @Deprecated
        public VElement getPartitionVector​(JDFAttributeMap m,
                                           boolean bIncomplete)
        Deprecated.
        use getPartitionVector(JDFAttributeMap m, EnumPartUsage partUsage)
        Gets the vector of parts (resource leaves or nodes) that match mAttribute
        Parameters:
        m - the map of key-value partitions (where key - PartIDKey, value - its value)
        bIncomplete - if true, also accept nodes that are are not completely specified in the partmap,
        e.g. if partitioned by run, RunPage and only Run is specified
        Returns:
        VElement - the vector of matching resource leaves or nodes
      • getPartitionVector

        public VElement getPartitionVector​(VJDFAttributeMap vm,
                                           JDFResource.EnumPartUsage partUsage)
        Gets the vector of parts (resource leaves or nodes) that match mAttribute
        Parameters:
        vm - the map of key-value partitions (where key - PartIDKey, value - its value)
        partUsage - also accept nodes that are are not completely specified in the partmap, e.g. if partitioned by run, RunPage and only Run is specified
        Returns:
        VElement - the vector of matching resource leaves or nodes
      • getPartitionLeafVector

        public VElement getPartitionLeafVector​(JDFAttributeMap m,
                                               JDFResource.EnumPartUsage partUsage)
        Gets the vector of parts (resource leaves or nodes) that match mAttribute
        Parameters:
        m - the map of key-value partitions (where key - PartIDKey, value - its value)
        partUsage - also accept nodes that are are not completely specified in the partmap, e.g. if partitioned by run, RunPage and only Run is specified
        Returns:
        VElement - the vector of matching resource leaves or nodes
      • getPartitionVector

        public VElement getPartitionVector​(JDFAttributeMap m,
                                           JDFResource.EnumPartUsage partUsage)
        Gets the vector of parts (resource leaves or nodes) that match mAttribute
        Parameters:
        m - the map of key-value partitions (where key - PartIDKey, value - its value)
        partUsage - also accept nodes that are are not completely specified in the partmap, e.g. if partitioned by run, RunPage and only Run is specified
        Returns:
        VElement - the vector of matching resource leaves or nodes
      • getPartitionVector

        @Deprecated
        public VElement getPartitionVector​(JDFResource.EnumPartIDKey key,
                                           java.lang.String value,
                                           boolean bIncomplete)
        Deprecated.
        use getPartitionVector(JDFAttributeMap m, EnumPartUsage partUsage)
        Gets the vector of parts that matches specified key-value pair
        Parameters:
        key - the PartIDKey attribute name
        value - the string value of the partition key
        bIncomplete -
        Returns:
        VElement - the vector matching resource leaves or nodes
      • getIDPrefix

        protected java.lang.String getIDPrefix()
        gets a prefix for ID creation for the element
        Overrides:
        getIDPrefix in class KElement
        Returns:
        String - a prefix for ID creation
      • getPartMapVector

        public VJDFAttributeMap getPartMapVector​(boolean bIntermediate)
        Gets a vector of maps of all partition attribute key-value pairs for this node and all its children
        Parameters:
        bIntermediate - if true also includes intermediate nodes including this
        Returns:
        VJDFAttributeMap - the vector of partition attribute maps for this leaf / node and all its children
      • reducePartVector

        public VJDFAttributeMap reducePartVector​(VJDFAttributeMap vParts)
        Finds the canonical vector of parts that defines the vector of parts that fits to vParts. If all children of a parent node are in vParts, they are replaced by their parent.
        for example the canonical vector of all leaves is the root
        Parameters:
        vParts - the vector of parts to check against 'this'
        Returns:
        VJDFAttributeMap the canonical vector
      • newModifiedID

        public java.lang.String newModifiedID()
        Generates the id of a modified resource
        Returns:
        String the new id
        Throws:
        JDFException - if there are too many equivalent modified resources
      • getResourcePool

        public JDFResourcePool getResourcePool()
        Gets the resourcepool that 'this' lives in
        Returns:
        JDFResourcePool the ResourcePool where 'this' lives
      • isResourceRoot

        public boolean isResourceRoot()
        Tests, whether the first ancestor of 'this' is in ValidParentNodeNames - must be one of: DropItemIntent,CustomerInfo,NodeInfo,ResourcePool,PipeParams ,ResourceInfo,ResourceCmdParams
        Returns:
        boolean true, if 'this' is a root resource
      • isResourceRootRoot

        public boolean isResourceRootRoot()
        Tests, whether the first ancestor of 'this' is in validRootParentNodeNames()
        must be one of: ResourcePool,PipeParams,ResourceInfo,ResourceCmdParams
        Returns:
        boolean - true if this lives as a root resource in the ResourcePool
      • updateAttributeFromLeaves

        public java.lang.String updateAttributeFromLeaves​(java.lang.String attName,
                                                          java.lang.String nsURI,
                                                          boolean bDirect)
        update vattribute value to the value of the attribute in the leaves
        Parameters:
        attName -
        nsURI -
        bDirect -
        Returns:
        the updated value, null in case they were not identical
      • updateAmounts

        public void updateAmounts​(boolean keepPrevious)
        update the amount of a resource based on the connected resource links Only Condition="Good" is counted if no explicit partioning by condition is specified
        Parameters:
        keepPrevious - if true, the previous amounts etc. are retained, if false they are completely recalculated from the linkx
        Since:
        2011.1.15 note the change of interface. The prior usage of previousamount was inheritently flawed. Update note: if you used a previousAmount!=0, you probably want to use keepPrevious=false whereas a 0 value retains the orignal value (leepPrevious=true)
      • getChildElementVector

        public VElement getChildElementVector​(java.lang.String element,
                                              java.lang.String nameSpaceURI,
                                              JDFAttributeMap mAttrib,
                                              boolean bAnd,
                                              int maxSize,
                                              boolean bResolveTarget)
        Gets all children from the actual element matching the given conditions also get the non-overwritten elements in the parents for partitioned resources
        Overrides:
        getChildElementVector in class JDFElement
        Parameters:
        element - elementname you are searching for
        nameSpaceURI - nameSpace you are searching for
        mAttrib - attributes you are lokking for
        bAnd - if true, a child is only added if it has all attributes specified in Attributes mAttrib
        maxSize - maximum size of the element vector
        bResolveTarget - if true, IDRef elements are followed, dummy at this level but needed in JDFElement
        Returns:
        VElement - vector with all found elements
        See Also:
        default: getChildElementVector(null, null,null, true, 0, false)
      • getImplicitPartitions

        public java.util.Vector<JDFResource.EnumPartIDKey> getImplicitPartitions()
        Gets a list of all partition keys that this resource may be implicitly partitioned by, e.g. RunIndex for RunList...
        gets overridden in subclasses
        Returns:
        Vector of EnumPartIDKey
      • isPartitioningCompatible

        public boolean isPartitioningCompatible​(JDFResource other)
        Tests if the given resources are compatible regarding their partitioning. The resources are compatible if the PartIDKeys for the common start sequence of the PartIDKeys vectors are the same. The resources are not compatible if one has PartIDKeys and the other not.
        Parameters:
        other - the other resource to check.
        Returns:
        boolean - true if partitioning of the other resource is compatible with this resource.
      • isPartitioningCompatible

        public boolean isPartitioningCompatible​(VString vsPartitions)
        Tests if the resource is compatible with the given partition keys. The resource is compatible if all PartIDKeys in vsPartitions are contained in this, regardless of sequence The resource is not compatible if one has PartIDKeys and the other not.
        Parameters:
        vsPartitions - the given partition keys to compare
        Returns:
        boolean - true if partitioning is compatible with this resource.
      • isSpawnAllowed

        public boolean isSpawnAllowed()
        Tests if a spawn of the given partition of the resource is allowed (by means of the JDF specification).
        Returns:
        boolean - true if spawn is allowed.
      • getCreateContact

        public JDFContact getCreateContact()
        Gets of 'this' child Contact element, optionally creates it, if it doesn't exist.
        Returns:
        JDFContact - the matching Contact element
      • getContact

        public JDFContact getContact()
        Gets of 'this' an existing child Contact element
        Returns:
        JDFContact the matching Contact element
      • appendContact

        public JDFContact appendContact()
        Appends new Contact element to the end of 'this'
        Returns:
        JDFContact - newly created child Contact element
      • getCreateLocationElement

        public JDFLocation getCreateLocationElement()
        Gets of 'this' child Location element, optionally creates it, if it doesn't exist.
        Returns:
        JDFLocation - the matching Location element
      • getLocationElement

        public JDFLocation getLocationElement()
        Gets of 'this' an existing child Location element
        Returns:
        JDFLocation - element Location
      • appendLocationElement

        public JDFLocation appendLocationElement()
        Appends new child Location element to the end of 'this'
        Returns:
        JDFLocation - newly created child Location element
      • createSourceResource

        public JDFSourceResource createSourceResource​(JDFResource source)
        create a sourceresource element that pints to source
        Parameters:
        source - the resource to reference
        Returns:
        JDFSourceResource - the element
      • appendSourceResource

        public JDFSourceResource appendSourceResource()
        appends a new SourceResource element
        Returns:
        JDFSourceResource - the new sourceresource
      • getSourceResource

        public JDFSourceResource getSourceResource​(int i)
        gets an existing SourceResource element
        Parameters:
        i - the i'th sourceResource to get, 0=first etc.
        Returns:
        JDFSourceResource - the sourceresource
      • getCreateIdentificationField

        public JDFIdentificationField getCreateIdentificationField​(int iSkip)
        Gets of 'this' the iSkip-th IdentificationField element, optionally creates it, if it doesn't exist. If iSkip is more than one larger than the number of elements, only one will be created and appended.
        Parameters:
        iSkip - number of child IdentificationField elements to skip
        Returns:
        JDFIdentificationField - the matching IdentificationField element default: getIdentificationField(0)
      • getIdentificationField

        public JDFIdentificationField getIdentificationField​(int iSkip)
        Gets of 'this' the iSkip-th child IdentificationField element
        Parameters:
        iSkip - number of child IdentificationField elements to skip, default=0
        Returns:
        JDFIdentificationField - the matching IdentificationField element
      • appendIdentificationField

        public JDFIdentificationField appendIdentificationField()
        Appends new child IdentificationField element to the end of 'this'
        Returns:
        JDFIdentificationField - newly created child IdentificationField element
      • getIdenticalMap

        public JDFAttributeMap getIdenticalMap()
        return the PartMap of ./Identical/Part, or null if it does not exist
        Returns:
        JDFAttributeMapthe - map of the part in the identical element
      • getIdentical

        public JDFIdentical getIdentical()
        get the identical element,
        Returns:
        JDFIdentical - the identical element, null if noen exists
      • getIdenticalTarget

        public JDFResource getIdenticalTarget()
        get the target of the identical element, this if no identical exists
        Returns:
        JDFResource - the resource referenced by the identical element, this resource if no identical exists
      • getCreateIdentical

        public JDFIdentical getCreateIdentical()
        get or create the identical element,
        Returns:
        JDFIdentical - the identical element
      • appendIdentical

        public JDFIdentical appendIdentical()
        append an identical element,
        Returns:
        JDFIdentical - the identical element
        Throws:
        JDFException - if an Identical already exists
      • setIdentical

        public void setIdentical​(VJDFAttributeMap vPartMap)
        Sets the 1st-nth element as identical to the 0th elemennt ov vPartMap i.e. the partition leaves that match vPartMap[1]...vPartMap[size-1] are set identical to vPartMap[0]
        Parameters:
        vPartMap - VJDFAttributeMap to correspond to
      • setIdentical

        public void setIdentical​(JDFResource target)
        Appends new child Identifical element that refers to target also removes all subelements and attributes If an identical already exists, the part element is overwritten
        Parameters:
        target - the resource leaf that this leaf should reference as identical
      • getCreateQualityControlResult

        public JDFQualityControlResult getCreateQualityControlResult​(int iSkip)
        Gets of 'this' the iSkip-th QualityControlResult element, optionally creates it, if it doesn't exist. If iSkip is more than one larger that the number of elements, only one will be created and appended.
        Parameters:
        iSkip - number of child QualityControlResult elements to skip
        Returns:
        JDFQualityControlResult - the matching QualityControlResult element
      • getQualityControlResult

        public JDFQualityControlResult getQualityControlResult​(int iSkip)
        Gets of 'this' the iSkip-th child QualityControlResult element
        Parameters:
        iSkip - number of child QualityControlResult elements to skip, default=0
        Returns:
        JDFQualityControlResult the matching QualityControlResult element
      • appendQualityControlResult

        public JDFQualityControlResult appendQualityControlResult()
        Appends new child QualityControlResult element to the end of 'this'
        Returns:
        JDFQualityControlResult - newly created child QualityControlResult element
      • getUpdate

        @Deprecated
        public JDFResource getUpdate​(int iSkip)
        Deprecated.
        updates never really took off in JDF
        Gets of 'this' the iSkip-th child Update element
        Parameters:
        iSkip - number of child Update elements to skip
        Returns:
        JDFResource the matching Resource Update element
      • getUpdate

        @Deprecated
        public JDFResource getUpdate​(java.lang.String updateID)
        Deprecated.
        updates never really took off in JDF
        Gets of 'this' child Update element with an appropriate UpdateID
        Parameters:
        updateID - UpdateID of the element to get
        Returns:
        JDFResource the matching Update element
      • getUpdateVector

        @Deprecated
        public VElement getUpdateVector()
        Deprecated.
        updates never really took off in JDF
        Gets of 'this' a vector of all Update elements
        Returns:
        VElement vector of all Resource Update elements in 'this'
      • removeUpdate

        @Deprecated
        public void removeUpdate​(java.lang.String updateID)
        Deprecated.
        updates never really took off in JDF
        Removes of 'this' child Update element with an appropriate UpdateID
        Parameters:
        updateID - UpdateID of the element to remove
      • removeUpdate

        @Deprecated
        public void removeUpdate​(int iSkip)
        Deprecated.
        updates never really took off in JDF
        Removes of 'this' the iSkip-th child Update element
        Parameters:
        iSkip - number of child Update elements to skip
      • appendUpdate

        @Deprecated
        public JDFResource appendUpdate​(java.lang.String updateID)
        Deprecated.
        updates never really took off in JDF
        Appends to 'this' a resource Update element with an appropriate UpdateID
        Parameters:
        updateID - updateID of the new Update element
        Returns:
        JDFResource newly created Resource Update element
        Throws:
        JDFException - if Update element with such ID already exists
      • numUpdates

        @Deprecated
        public int numUpdates()
        Deprecated.
        updates never really took off in JDF
        Gets of 'this' the number of child Update elements
        Returns:
        int - number of Update elements in 'this'
      • hasUpdate

        @Deprecated
        public boolean hasUpdate()
        Deprecated.
        updates never really took off in JDF
        Tests, whether in 'this' any child Update elements already exist
        Returns:
        boolean - true, if 'this' has already one or more Update elements
      • getUpdateName

        @Deprecated
        public java.lang.String getUpdateName()
        Deprecated.
        updates never really took off in JDF
        Gets the qualified node name of resource Update based on 'this'
        Returns:
        String - the mangled node name
      • setAgentName

        public void setAgentName​(java.lang.String value)
        Sets attribute AgentName
        Parameters:
        value - the value to set the attribute to
      • getAgentName

        public java.lang.String getAgentName()
        Gets string attribute AgentName
        Returns:
        String - the attribute value
      • setAgentVersion

        public void setAgentVersion​(java.lang.String value)
        Sets attribute AgentVersion
        Parameters:
        value - the value to set the attribute to
      • getAgentVersion

        public java.lang.String getAgentVersion()
        Gets string attribute AgentVersion
        Returns:
        String the - attribute value
      • setAlternateBrand

        public void setAlternateBrand​(java.lang.String value)
        Sets attribute AlternateBrand
        Parameters:
        value - value to set the attribute to
      • getAlternateBrand

        public java.lang.String getAlternateBrand()
        Gets string attribute AlternateBrand
        Returns:
        String - the attribute value
      • setAmount

        public void setAmount​(double amount)
        Sets attribute Amount
        Parameters:
        amount - value to set the attribute to
      • getAmount

        public double getAmount()
        Gets double attribute Amount
        Returns:
        double - the attribute value
      • setAmountProduced

        public void setAmountProduced​(double value)
        Sets attribute AmountProduced
        Parameters:
        value - value to set the attribute to
      • getAmountProduced

        public double getAmountProduced()
        Gets double attribute AmountProduced
        Returns:
        double - the attribute value
      • setAmountRequired

        public void setAmountRequired​(double value)
        Sets attribute AmountRequired
        Parameters:
        value - value to set the attribute to
      • getAmountRequired

        public double getAmountRequired()
        Gets double attribute AmountRequired
        Returns:
        double - the attribute value
      • setAuthor

        public void setAuthor​(java.lang.String value)
        Sets attribute Author
        Parameters:
        value - the value to set the attribute to
      • getAuthor

        public java.lang.String getAuthor()
        Gets string attribute Author
        Returns:
        String - the attribute value
      • setBatchID

        public void setBatchID​(java.lang.String value)
        Sets attribute BatchID
        Parameters:
        value - value to set the attribute to
      • getBatchID

        public java.lang.String getBatchID()
        Gets string attribute BatchID
        Returns:
        String - the attribute value
      • setBinderySignatureName

        public void setBinderySignatureName​(java.lang.String value)
        Sets attribute BinderySignatureName
        Parameters:
        value - the value to set the attribute to
      • getBinderySignatureName

        public java.lang.String getBinderySignatureName()
        Gets string attribute BinderySignatureName
        Returns:
        String - the attribute value
      • setBlockName

        public void setBlockName​(java.lang.String value)
        Sets attribute BlockName
        Parameters:
        value - the value to set the attribute to
      • getBlockName

        public java.lang.String getBlockName()
        Gets string attribute BlockName
        Returns:
        String - the attribute value
      • setBrand

        public void setBrand​(java.lang.String value)
        Sets attribute Brand
        Parameters:
        value - value to set the attribute to
      • getBrand

        public java.lang.String getBrand()
        Gets string attribute Brand
        Returns:
        String - the attribute value
      • setBundleItemIndex

        public void setBundleItemIndex​(JDFIntegerRangeList value)
        Sets attribute BundleItemIndex
        Parameters:
        value - the value to set the attribute to
      • getBundleItemIndex

        public JDFIntegerRangeList getBundleItemIndex()
        Gets range attribute BundleItemIndex
        Returns:
        JDFIntegerRangeList - the attribute value
      • setCatalogDetails

        public void setCatalogDetails​(java.lang.String value)
        Sets attribute CatalogDetails
        Parameters:
        value - the value to set the attribute to
      • getCatalogDetails

        public java.lang.String getCatalogDetails()
        Gets string attribute CatalogDetails
        Returns:
        String - the attribute value
      • setCatalogID

        public void setCatalogID​(java.lang.String value)
        Sets attribute CatalogID
        Parameters:
        value - the value to set the attribute to
      • getCatalogID

        public java.lang.String getCatalogID()
        Gets string attribute CatalogID
        Returns:
        String - the attribute value
      • setCellIndex

        public void setCellIndex​(JDFIntegerRangeList value)
        Sets attribute CellIndex
        Parameters:
        value - the value to set the attribute to
      • getCellIndex

        public JDFIntegerRangeList getCellIndex()
        Gets range attribute CellIndex
        Returns:
        JDFIntegerRangeList - the attribute value
      • setCondition

        public void setCondition​(java.lang.String value)
        Sets attribute Condition
        Parameters:
        value - the value to set the attribute to
      • getCondition

        public java.lang.String getCondition()
        Gets string attribute Condition
        Returns:
        String - the attribute value
      • setDocCopies

        public void setDocCopies​(JDFIntegerRangeList value)
        Sets attribute DocCopies
        Parameters:
        value - the value to set the attribute to
      • getDocCopies

        public JDFIntegerRangeList getDocCopies()
        Gets range attribute DocCopies
        Returns:
        JDFIntegerRangeList the attribute value
      • setDocIndex

        public void setDocIndex​(JDFIntegerRangeList value)
        Sets attribute DocIndex
        Parameters:
        value - the value to set the attribute to
      • getDocIndex

        public JDFIntegerRangeList getDocIndex()
        Gets range attribute DocIndex
        Returns:
        JDFIntegerRangeList - the attribute value
      • setDeliveryUnit

        public void setDeliveryUnit​(int iUnit,
                                    java.lang.String value)
        Sets attribute DeliveryUnit
        Parameters:
        iUnit - a value between 0 and 9 to set DeliveryUnit
        value - the value to set the attribute to
      • getDeliveryUnit

        public java.lang.String getDeliveryUnit​(int iUnit)
        Gets attribute DeliveryUnit
        Parameters:
        iUnit - a value between 0 and 9 to set DeliveryUnit
        Returns:
        String - the attribute value
      • setDocRunIndex

        public void setDocRunIndex​(JDFIntegerRangeList value)
        Sets attribute DocRunIndex
        Parameters:
        value - the value to set the attribute to
      • getDocRunIndex

        public JDFIntegerRangeList getDocRunIndex()
        Gets range attribute DocRunIndex
        Returns:
        JDFIntegerRangeList the attribute value
      • setDocSheetIndex

        public void setDocSheetIndex​(JDFIntegerRangeList value)
        Sets attribute DocSheetIndex
        Parameters:
        value - the value to set the attribute to
      • getDocSheetIndex

        public JDFIntegerRangeList getDocSheetIndex()
        Gets range attribute DocSheetIndex
        Returns:
        JDFIntegerRangeList - the attribute value
      • setFountainNumber

        public void setFountainNumber​(int value)
        Sets attribute FountainNumber
        Parameters:
        value - the value to set the attribute to
      • getFountainNumber

        public int getFountainNumber()
        Gets integer attribute FountainNumber
        Returns:
        int - the attribute value
      • setItemNames

        public void setItemNames​(java.lang.String value)
        Sets attribute ItemNames
        Parameters:
        value - the value to set the attribute to
      • getItemNames

        public java.lang.String getItemNames()
        Gets string attribute ItemNames
        Returns:
        String - the attribute value
      • setLayerIDs

        public void setLayerIDs​(JDFIntegerRangeList value)
        Sets attribute LayerIDs
        Parameters:
        value - the value to set the attribute to
      • getLayerIDs

        public JDFIntegerRangeList getLayerIDs()
        Gets range attribute LayerIDs
        Returns:
        JDFIntegerRangeList - the attribute value
      • setLocation

        public void setLocation​(java.lang.String value)
        Sets attribute Location
        Parameters:
        value - the value to set the attribute to
      • getLocation

        public java.lang.String getLocation()
        Gets string attribute Location
        Returns:
        - String the attribute value
      • setLocked

        public void setLocked​(boolean value)
        Sets attribute Locked
        Parameters:
        value - the value to set the attribute to
      • getLocked

        public boolean getLocked()
        Gets boolean attribute Locked; defaults to false.
        Returns:
        boolean the attribute value
      • setNoOp

        public void setNoOp​(boolean value)
        Sets attribute NoOp
        Parameters:
        value - the value to set the attribute to
      • getNoOp

        public boolean getNoOp()
        Gets boolean attribute NoOp; defaults to false
        Returns:
        boolean - the attribute value
      • setOption

        public void setOption​(java.lang.String value)
        Sets attribute Option
        Parameters:
        value - the value to set the attribute to
      • getOption

        public java.lang.String getOption()
        Gets string attribute Option
        Returns:
        String - the attribute value
      • setPageNumber

        public void setPageNumber​(JDFIntegerRangeList value)
        Sets attribute PageNumber
        Parameters:
        value - the value to set the attribute to
      • getPageNumber

        public JDFIntegerRangeList getPageNumber()
        Gets range attribute PageNumber
        Returns:
        JDFIntegerRangeList - the attribute value
      • addPartIDKey

        public void addPartIDKey​(JDFResource.EnumPartIDKey partType)
        Adds a new PartIDKey to the root first checks for existence
        Parameters:
        partType - new PartIDKey to add
        Throws:
        JDFException - if here is an attempt to add implicit partition
      • getParentPartition

        public JDFResource getParentPartition()
        get the intermediate or root partition of this, null if we are the root
        Returns:
      • getPartIDKeys

        public VString getPartIDKeys()
        Gets a list of all valid part keys for this resource
        Returns:
        VString - list of all PartIDKeys
      • getPartIDKeyList

        public StringArray getPartIDKeyList()
        Gets a list of all valid part keys for this resource
        Returns:
        VString - list of all PartIDKeys
      • setPartUsage

        public void setPartUsage​(JDFResource.EnumPartUsage value)
        Sets attribute PartUsage
        Parameters:
        value - enumeration value of the attribute PartUsage to be set
      • setUnpartitiondImplicit

        public static void setUnpartitiondImplicit​(boolean bUnpartitiondImplicit)
        if set to true, the default @PartUsage of unpartitioned resources is Implicit. Note: this is NOT according to the specification since the Specification defaults PartUsage to Explicit for all Resources.
        Parameters:
        bUnpartitiondImplicit - the bUnpartitiondImplicit to set
      • getPartUsage

        public JDFResource.EnumPartUsage getPartUsage()
        Gets typesafe enumerated value of attribute PartUsage; defaults to PartUsage_Explicit unless setUnpartitiondImplicit(true) has been called and the resource is not partitioned, in which case PartUsage_Implicit is called. Achtung - mieser Balkon!
        Returns:
        EnumPartUsage - attribute enumeration value
      • setLotControl

        public void setLotControl​(JDFResource.EnumLotControl value)
        Sets attribute PartUsage
        Parameters:
        value - enumeration value of the attribute PartUsage to be set
      • getLotControl

        public JDFResource.EnumLotControl getLotControl()
        Gets typesafe enumerated value of attribute LotControl; defaults to LotControl_Explicit
        Returns:
        EnumLotControl - attribute enumeration value
      • setPartVersion

        public void setPartVersion​(java.lang.String value)
        Sets attribute PartVersion
        Parameters:
        value - the value to set the attribute to
      • getPartVersion

        public java.lang.String getPartVersion()
        Gets string attribute PartVersion
        Returns:
        String - the attribute value
      • setPipeID

        public void setPipeID​(java.lang.String value)
        Sets attribute PipeID
        Parameters:
        value - the value to set the attribute to
      • getPipeID

        public java.lang.String getPipeID()
        Gets string attribute PipeID
        Returns:
        String - the attribute value
      • hasPipePartIDKey

        public boolean hasPipePartIDKey​(JDFResource.EnumPartIDKey key)
        Tests, if this leaf has a PipePartIDKey as specified by key
        Parameters:
        key - the PipePartIDKey attribute name
        Returns:
        boolean - true, if key exists in this leaf or below
        Throws:
        JDFException - if the specified key is illegal
      • consistentPipePartIDKeys

        public boolean consistentPipePartIDKeys​(JDFResource.EnumPartIDKey key)
        Tests, if this leaf has a consistent PartIDKey as specified by key
        Parameters:
        key - the PipePartIDKey attribute name
        Returns:
        boolean - true, if key exists in this leaf is in PipePartIDKeys
      • containsData

        public boolean containsData()
        Returns:
        true if anything but id, class etc are specified.
      • addPipePartIDKey

        public void addPipePartIDKey​(JDFResource.EnumPartIDKey partType)
        Adds a new PipePartIDKey to the root, first checks for existence
        Parameters:
        partType - new PipePartIDKey to add
        Throws:
        JDFException - if here is an attempt to add implicit partition
      • setPipePartIDKey

        public void setPipePartIDKey​(JDFResource.EnumPartIDKey key,
                                     java.lang.String value)
        Sets the value of attibute, specified by key
        Parameters:
        key - the PipePartIDKey attribute name
        value - the value to set key to
      • getPipePartIDKeysEnum

        public java.util.Vector<JDFResource.EnumPartIDKey> getPipePartIDKeysEnum()
        Gets a list of all valid pipe part key enums for this resource
        Returns:
        Vector - list of all PipePartIDKey enums
      • getPipePartIDKeys

        @Deprecated
        public VString getPipePartIDKeys()
        Deprecated.
        Gets a list of all valid pipe part keys for this resource
        Returns:
        VString list of all PipePartIDKeys
      • setPipeProtocol

        public void setPipeProtocol​(java.lang.String value)
        Set attribute PipeProtocol
        Parameters:
        value - the value to set the attribute to
      • getPipeProtocol

        public java.lang.String getPipeProtocol()
        Get string attribute PipeProtocol
        Returns:
        String - the attribute value
      • setPipeURL

        public void setPipeURL​(java.lang.String value)
        Sets attribute PipeURL
        Parameters:
        value - the value to set the attribute to
      • getPipeURL

        public java.lang.String getPipeURL()
        Gets string attribute PipeURL
        Returns:
        String - the attribute value
      • setPreflightRule

        public void setPreflightRule​(java.lang.String value)
        Sets attribute PreflightRule
        Parameters:
        value - the value to set the attribute to
      • getPreflightRule

        public java.lang.String getPreflightRule()
        Gets string attribute PreflightRule
        Returns:
        String the attribute value
      • setPreviewType

        public void setPreviewType​(JDFAutoPart.EnumPreviewType value)
        Sets attribute PreviewType
        Parameters:
        value - enumeration value of attribute PreviewType to be set
      • getPreviewType

        public JDFAutoPart.EnumPreviewType getPreviewType()
        Gets typesafe enumerated value of attribute PreviewType
        Returns:
        JDFPart.EnumPreviewType - the enumeration value of attribute
      • setProductID

        public void setProductID​(java.lang.String value)
        Sets attribute ProductID
        Parameters:
        value - value to set the attribute to
      • getProductID

        public java.lang.String getProductID()
        Gets string attribute ProductID
        Returns:
        String - the attribute value
      • setResourceClass

        public void setResourceClass​(JDFResource.EnumResourceClass value)
        Sets attribute Class corresponds to C++ JDFResource::SetClass()
        Parameters:
        value - enumeration value of the attribute Class to be set
        Throws:
        JDFException - if here is attempt to set value as Class_Unknown or invalid class value
      • getResourceClass

        public JDFResource.EnumResourceClass getResourceClass()
        Gets typesafe enumerated value of attribute Class corresponds to C++ JDFResource::GetClass(), getClass() already exists in Java
        Returns:
        EnumResourceClass - attribute enumeration value
      • validResourceClass

        public boolean validResourceClass​(JDFElement.EnumValidationLevel level)
        Typesafe attribute validation of Class corresponds to C++ JDFResource::ValidClass()
        Parameters:
        level - level of attribute validation
        Returns:
        boolean - true, if valid
      • validClass

        public final boolean validClass()
        Typesafe attribute validation of Class corresponds to C++ JDFResource::ValidClass()
        Returns:
        boolean true, if valid
      • getValidClass

        public JDFResource.EnumResourceClass getValidClass()
        get the fixed class for this resource,
        Returns:
        EnumResourceClass - the class of this resource, null if no fixed class is known
      • setGrossWeight

        public void setGrossWeight​(double value)
        Sets attribute GrossWeight
        Parameters:
        value - value to set the attribute to
      • getGrossWeight

        public double getGrossWeight()
        Gets double attribute GrossWeight
        Returns:
        double - the attribute value
      • setResourceWeight

        public void setResourceWeight​(double value)
        Sets attribute ResourceWeight
        Parameters:
        value - value to set the attribute to
      • getResourceWeight

        public double getResourceWeight()
        Gets double attribute ResourceWeight
        Returns:
        double - the attribute value
      • setRibbonName

        public void setRibbonName​(java.lang.String value)
        Sets attribute RibbonName
        Parameters:
        value - the value to set the attribute to
      • getManufacturer

        public java.lang.String getManufacturer()
        Gets string attribute Manufacturer
        Returns:
        String the - attribute value
      • setManufacturer

        public void setManufacturer​(java.lang.String value)
        Sets attribute Manufacturer
        Parameters:
        value - the value to set the attribute to
      • getRibbonName

        public java.lang.String getRibbonName()
        Gets string attribute RibbonName
        Returns:
        String the - attribute value
      • setRun

        public void setRun​(java.lang.String value)
        Sets attribute Run
        Parameters:
        value - the value to set the attribute to
      • getRunSet

        public java.lang.String getRunSet()
        Gets string attribute RunSet
        Returns:
        String - the attribute value
      • setRunSet

        public void setRunSet​(java.lang.String value)
        Sets attribute RunSet
        Parameters:
        value - the value to set the attribute to
      • getRun

        public java.lang.String getRun()
        Gets string attribute Run
        Returns:
        String - the attribute value
      • setRunIndex

        public void setRunIndex​(JDFIntegerRangeList value)
        Sets attribute RunIndex
        Parameters:
        value - the value to set the attribute to
      • getRunIndex

        public JDFIntegerRangeList getRunIndex()
        Gets range attribute RunIndex
        Returns:
        JDFIntegerRangeList the attribute value
      • setRunPage

        public void setRunPage​(int value)
        Sets attribute RunPage
        Parameters:
        value - the value to set the attribute to
      • getRunPage

        public int getRunPage()
        Gets integer attribute RunPage
        Returns:
        int - the attribute value
      • setRunTags

        public void setRunTags​(VString value)
        Sets attribute RunTags
        Parameters:
        value - the value to set the attribute to
      • getRunTags

        public VString getRunTags()
        Gets NMTOKENS attribute RunTags
        Returns:
        VString - the value of the attribute
      • setSectionIndex

        public void setSectionIndex​(JDFIntegerRangeList value)
        Sets attribute SectionIndex
        Parameters:
        value - the value to set the attribute to
      • getSectionIndex

        public JDFIntegerRangeList getSectionIndex()
        Gets range attribute SectionIndex
        Returns:
        JDFIntegerRangeList - the attribute value
      • setSeparation

        public void setSeparation​(java.lang.String value)
        Sets attribute Separation
        Parameters:
        value - the value to set the attribute to
      • getSeparation

        public java.lang.String getSeparation()
        Gets string attribute Separation
        Returns:
        String - the attribute value
      • setSetDocIndex

        public void setSetDocIndex​(JDFIntegerRangeList value)
        Sets attribute SetDocIndex
        Parameters:
        value - the value to set the attribute to
      • getSetDocIndex

        public JDFIntegerRangeList getSetDocIndex()
        Gets range attribute SetDocIndex
        Returns:
        JDFIntegerRangeList - the attribute value
      • setSetIndex

        public void setSetIndex​(JDFIntegerRangeList value)
        Sets attribute SetIndex
        Parameters:
        value - the value to set the attribute to
      • getSetIndex

        public JDFIntegerRangeList getSetIndex()
        Gets range attribute SetIndex
        Returns:
        JDFIntegerRangeList - the attribute value
      • setSetRunIndex

        public void setSetRunIndex​(JDFIntegerRangeList value)
        Sets attribute SetRunIndex
        Parameters:
        value - the value to set the attribute to
      • getSetRunIndex

        public JDFIntegerRangeList getSetRunIndex()
        Gets range attribute SetRunIndex
        Returns:
        JDFIntegerRangeList - the attribute value
      • setSetSheetIndex

        public void setSetSheetIndex​(JDFIntegerRangeList value)
        Sets attribute SetSheetIndex
        Parameters:
        value - the value to set the attribute to
      • getSetSheetIndex

        public JDFIntegerRangeList getSetSheetIndex()
        Gets range attribute SetSheetIndex
        Returns:
        JDFIntegerRangeList - the attribute value
      • setSheetIndex

        public void setSheetIndex​(JDFIntegerRangeList value)
        Sets attribute SheetIndex
        Parameters:
        value - the value to set the attribute to
      • getSheetIndex

        public JDFIntegerRangeList getSheetIndex()
        Gets range attribute SheetIndex
        Returns:
        JDFIntegerRangeList - the attribute value
      • setSheetName

        public void setSheetName​(java.lang.String value)
        Sets attribute SheetName
        Parameters:
        value - the value to set the attribute to
      • getSheetName

        public java.lang.String getSheetName()
        Gets string attribute SheetName
        Returns:
        String - the attribute value
      • setSide

        public void setSide​(JDFAutoPart.EnumSide value)
        Sets attribute Side
        Parameters:
        value - enumeration value of attribute Side to be set
      • getSide

        public JDFAutoPart.EnumSide getSide()
        Gets typesafe enumerated value of attribute Side
        Returns:
        JDFPart.EnumSide - the enumeration value of the attribute
      • setSignatureName

        public void setSignatureName​(java.lang.String value)
        Sets attribute SignatureName
        Parameters:
        value - the value to set the attribute to
      • getSignatureName

        public java.lang.String getSignatureName()
        Gets string attribute SignatureName
        Returns:
        String - the attribute value
      • getStationName

        public java.lang.String getStationName()
        Gets string attribute StationName
        Returns:
        String - the attribute value
      • setStationName

        public void setStationName​(java.lang.String value)
        Sets attribute StationName
        Parameters:
        value - the value to set the attribute to
      • setSortAmount

        public void setSortAmount​(boolean value)
        Sets attribute SortAmount
        Parameters:
        value - value to set the attribute to
      • getSortAmount

        public boolean getSortAmount()
        Gets boolean attribute SortAmount
        Returns:
        boolean - the attribute value
      • setSorting

        public void setSorting​(JDFIntegerRangeList value)
        Sets attribute Sorting
        Parameters:
        value - the value to set the attribute to
      • getSorting

        public JDFIntegerRangeList getSorting()
        Gets range attribute Sorting
        Returns:
        JDFIntegerRangeList - the attribute value
      • appendSpawnIDs

        public void appendSpawnIDs​(java.lang.String value)
        Appends new SpawnID token ('value') to the list of values of SpawnIDs attribute, if it is not yet in the list
        Parameters:
        value - the SpawnID token to append
      • removeFromSpawnIDs

        public int removeFromSpawnIDs​(java.lang.String value)
        Removes SpawnID token ('value') from the list of values of SpawnIDs attribute, if it is in the list
        Parameters:
        value - the SpawnID token to remove from the NMTOKENS list
        Returns:
        int - the number of removed tokens
      • getSpawnIDs

        public VString getSpawnIDs​(boolean bInherit)
        Gets string attribute SpawnIDs
        Parameters:
        bInherit - if true, searches through all leaves, else searches only this leaf/node
        Returns:
        VString the vector of SpawnIDs
      • setSpawnIDs

        public void setSpawnIDs​(VString vStr)
        Sets attribute SpawnIDs
        Parameters:
        vStr - the value to set the attribute to
      • setSpawnIDs

        public void setSpawnIDs​(java.lang.String spawndID)
        Sets attribute SpawnIDs
        Parameters:
        spawndID - the value to set the attribute to
      • setSpawnStatus

        public void setSpawnStatus​(JDFResource.EnumSpawnStatus s)
        Sets attribute SpawnStatus
        Parameters:
        s - enumeration value of the attribute SpawnStatus to be set
      • getSpawnStatus

        public JDFResource.EnumSpawnStatus getSpawnStatus()
        Gets typesafe enumerated value of attribute SpawnStatus
        Returns:
        EnumSpawnStatus - attribute enumeration value
      • setStatus

        @Deprecated
        public void setStatus​(JDFResource.EnumResStatus value)
        Deprecated.
        use setResStatus(value, false)
        Sets attribute Status
        Parameters:
        value - enumeration value of the attribute Status to be set
      • setStatus

        @Deprecated
        public void setStatus​(JDFResource.EnumResStatus value,
                              boolean bCleanLeaves)
        Deprecated.
        use setResStatus(value, bCleanLeaves)
        Sets attribute Status
        Parameters:
        value - enumeration value of the attribute Status to be set
        bCleanLeaves - if true, remove Status attribute from any child leaves below this
      • getStatus

        @Deprecated
        public JDFResource.EnumResStatus getStatus​(boolean bRecurseRefs)
        Deprecated.
        use getResStatus(bRecurseRefs)
        Gets typesafe enumerated value of attribute Status
        Parameters:
        bRecurseRefs - if bRecurseRefs is set, also recurse into all resources linked by rRefs and return the minimum status
        Returns:
        EnumResStatus attribute enumeration value
      • setResStatus

        public void setResStatus​(JDFResource.EnumResStatus value,
                                 boolean bCleanLeaves)
        Sets attribute Status
        Parameters:
        value - enumeration value of the attribute Status to be set
        bCleanLeaves - if true, remove Status attribute from any child leaves below this
      • getResStatus

        public JDFResource.EnumResStatus getResStatus​(boolean bRecurseRefs)
        Gets typesafe enumerated value of attribute Status
        Parameters:
        bRecurseRefs - if bRecurseRefs is set, also recurse into all resources linked by rRefs and return the minimum status
        Returns:
        EnumResStatus - attribute enumeration value
      • getStatusFromLeaves

        public JDFResource.EnumResStatus getStatusFromLeaves​(boolean bAll)
        Gets the minimum typesafe enumerated value of attribute Status from the value of all leaves
        Parameters:
        bAll - if true, also evaluate intermediate partitions, else leaves only
        Returns:
        EnumResStatus - the minimum Status enumeration value
      • setTileID

        public void setTileID​(JDFXYPair value)
        Sets attribute TileID
        Parameters:
        value - the value to set the attribute to
      • getTileID

        public JDFXYPair getTileID()
        Gets XYPair attribute TileID
        Returns:
        JDFXYPair - the attribute value
      • setUnit

        public void setUnit​(java.lang.String value)
        Sets attribute Unit
        Parameters:
        value - value to set the attribute to
      • getUnit

        public java.lang.String getUnit()
        Gets string attribute Unit
        Returns:
        String - the attribute value
      • setUpdateID

        public void setUpdateID​(java.lang.String value)
        Sets attribute UpdateID
        Parameters:
        value - value to set the attribute to
      • getUpdateID

        public java.lang.String getUpdateID()
        Gets string attribute UpdateID
        Returns:
        String - the attribute value
      • setWebName

        public void setWebName​(java.lang.String value)
        Sets attribute WebName
        Parameters:
        value - the value to set the attribute to
      • getWebName

        public java.lang.String getWebName()
        Gets string attribute WebName
        Returns:
        String - the attribute value
      • setWebProduct

        public void setWebProduct​(java.lang.String value)
        Sets attribute WebProduct
        Parameters:
        value - the value to set the attribute to
      • getWebProduct

        public java.lang.String getWebProduct()
        Gets string attribute WebProduct
        Returns:
        String the attribute value
      • setWebSetup

        public void setWebSetup​(java.lang.String value)
        Sets attribute WebSetup
        Parameters:
        value - the value to set the attribute to
      • getWebSetup

        public java.lang.String getWebSetup()
        Gets string attribute WebSetup
        Returns:
        String the attribute value
      • createPartitions

        public VElement createPartitions​(VJDFAttributeMap vPartMap,
                                         VString vPartIDKeys)
        Recursively adds the partition leaves defined in vPartMap
        Parameters:
        vPartMap - the vector of maps of part keys
        vPartIDKeys - the vector of partIDKeys strings of the resource. If empty (the default) the Resource PartIDKeys attribute is used
        Returns:
        VElement - vector of newly created partitions
        Throws:
        JDFException - if there are in the partMap not matching partitions
        JDFException - if there is an attempt to fill non-matching partIDKeys
        JDFException - if by adding of last partition key there is either non-continuous partmap or left more than one key
      • getInvalidAttributes

        public VString getInvalidAttributes​(JDFElement.EnumValidationLevel level,
                                            boolean bIgnorePrivate,
                                            int nMax)
        Typesafe validator. Gets a vector of invalid attributes
        Overrides:
        getInvalidAttributes in class JDFElement
        Parameters:
        level - flag whether incomplete elements are valid
        bIgnorePrivate - if true, do not validate attributes in private name spaces
        nMax - maximum size of the returned vector. Stop validation after nMax invalid attributes
        Returns:
        vWString a vector of invalid attributes
      • deleteUnLinked

        public boolean deleteUnLinked()
        deletes this if it is no longer linked by either resource refs or resource links
        Returns:
        true if this has been deleted
      • getAutoAgent

        public static boolean getAutoAgent()
        Returns:
        the autoAgent
      • setAutoAgent

        public static void setAutoAgent​(boolean _autoAgent)
        Parameters:
        _autoAgent - the autoAgent to set
      • matchesString

        public boolean matchesString​(java.lang.String namedResLink)
        check whether this resource matches a named resource string
        Parameters:
        namedResLink -
        Returns:
      • getAutoSubElementClass

        public static boolean getAutoSubElementClass()
        if true, subelements are initialized with a class attribute
        Returns:
      • setAutoSubElementClass

        public static void setAutoSubElementClass​(boolean autoSubElementClass)
        if true, subelements are initialized with a class attribute
        Parameters:
        autoSubElementClass -
      • getLeaf

        public JDFResource getLeaf​(int i)
        get a leaf, null if index out of bounds
        Parameters:
        i -
        Returns:
      • moveElement

        public KElement moveElement​(KElement src,
                                    KElement beforeChild)
        Description copied from class: KElement
        Moves src node (including all attributes and subelements) from its parent node into 'this' and inserts it in front of beforeChild, if it exists. Otherwise appends src to 'this'.
        If src is null, an empty KElement is returned.
        src is removed from its parent node. if the actual document owner is the same as the document owner of src, src is appended to 'this' If the documents are different, then src is appended to 'this' in the actual document.

        default: moveElement(src, null)

        Overrides:
        moveElement in class KElement
        Parameters:
        src - node to move.
        beforeChild - child of 'this' to insert src before. If beforeChild is null, src is appended to 'this'
        Returns:
        KElement src element after moving, null if src is null
      • copyElement

        public KElement copyElement​(KElement src,
                                    KElement beforeChild)
        Description copied from class: KElement
        Copies src node (including all attributes and subelements) and inserts the copy into 'this' in front of beforeChild, if it exists. Otherwise appends src node to 'this'.

        default: copyElement(src, null)

        Overrides:
        copyElement in class KElement
        Parameters:
        src - node to copy.
        beforeChild - child of 'this' to insert src before. If null, src is appended
        Returns:
        KElement the copied element, null if src is null.
      • replaceElement

        public KElement replaceElement​(KElement src)
        Description copied from class: KElement
        Replaces 'this' with src.
        If the actual document is the same as the src document, 'this' is replaced by src.
        If the actual document and the src document are different, src is positioned at the position of 'this' in the current document and removed from the old parent document.
        Overrides:
        replaceElement in class KElement
        Parameters:
        src - node, that 'this' will be replaced with
        Returns:
        KElement the replaced element. If src is null or equal 'this', src is returned.
      • mergeElement

        public KElement mergeElement​(KElement kElem,
                                     boolean bDelete)
        Description copied from class: KElement
        merge nodes in a way that no duplicate elements are created
        attention !! this kills pools !! since elements in kElem overwrite those in *this
        Overrides:
        mergeElement in class KElement
        Parameters:
        kElem - the node element to merge with the current node
        bDelete - if true KElement kElem will be deleted
        Returns:
        KElement the merged node element
      • appendElement

        public KElement appendElement​(java.lang.String elementName,
                                      java.lang.String nameSpaceURI)
        Overrides:
        appendElement in class JDFElement
        Parameters:
        elementName - the elementname with namespace prefix "xyz:abc"
        nameSpaceURI - the namespace of the element "null" is valid if the namespace was specified already above. The method will lookup the namespace for you. Performance wise its better to add it nevertheless.
        Returns:
        KElement the appended element or null
        See Also:
        JDFElement.appendElement(java.lang.String, java.lang.String)
      • setAttribute

        public void setAttribute​(java.lang.String key,
                                 java.lang.String value,
                                 java.lang.String nameSpaceURI)
        Description copied from class: KElement
        Mother of all Attribute setters
        Sets a new attribute. If an attribute with that name is already present in the element, its value is changed to be that of the value parameter. This value is a simple string; it is not parsed as it is being set. So any markup (such as syntax to be recognized as an entity reference) is treated as literal text, and needs to be appropriately escaped by the implementation when it is written out. In order to assign an attribute value that contains entity references, the user must create an Attr node plus any Text and EntityReference nodes, build the appropriate subtree, and use setAttributeNode to assign it as the value of an attribute. To set an attribute with a qualified name and namespace URI, use the setAttributeNS method.
        Overrides:
        setAttribute in class KElement
        Parameters:
        key - the qualified name of the attribute to create or alter.
        value - the value to set in string form. If null, the attribute is removed
        nameSpaceURI - the namespace the element is in
        See Also:
        KElement.setAttribute(java.lang.String, java.lang.String, java.lang.String)