Class JDFElement

    • Constructor Detail

      • JDFElement

        public JDFElement​(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                          java.lang.String qualifiedName)
        Constructor for JDFElement
        Parameters:
        myOwnerDocument - the DOM document where this elements will be inserted
        qualifiedName - the qualified name of the element (see www.w3.org/XML/)
      • JDFElement

        public JDFElement​(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                          java.lang.String myNamespaceURI,
                          java.lang.String qualifiedName)
        Constructor for JDFElement
        Parameters:
        myOwnerDocument - the DOM document where this elements will be inserted
        myNamespaceURI - the namespace of the elements to (see www.w3.org/XML/)
        qualifiedName - the qualified name of the element
      • JDFElement

        public JDFElement​(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                          java.lang.String myNamespaceURI,
                          java.lang.String qualifiedName,
                          java.lang.String myLocalName)
        Constructor for JDFElement
        Parameters:
        myOwnerDocument - the DOM document where this elements will be inserted
        myNamespaceURI - the namespace of the elements to create
        qualifiedName - the qualified name of the element (see www.w3.org/XML/)
        myLocalName - the local name of the element (see www.w3.org/XML/)
    • Method Detail

      • setLongID

        public static void setLongID​(boolean bLong)
        set the ID generation algorithm to include a date
        Parameters:
        bLong - if true (default), the date and time is used to generate long IDs
      • createRoot

        public static JDFElement createRoot​(java.lang.String nodename)
        create a new root document
        Parameters:
        nodename -
        Returns:
      • createRoot

        public static JDFElement createRoot​(java.lang.String nodename,
                                            JDFElement.EnumVersion v)
        create a new root document
        Parameters:
        nodename -
        namespaceURI -
        Returns:
      • getTheAttributeInfo

        protected AttributeInfo getTheAttributeInfo()
        Returns:
      • getAttributeInfo

        public final AttributeInfo getAttributeInfo()
        public version of getTheAttributeInfo
        Returns:
      • getAtrType

        public AttributeInfo.EnumAttributeType getAtrType​(java.lang.String attributeName)
        returns the data type of a given attribute
        Parameters:
        attributeName - the localname of the attribute to check
        Returns:
        the data type of attributeName
      • getFirstVersion

        public JDFElement.EnumVersion getFirstVersion​(java.lang.String eaName,
                                                      boolean bElement)
        get the first JDF version where attribute name or element name is valid
        Parameters:
        eaName - attribute name
        bElement - true - get ElementInfo, false - get AttributeInfo
        Returns:
        JDF version, Version_1_0 if no Info is found
      • isDirty

        public boolean isDirty()
        Get the dirty status of this element
        Overrides:
        isDirty in class KElement
        Returns:
        boolean true if dirty
      • isDeprecated

        public boolean isDeprecated()
        Returns:
        true if we are deprecated
      • setDirty

        public void setDirty​(boolean bAttribute)
        Set this element as dirty
        Overrides:
        setDirty in class KElement
        Parameters:
        bAttribute - if true, only attributes are dirty, else also sub-elements
      • getXMLDocUserData

        protected XMLDocUserData getXMLDocUserData()
        get/create the associated XMLDocUserData
        Returns:
        the XMLDocUserData of this
      • getLastVersion

        public JDFElement.EnumVersion getLastVersion​(java.lang.String eaName,
                                                     boolean bElement)
        get the last JDF version where attribute name or element name is valid
        Parameters:
        eaName - attribute name
        bElement - true - get ElementInfo, false - get AttributeInfo
        Returns:
        JDF version, Version_1_0 if no Info is found
      • requiredAttributes

        public VString requiredAttributes()
        Comma separated list of all required attributes. KElement is generic, therefore the list is empty
        Returns:
        String the comma separated list of required attribute keys
      • optionalAttributes

        public VString optionalAttributes()
        Comma separated list of all optional attributes. KElement is generic, therefore only the XML generic attributes are listed
        xmlns: the namespace declaration
        Returns:
        String the comma separated list of optional attribute keys
      • getDefaultAttributeMap

        public JDFAttributeMap getDefaultAttributeMap()
        map of all defaults from the schema
        Returns:
        JDFAttributeMap the comma separated list of deprecated attribute keys
      • getTheAttributeInfo_JDFElement

        protected AttributeInfo getTheAttributeInfo_JDFElement()
        Returns:
      • getTheElementInfo_JDFElement

        protected ElementInfo getTheElementInfo_JDFElement()
      • deprecatedAttributes

        public VString deprecatedAttributes()
        list of all deprecated attributes. KElement is generic, therefore the list is empty
        Returns:
        String the comma separated list of deprecated attribute keys
      • prereleaseAttributes

        public VString prereleaseAttributes()
        Comma separated list of all deprecated attributes. KElement is generic, therefore the list is empty
        Returns:
        String the comma separated list of deprecated attribute keys
      • knownAttributes

        public VString knownAttributes()
        KElement is generic, therefore the list is empty
        Returns:
        String the comma separated list of known attribute keys
      • getMissingAttributeVector

        public VString getMissingAttributeVector​(VString vReqKeys,
                                                 int nMax)
        checks if the curent element has other attributes then also present in vReqKeys. If the attribute is not present in vReqKeys, the attribut is added to a new vector. The new vector is returned if there is no missing element left or the new vector has reached the given size nMax.
        Parameters:
        vReqKeys - the vector with the attributes you already have
        nMax - vector with the missing attributes
        Returns:
        Vector the vector with the missing attributes
      • getTheElementInfo

        protected ElementInfo getTheElementInfo()
        Returns:
        the elementinfo
      • getElementInfo

        public final ElementInfo getElementInfo()
        Returns:
        the elementinfo
      • getMissingElements

        public VString getMissingElements​(int nMax)
        get the missing elements as a vector

        default: getMissingElements(99999999)

        Parameters:
        nMax - maximum value of missing elements to return
        Returns:
        VString vector with nMax missing elements
      • requiredElements

        public VString requiredElements()
        Returns:
        required elements
        Since:
        060517 changed signature to VString
      • optionalElements

        public VString optionalElements()
        list of all optional element names; KElement is generic, therefore the list is empty
        Returns:
        VString the comma separated list of optional element names
      • uniqueElements

        public VString uniqueElements()
        list of all unique Elements that may occur at most once; KElement is generic, therefore the list is empty
        Returns:
        String the comma separated list of required element names
      • prereleaseElements

        public java.lang.String prereleaseElements()
        comma separated list of all prerelease Elements that may occur in a future version
        Returns:
        String the comma separated list of required element names
      • getPrereleaseElements

        public VString getPrereleaseElements​(int nMax)
        Comma separated list of all prerelease elements.

        default: getPrereleaseElements(99999999)

        Parameters:
        nMax -
        Returns:
        VString vector with nMax missing elements
      • getDeprecatedElements

        public VString getDeprecatedElements​(int nMax)
        Vector of deprecated elements below the current element.

        default: getDeprecatedElements(99999999)

        Parameters:
        nMax -
        Returns:
        VString vector with nMax missing elements
      • knownElements

        public VString knownElements()
        Comma separated list of all known element names;
        Returns:
        String the comma separated list of known element names
      • getMissingAttributes

        public VString getMissingAttributes​(int nMax)
        This function first, gets all required attributes and then compare them with the attributes present and returns a Vector with the missing attributes
        Parameters:
        nMax - maximum size of the returned Vector
        Returns:
        VString vector with the missing attribute names
      • getDeprecatedAttributes

        public VString getDeprecatedAttributes​(int nMax)
        This function first, gets all deprecated attributes
        Parameters:
        nMax - maximum size of the returned Vector
        Returns:
        Vector vector with the deprecated attributes
      • getUnknownAttributes

        public VString getUnknownAttributes​(boolean bIgnorePrivate,
                                            int nMax)
        Get the unknown attributes

        default: getUnknownAttributes(bIgnorePrivate, 9999999)

        Parameters:
        bIgnorePrivate - if true the private attributes will be ignored
        nMax - mamimum amount of unknown attributes to return
        Returns:
        Vector a vector with all unknown atttributes the Element have
      • getUnknownAttributeVector

        public VString getUnknownAttributeVector​(VString vKnownKeys,
                                                 VString vInNameSpace,
                                                 int nMax)
        Gets the unknown attributes

        default: getUnknownAttributeVector(vKnownKeys, new Vector(), 99999999)

        Parameters:
        vKnownKeys - vector with all known keys
        vInNameSpace - vector with all namespaces to search in
        nMax - maximum amount of unknown attributes to return
        Returns:
        vector with maximum nMax unknown Attributes
      • getUnknownElements

        public VString getUnknownElements​(boolean bIgnorePrivate,
                                          int nMax)
        Get a vector with the unknown elements

        default: getUnknownElements(bIgnorePrivate, 99999999)

        Parameters:
        bIgnorePrivate - true, to ignore the private elements
        nMax - maximum number of elements in the vector returned
        Returns:
        Vector a vector with nMax unknown elements in the actual element.
      • getUnknownElementVector

        public VString getUnknownElementVector​(VString vKnownKeys,
                                               VString vInNameSpace,
                                               int nMax)
        Get a vector with the unknown elements

        default: getUnknownElementVector(vKnownKeys, vInNameSpace, 9999999)

        Parameters:
        vKnownKeys - vector of all known elements
        vInNameSpace - vector of all namespaces to search in
        nMax - maximum amount of elements to return
        Returns:
        Vector a vector containing the unknown elements
      • getTypeForAttribute

        public org.apache.commons.lang.enums.ValuedEnum getTypeForAttribute​(java.lang.String key)
        Get the EnumAttributeType for an attribute
        Parameters:
        key - the local name of the attribute
        Returns:
        EnumAttributeType of the attribute
      • validAttribute

        public boolean validAttribute​(java.lang.String key,
                                      java.lang.String nameSpaceURI,
                                      JDFElement.EnumValidationLevel level)
        is the attribute valid and of type iType. iType is of type EnumAttributeType but may be expanded in child classes

        default: validAttribute(key, null)

        Parameters:
        key - the attribute name
        nameSpaceURI - attribute namespace uri
        level - the validation level
        Returns:
        boolean: true if the attribute is valid
      • getEnumforAttribute

        public org.apache.commons.lang.enums.ValuedEnum getEnumforAttribute​(java.lang.String key)
        Get the ValuedEnum for an enumerated attribute
        Parameters:
        key - the local name of the attribute
        Returns:
        ValuedEnum.Unknown of the requested attribute or null if the attribute is not an enum
      • eraseDefaultAttributes

        public void eraseDefaultAttributes​(boolean bRecurse)
        remove all default attributes from this i.e. all attributes whose value matches the schema default
        Parameters:
        bRecurse - if true, also recurse subelements, else only local
      • hasMissingAttributes

        public boolean hasMissingAttributes()
        Checks, if this has any missing attributes
        Returns:
        boolean true, if one or more attributes are missing
      • hasUnknownAttributes

        public boolean hasUnknownAttributes​(boolean bIgnorePrivate)
        Checks, if this has are any unknown attributes
        Parameters:
        bIgnorePrivate - if true, looks only in default and JDF namespaces
        Returns:
        boolean true, if one or more attributes are unknown
      • hasMissingElements

        public boolean hasMissingElements()
        Tests, whether 'this' has any missing direct child elements
        Returns:
        boolean true, if one or more direct child elements are missing
      • hasUnknownElements

        public boolean hasUnknownElements​(boolean bIgnorePrivate)
        Tests, whether 'this' has any unknown direct child elements
        Parameters:
        bIgnorePrivate - if true, only looks in default and JDF namespaces
        Returns:
        boolean true if there are any unknown elements (in respect to the parameter)
      • getPrereleaseAttributes

        public VString getPrereleaseAttributes​(int nMax)
        This function first, gets all prerelease attributes It ignores any atrributes that have been added by a schema parser
        Parameters:
        nMax - maximum size of the returned Vector
        Returns:
        Vector vector with the prerelease attributes
      • getInsertElements

        public VString getInsertElements()
        Get a vector of direct child element names that exist but are unknown in this element.
        Returns:
        a vString that contains missing element keys
      • getInsertElementVector

        public VString getInsertElementVector​(VString vKnownKeys,
                                              VString vUnique)
        get a vString vector of direct child element names that may be inserted in this element. This means that a element which is already present as a child and has a max occurs of 1 will not be part of the returned vString
        Parameters:
        vKnownKeys - a vString list of known element tag names. If you want a complete list of all known Elements use KnownElements() from KElement to get a list. Or call GetInsertElements(int nMax)
        vUnique - vString a list of elements that may occur only once. Use UniqueElements() to get a String which contains all valid unique Elements from this.
        Returns:
        VString a vector of strings that contains insertable element keys
        See Also:
        knownElements(), getInsertElements(), uniqueElements()
      • attributeType

        public AttributeInfo.EnumAttributeType attributeType​(java.lang.String attributeName)
        Returns the type of the given attribute for the latest JDF version. Attribute types of previous versions have to be provided by attribute-specific functions (if necessary).
        Parameters:
        attributeName - name of the attribute
        Returns:
        EnumAttributeType the attribute's type
      • getNamesVector

        public VString getNamesVector​(java.lang.String key)
        Get the vector of valid attribute values for an enumerated attribute
        Parameters:
        key - the local name of the attribute
        Returns:
        vector of valid names, null if key is not an enumeration
      • getMissingElementVector

        public VString getMissingElementVector​(VString vRequiredKeys,
                                               int nMax)
        Returns a vector with missing elements

        default: getMissingElementVector(vRequiredKeys, 9999999)

        Parameters:
        vRequiredKeys - vector with all element which are required
        nMax - maximum amount of missing element inside the returned vector
        Returns:
        Vector the vector with the missing elements
      • isValid

        public boolean isValid​(JDFElement.EnumValidationLevel level)
        Mother of all validators
        Parameters:
        level - validation level
        • level EnumValidationLevel.None: always return true;
        • level EnumValidationLevel.Construct: incomplete and null elements are valid.
        • level EnumValidationLevel.Incomplete: incomplete elements are valid
        • level EnumValidationLevel.Complete: full validation
        • level EnumValidationLevel.RecursiveIncomplete: incomplete validation but follow links
        • level EnumValidationLevel.RecursiveComplete: full validation and follow links downward
        Returns:
        boolean the validity of the node
      • isValid_JDFElement

        public boolean isValid_JDFElement​(JDFElement.EnumValidationLevel level)
        Mother of all validators; this method is for direct access to the JDFElement valid method and short-circuit all overriding virtual methods
        Parameters:
        level - validation level
        • level EnumValidationLevel.None: always return true;
        • level EnumValidationLevel.Construct: incomplete and null elements are valid.
        • level EnumValidationLevel.Incomplete: incomplete elements are valid
        • level EnumValidationLevel.Complete: full validation
        • level EnumValidationLevel.RecursiveIncomplete: incomplete validation but follow links
        • level EnumValidationLevel.RecursiveComplete: full validation and follow links downward
        Returns:
        boolean the validity of the node
      • fixVersion

        public final boolean fixVersion​(JDFElement.EnumVersion version)
        Mother of all version fixing routines uses heuristics to modify this element and its children to be compatible with a given version in general, it will be able to move from low to high versions but potentially fail when attempting to move from higher to lower versions
        Parameters:
        version - version the resulting element should correspond to
        Returns:
        true if successful
      • hasSettingsPolicy

        @Deprecated
        public boolean hasSettingsPolicy​(boolean bInherit)
        Deprecated.
        use hasAttribute
        Check Existance of attribute SettingsPolicy
        Parameters:
        bInherit - recurse through ancestors when searching
        Returns:
        true if attribute exists
      • removeSettingsPolicy

        @Deprecated
        public void removeSettingsPolicy()
        Deprecated.
        use removeAttribute
        Remove attribute SettingsPolicy
      • removeBestEffortExceptions

        @Deprecated
        public void removeBestEffortExceptions()
        Deprecated.
        use removeAttribute
        Remove attribute BestEffortExceptions
      • getHRef

        @Deprecated
        public java.lang.String getHRef()
        Deprecated.
        use getrRef of the coresponding sub classes instead
        Gets the one and reference to an ID
        Returns:
        String the rRef attribute
      • appendHRef

        public JDFElement appendHRef​(JDFResource target,
                                     java.lang.String refAttribute,
                                     java.lang.String preSet)
        append a reference to a target node automatically generate a unique ID attribute for target, if it does not exist
        Parameters:
        target - the element to reference
        refAttribute - name of the refering attribute, e.g. hRef, rRef
        preSet - preset value of the ID attribute - defaults to autogenerated
        Returns:
        JDFElement
      • appendHRef

        public JDFElement appendHRef​(java.lang.String idRef,
                                     java.lang.String refAttribute,
                                     java.lang.String nameSpaceURI)
        append a reference with a specific id
        Parameters:
        idRef - value of the ID-IDREF pair
        refAttribute - value of the IDREF tag
        nameSpaceURI - nameSpaceURI of the IDREF tag
        Returns:
        JDFElement
      • setAttribute

        public void setAttribute​(java.lang.String key,
                                 JDFDuration value,
                                 java.lang.String nameSpaceURI)
        Sets an element attribute
        Parameters:
        key - the name of the attribute to set
        value - the JDFDuration to set
        nameSpaceURI - the nameSpace the attribute is in default: setAttribute(key, value, null)
      • setAttribute

        public void setAttribute​(java.lang.String key,
                                 JDFNumList value,
                                 java.lang.String nameSpaceURI)
        Sets an element attribute
        Parameters:
        key - the name of the attribute to set
        value - the JDFNumList to set
        nameSpaceURI - the nameSpace the attribute is in
      • setAttribute

        public void setAttribute​(java.lang.String key,
                                 JDFNumList value,
                                 java.lang.String nameSpaceURI,
                                 int precision)
        Sets an element attribute
        Parameters:
        key - the name of the attribute to set
        value - the JDFNumList to set
        nameSpaceURI - the nameSpace the attribute is in
        precision - number of digits
      • setAttribute

        public void setAttribute​(java.lang.String key,
                                 JDFRangeList value,
                                 java.lang.String nameSpaceURI)
        Sets an element attribute
        Parameters:
        key - the name of the attribute to set
        value - the JDFNumberRangeList to set
        nameSpaceURI - the nameSpace the attribute is in
      • setAttribute

        public void setAttribute​(java.lang.String key,
                                 JDFRangeList value,
                                 java.lang.String nameSpaceURI,
                                 int precision)
        Sets an element attribute
        Parameters:
        key - the name of the attribute to set
        value - the JDFNumberRangeList to set
        nameSpaceURI - the nameSpace the attribute is in
        precision -
      • setAttribute

        public void setAttribute​(java.lang.String key,
                                 JDFRange value,
                                 java.lang.String nameSpaceURI)
        Sets an element attribute
        Parameters:
        key - the name of the attribute to set
        value - the JDFXYRange to set
        nameSpaceURI - the nameSpace the attribute is in
      • setAttribute

        public void setAttribute​(java.lang.String key,
                                 JDFRange value,
                                 java.lang.String nameSpaceURI,
                                 int precision)
        Sets an element attribute
        Parameters:
        key - the name of the attribute to set
        value - the JDFXYRange to set
        nameSpaceURI - the nameSpace the attribute is in
        precision -
      • setvStringAttribute

        @Deprecated
        public void setvStringAttribute​(java.lang.String key,
                                        JDFNameRange value,
                                        java.lang.String nameSpaceURI)
        Deprecated.
        Sets an element attribute
        Parameters:
        key - the name of the attribute to set
        value - the JDFNameRange to set
        nameSpaceURI - the nameSpace the attribute is in
      • exclusiveOneOfAttribute

        public boolean exclusiveOneOfAttribute​(JDFElement.EnumValidationLevel level,
                                               java.lang.String att1,
                                               java.lang.String att2,
                                               java.lang.String att3,
                                               java.lang.String att4)
        return true if no more than one of att1 or att2 exists or exactly one of att1 or att2 exists depending on level
        Parameters:
        level - validation level, if level allows optional, no attribute also returns true
        att1 - name of first attribute
        att2 - name of second attribute
        att3 - name of third optional attribute
        att4 - name of fourth optional attribute
        Returns:
        boolean true combination is valid
      • exclusiveOneOfElement

        public boolean exclusiveOneOfElement​(JDFElement.EnumValidationLevel level,
                                             java.lang.String elm1,
                                             java.lang.String ns1,
                                             java.lang.String elm2,
                                             java.lang.String ns2)
        return true if no more than one of att1 or att2 exists or exactly one of att1 or att2 exists depending on level
        Parameters:
        level - validation level, if level allows optional, no attribute also returns true
        elm1 - name of first attribute
        ns1 - namespace URI of first attribute
        elm2 - name of first attribute
        ns2 - namespace URI of first attribute
        Returns:
        boolean true combination is valid
      • getChildIds

        public VString getChildIds​(java.lang.String attrib,
                                   java.lang.String element,
                                   java.lang.String nameSpaceURI)
        GetChildIds - get a set of all known id's in child nodes
        Parameters:
        attrib - attribute name of the ID attribute, defaults to "ID"
        element - name of the elements to be searched
        nameSpaceURI - attribute namespace uri of the elements to include in the list
        Returns:
        Vector - a vector of all known ID elements
      • getTarget

        @Deprecated
        public JDFResource getTarget()
        Deprecated.
        use the respective subclasses getTarget functions
        Get the target element of a link (string id)
        Returns:
        JDFElement - the element that this reference refers to
      • getTarget

        public KElement getTarget​(java.lang.String id,
                                  java.lang.String attrib)
        looking for a specified target with an id, e.g. resource.
        Offers access to exactly KElements implementation of GetTarget even if called for an instance of one of it's subclasses.

        default: getTarget(id, JDFCoreConstants.ID)

        Overrides:
        getTarget in class KElement
        Parameters:
        id - value of the ID tag to search
        attrib - name of the ID tag, defaults to "ID"
        Returns:
        KElement - the element if existing, otherwise null
      • getJDFRoot

        public JDFNode getJDFRoot()
        Get the JDF root
        Returns:
        JDFNode - The root of the JDF File
      • getJMFRoot

        public JDFJMF getJMFRoot()
        Get the JMF root
        Returns:
        JDFJMF - the root of the JMF file
      • isRefElement

        @Deprecated
        public boolean isRefElement()
        Deprecated.
        use instanceof JDFRefElement
        IsRefElement - is this thing a RefElement?
        Returns:
        true, if this is a refElement
      • isRefElementStatic

        @Deprecated
        public static boolean isRefElementStatic​(KElement kElem)
        Deprecated.
        use instanceof JDFRefElement
        IsRefElement - is this thing a RefElement?
        Parameters:
        kElem -
        Returns:
        true, if this is a refElement
      • isResource

        @Deprecated
        public boolean isResource()
        Deprecated.
        use instanceof JDFResource instead
        tests whether this Element is a Resource.
        Returns:
        boolean - true, if it is a Resource.
      • isResourceStatic

        @Deprecated
        public static boolean isResourceStatic​(KElement e)
        Deprecated.
        use instanceof JDFResource instead
        tests whether this Element is a Resource.
        Parameters:
        e -
        Returns:
        boolean - true, if it is a Resource.
      • isResourceUpdate

        public boolean isResourceUpdate()
        is this thing a ResourceUpdate?
        Returns:
        true, if this is a ResourceUpdate
      • isResourceLink

        @Deprecated
        public boolean isResourceLink()
        Deprecated.
        use instanceof JDFResourceLink.IsResourceLink instead
        Method IsResourceLink.
        Returns:
        boolean
      • isResourceLinkStatic

        @Deprecated
        public static boolean isResourceLinkStatic​(KElement kElem)
        Deprecated.
        use instanceof JDFResourceLink instead
        Method IsResourceLinkStatic.
        Parameters:
        kElem -
        Returns:
        boolean
      • isComment

        @Deprecated
        public boolean isComment()
        Deprecated.
        use instanceof JDFResourceLink instead
        Check, if this is an Comment element
        Returns:
        boolean - true, if this is an Comment-Element, otherwise false
      • isCommentStatic

        @Deprecated
        public static boolean isCommentStatic​(KElement kElem)
        Deprecated.
        use instanceof JDFComment instead
        Method isCommentStatic.
        Parameters:
        kElem -
        Returns:
        boolean - true, if this is an Comment-Element, otherwise false
      • isJDFNode

        @Deprecated
        public boolean isJDFNode()
        Deprecated.
        use instanceof JDFNode instead
        is this thing a JDF Node?
        Returns:
        true if this is a JDF Node
      • isXJDF

        public boolean isXJDF()
        are we an XJDF or child of XJDF/XJMF
        Returns:
      • isInJDFNameSpace

        @Deprecated
        public boolean isInJDFNameSpace()
        Deprecated.
        - use isInJDFNameSpaceStatic(kElem)
        Method IsInJDFNameSpace.
        Returns:
        boolean
      • removeExtensions

        public void removeExtensions()
        remove all private extensions form a jdf element and its children
      • isInJDFNameSpaceStatic

        public static boolean isInJDFNameSpaceStatic​(java.lang.String ns)
        checks whether kElem is in the JDF namespace
        Parameters:
        ns - the KElement to check
        Returns:
        boolean - true, if kElem is in the JDF namespace
      • isInXJDFNameSpaceStatic

        public static boolean isInXJDFNameSpaceStatic​(java.lang.String ns)
        checks whether kElem is in the JDF namespace
        Parameters:
        ns - the KElement to check
        Returns:
        boolean - true, if kElem is in the JDF namespace
      • isInAnyCIP4NameSpaceStatic

        public static boolean isInAnyCIP4NameSpaceStatic​(java.lang.String ns)
        checks whether kElem is in the XJDF or the JDF namespace
        Parameters:
        ns - the KElement to check
        Returns:
        boolean - true, if kElem is in the JDF namespace
      • isInAnyCIP4NameSpaceStatic

        public static boolean isInAnyCIP4NameSpaceStatic​(KElement kElem)
        checks whether kElem is in the JDF namespace
        Parameters:
        kElem - the KElement to check
        Returns:
        boolean - true, if kElem is in the JDF namespace
      • isInAnyJDFNameSpaceStatic

        public static boolean isInAnyJDFNameSpaceStatic​(java.lang.String ns)
        checks whether kElem is in the XJDF or the JDF namespace
        Parameters:
        ns - the KElement to check
        Returns:
        boolean - true, if kElem is in the JDF namespace
      • isInAnyJDFNameSpaceStatic

        public static boolean isInAnyJDFNameSpaceStatic​(KElement kElem)
        checks whether kElem is in the JDF namespace
        Parameters:
        kElem - the KElement to check
        Returns:
        boolean - true, if kElem is in the JDF namespace
      • isInJDFNameSpaceStatic

        public static boolean isInJDFNameSpaceStatic​(KElement kElem)
        checks whether kElem is in the JDF namespace
        Parameters:
        kElem - the KElement to check
        Returns:
        boolean - true, if kElem is in the JDF namespace
      • isInXJDFNameSpaceStatic

        public static boolean isInXJDFNameSpaceStatic​(KElement kElem)
        checks whether kElem is in the JDF namespace
        Parameters:
        kElem - the KElement to check
        Returns:
        boolean - true, if kElem is in the JDF namespace
      • getRefElement

        public JDFRefElement getRefElement​(JDFResource target)
        gets an inter resource link to a target resource. if target is a partition, the refElement MUST point exactly to that partition
        Parameters:
        target - - Target resource to link to
        Returns:
        the existing refElement
      • getCreateRefElement

        public JDFRefElement getCreateRefElement​(JDFResource target)
        gets an inter resource link to a target resource., creates it if it does not exist
        Parameters:
        target - - Target resource to link to
        Returns:
      • getCreateElement_JDFElement

        public KElement getCreateElement_JDFElement​(java.lang.String nodeName,
                                                    java.lang.String nameSpaceURI,
                                                    int iSkip)
        Gets the iSkip-th child node with matching nodeName and nameSpaceURI, optionally creates it if it doesn't exist.
        If iSkip is more than one larger that the number of elements only one is appended
        Parameters:
        nodeName - name of the child node to get
        nameSpaceURI - namespace to search for
        iSkip - number of matching child nodes to skip
        Returns:
        KElement the matching child element
      • refElement

        public JDFRefElement refElement​(JDFResource target)
        Creates an inter resource link to a target resource.
        note that if target is a subelement rather than a root resource, it WILL be promoted to root level (rSubRef is deprecated)
        Parameters:
        target - - Target resource to link to
        Returns:
      • removeRefElement

        public void removeRefElement​(JDFResource target)
        Removes an inter resource link from this Element.
        Parameters:
        target - Target to remove
      • getRefElements

        public VElement getRefElements()
        gets the vector of all RefElements
        Returns:
        VElement - vector of JDFRefElements
      • upDaterRefs

        @Deprecated
        public VString upDaterRefs()
        Deprecated.
        use KElement.fillHashSet(ElementName.RREF,null,hashSet)
        UpDates rRefs attribute of this Element, corresponding to the child reference Elements of this Element.
        Returns:
      • inlineRefElements

        public void inlineRefElements​(java.lang.String nodeName,
                                      java.lang.String nameSpaceURI,
                                      boolean bDirect)
        inline refelements that match nodename and nameSpaceURI
        Parameters:
        nodeName - name of the refelement (without the "Ref")
        nameSpaceURI -
        bDirect - if true, get direct children only, else recurse into all sub-elements
      • getChildElementVector

        public VElement getChildElementVector​(java.lang.String nodeName,
                                              java.lang.String nameSpaceURI,
                                              JDFAttributeMap mAttrib,
                                              boolean bAnd,
                                              int maxSize,
                                              boolean bResolveTarget)
        Get all children from the actual element matching the given conditions
        does NOT get refElement targets although the attributes are checked in the target elements in case of refElements
        Overrides:
        getChildElementVector in class KElement
        Parameters:
        nodeName - element name 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, returns the targets of the refElements
        else the refElements are returned (if mAttrib != null), additionally the attributes of the target are checked)
        Returns:
        VElement - vector with all elements found
        See Also:
        default: getChildElementVector(null, null,null, true, 0, false)
      • getChildrenByTagName

        public VElement getChildrenByTagName​(java.lang.String elementName,
                                             java.lang.String nameSpaceURI,
                                             JDFAttributeMap mAttrib,
                                             boolean bDirect,
                                             boolean bAnd,
                                             int maxSize)
        Gets children of 'this' by tag name, nameSpaceURI and attribute map, if the attribute map is not empty.
        Searches the entire tree including hidden nodes that are children of non-matching nodes
        Overrides:
        getChildrenByTagName in class KElement
        Parameters:
        elementName - elementname you are searching for
        nameSpaceURI - nameSpace you are searching for
        mAttrib - map of attributes you are looking for
        Wildcards in the attribute map are supported
        bDirect - if true, return value is a vector only of all direct child elements.
        Otherwise the returned vector contains nodes of arbitrary depth
        bAnd - if true, a child is only added, if it includes all attributes, specified in mAttrib
        maxSize - maximum size of the element vector. maxSize is ignored if bDirect is false
        Returns:
        VElement: vector with all found elements
        See Also:
        KElement.getChildElementVector(java.lang.String, java.lang.String, org.cip4.jdflib.datatypes.JDFAttributeMap, boolean, int, boolean)
      • getChildrenByTagName

        public VElement getChildrenByTagName​(java.lang.String elementName,
                                             java.lang.String nameSpaceURI,
                                             JDFAttributeMap mAttrib,
                                             boolean bDirect,
                                             boolean bAnd,
                                             int maxSize,
                                             boolean bFollowRefs)
        Gets children of 'this' by tag name, nameSpaceURI and attribute map, if the attribute map is not empty.
        Searches the entire tree including hidden nodes that are children of non-matching nodes
        Parameters:
        elementName - elementname you are searching for
        nameSpaceURI - nameSpace you are searching for
        mAttrib - map of attributes you are looking for
        Wildcards in the attribute map are supported
        bDirect - if true, return value is a vector only of all direct child elements.
        Otherwise the returned vector contains nodes of arbitrary depth
        bAnd - if true, a child is only added, if it includes all attributes, specified in mAttrib
        maxSize - maximum size of the element vector. maxSize is ignored if bDirect is false
        bFollowRefs - if true follow references of refElements, else return the refElement
        Returns:
        VElement: vector with all found elements
        See Also:
        KElement.getChildElementVector(java.lang.String, java.lang.String, org.cip4.jdflib.datatypes.JDFAttributeMap, boolean, int, boolean)
      • getElementNameVector

        public VString getElementNameVector()
        Description copied from class: KElement
        Returns a vector which contains the childs of the actual element. But every child only once.
        Overrides:
        getElementNameVector in class KElement
        Returns:
        Vector vector with the childs of the actual element. Ever child typ is only added once.
        See Also:
        KElement.getElementNameVector()
      • getElement

        public KElement getElement​(java.lang.String nodeName,
                                   java.lang.String nameSpaceURI,
                                   int iSkip)
        Description copied from class: KElement
        Gets an existing iSkip-th child node with matching nodeName and nameSpaceURI
        Overrides:
        getElement in class KElement
        Parameters:
        nodeName - name of the child node to get
        nameSpaceURI - namespace to search for
        iSkip - number of matching child nodes to skip
        Returns:
        KElement the matching child element
        See Also:
        KElement.getElement(java.lang.String, java.lang.String, int)
      • getElement_JDFElement

        public KElement getElement_JDFElement​(java.lang.String nodeName,
                                              java.lang.String nameSpaceURI,
                                              int iSkip)
        same as KElement.GetElement, but follows references as well.
        Thus the returned value is the target of the refElement unless the requested element is explicitely a refElement, which is specified by requesting an element with nodeName="XXXRef".
        Invalid refelements are simply skipped and are not filled into the vector
        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
      • numChildElements

        public int numChildElements​(java.lang.String nodeName,
                                    java.lang.String nameSpaceURI)
        same as KElement.numChildElements(String, String), but also follows references.
        Invalid refelements are simply skipped.
        Overrides:
        numChildElements in class KElement
        Parameters:
        nodeName - the nodes to count
        nameSpaceURI - the nameSpace to look in
        Returns:
        int - the number of child elements
      • numChildElements_JDFElement

        public int numChildElements_JDFElement​(java.lang.String nodeName,
                                               java.lang.String nameSpaceURI)
        Parameters:
        nodeName -
        nameSpaceURI -
        Returns:
      • removeChildren

        public void removeChildren​(java.lang.String nodeName,
                                   java.lang.String nameSpaceURI,
                                   JDFAttributeMap mAttrib)
        Remove children that match nodeName and nameSpaceURI
        Overrides:
        removeChildren in class KElement
        Parameters:
        nodeName - name of the child node to get, if empty or null remove all
        nameSpaceURI - namespace to search for
        mAttrib - attribute map to search for
      • validResourcePosition

        protected boolean validResourcePosition​(JDFResource r)
        is the ressource r linkable by this? used by ResorceLink and refElement
        Parameters:
        r - the resource to link to
        Returns:
        boolean - true if r is at a valid position
      • removeChild

        public KElement removeChild​(java.lang.String node,
                                    java.lang.String nameSpaceURI,
                                    int n)
        remove child node
        Overrides:
        removeChild in class KElement
        Parameters:
        node - name of the child node to remove, if empty or "*" remove all
        nameSpaceURI - namespace to search for
        n - number of nodes to skip before deleting
        Returns:
        KElement - the removed node
      • appendAnchor

        public java.lang.String appendAnchor​(java.lang.String strName)
        create and append a unique id, keep the existing one if it already exists
        Overrides:
        appendAnchor in class KElement
        Parameters:
        strName -
        Returns:
        String - the value of the ID attribute after setting
      • setAttributeNameTimeStamp

        public void setAttributeNameTimeStamp​(java.lang.String attributeName,
                                              JDFDate timestamp)
        put a timestamp in an attribute of the current node
        Parameters:
        attributeName - the attribute name to timestamp
        timestamp - the timestamp
      • setAttributes

        public int setAttributes​(KElement kElem,
                                 VString ignoreList)
        Sets the attributes from the curent element to the attributes from kElem. If the Attributes map from kElem is empty (kElem has no attributes), zero is returned. Otherwhise the size of the map (number of attributes from kElem) is returned.
        Overrides:
        setAttributes in class KElement
        Parameters:
        kElem - the attribute source
        ignoreList -
        Returns:
        int number of elements from kElem
      • idString

        @Deprecated
        public java.lang.String idString​(int id)
        Deprecated.
        060307 internal legacy method
        create a string link from an integer
        Parameters:
        id - the integer value to convert to an ID
        Returns:
        String - a unique ID string
      • getParentJDF

        public static JDFNode getParentJDF​(KElement e)
        static version of GetParentJDF - get the local JDF node that this element resides in.
        if e is a JDF node, return it's parent
        if e is the root JDF node, return a null reference
        Parameters:
        e - the KElement (may be in foreign namespace)
        Returns:
        JDFNode - the local parent JDF of this element
      • getParentJDF

        public JDFNode getParentJDF()
        get the local JDF node that this element resides in
        if this is a JDF node, return it's parent
        if this is the root JDF node, return a null reference
        Returns:
        JDFNode - the local parent JDF of this element
      • getInvalidAttributes

        public VString getInvalidAttributes​(JDFElement.EnumValidationLevel level,
                                            boolean bIgnorePrivate,
                                            int nMax)
        get invalid attributes
        Parameters:
        level - validation level
        bIgnorePrivate - if true, do not worry about attributes in other namespaces
        nMax - maximum size of the returned vector
        Returns:
        VString - a vector of invalid attribute names
      • getInvalidElements

        public VString getInvalidElements​(JDFElement.EnumValidationLevel level,
                                          boolean bIgnorePrivate,
                                          int nMax)
        get invalid elements
        Parameters:
        level - validation level
        bIgnorePrivate - if true, do not worry about elements in other namespaces
        nMax - maximum size of the returned vector
        Returns:
        VString - a vector of invalid element names
      • getInvalidElements_JDFElement

        public VString getInvalidElements_JDFElement​(JDFElement.EnumValidationLevel level,
                                                     boolean bIgnorePrivate,
                                                     int nMax)
        Method GetInvalidElements_JDFElement.
        Parameters:
        level - validation level
        bIgnorePrivate - if true, do not worry about elements in other namespaces
        nMax - maximum size of the returned vector
        Returns:
        VString - a vector of invalid element names
      • setCommentURL

        public void setCommentURL​(java.lang.String value)
        Set attribute CommentURL
        Parameters:
        value - the CommentURL value
      • setCommentText

        public JDFComment setCommentText​(java.lang.String text)
        set comment text , also creates the comment if not there
        Parameters:
        text - the comment text to set
        Returns:
        JDFComment the comment
      • setCommentText

        public JDFComment setCommentText​(java.lang.String text,
                                         java.lang.String name)
        set comment text , also creates the comment if not there
        Parameters:
        text - the comment text to set
        Returns:
        JDFComment the comment
      • getCommentURL

        public java.lang.String getCommentURL()
        Get string attribute CommentURL
        Returns:
        the value of the attribute commentURL
      • getRefString

        protected java.lang.String getRefString()
        Get the string of a refelement that points to this, i.e.NodeName+"Ref"
        Returns:
        the nodename of a refelement
      • jdfVersion

        public java.lang.String jdfVersion()
        get the LDFLib version
        Returns:
        the JDFLib version
      • getSchemaURL

        public static java.lang.String getSchemaURL()
        returns the official JDF schema URI for a particular version fool proof schema url as of November 5th, 2003
        Returns:
        the URL that fits to majorVersion and minorVersion - null if not supported
      • getSchemaURL

        public static java.lang.String getSchemaURL​(int majorVersion,
                                                    int minorVersion)
        Parameters:
        majorVersion - the major version - only 1 is supported
        minorVersion - the minor version - only 0 or 1 are supported
        Returns:
        the URL that fits to majorVersion and minorVersion - null if not supported
      • getDefaultJDFVersion

        public static JDFElement.EnumVersion getDefaultJDFVersion()
        returns the JDFElement::EnumVersion, where new elements will be generated in by default
        Returns:
        the default version
      • setDefaultJDFVersion

        public static void setDefaultJDFVersion​(JDFElement.EnumVersion vers)
        sets the JDFElement::EnumVersion, where new elements will be generated in by default
        Attention this is static and global. Therefore it should generally be be called on initialization
        Parameters:
        vers - the new default version
      • getElementIDPrefix

        public java.lang.String getElementIDPrefix()
        get Element ID prefix
        Returns:
        the ID prefix of JDFElement
      • newID

        public java.lang.String newID​(java.lang.String lastID)
        gets a new ID for the element
        Parameters:
        lastID - the highest ID that has been created before
        Returns:
        the unique ID string
      • getEnumAttribute

        @Deprecated
        public int getEnumAttribute​(java.lang.String key,
                                    java.util.Vector v,
                                    java.lang.String nameSpaceURI,
                                    int def,
                                    boolean bInherit)
        Deprecated.
        use EnumXYZ.getEnum(getAttribute(key, namespaceURI, def)
        defines an enumerated list of attributes ; used by the automated code generator
        Parameters:
        key - the attribute name
        v - comma separated string of allowed values
        nameSpaceURI - attribute namespace uri
        def - the default enum if it does not exist
        bInherit - if true: recurse into parent elements when searching the attribute as well
        Returns:
        int - the enumeration equivalent of the attribute of the attribute def if
        Since:
        300402
      • getEnumerationsAttribute

        @Deprecated
        public java.util.Vector getEnumerationsAttribute​(java.lang.String key,
                                                         java.util.Vector v,
                                                         java.lang.String nameSpaceURI,
                                                         int def,
                                                         boolean bInherit)
        Deprecated.
        use getEnumerationsAttribute(key, nameSpaceURI, EnumXYZ.getEnum(0), bInherit)
        defines an enumerated list of attributes ; used by the automated code generator
        Parameters:
        key - the attribute name
        v - comma separated string of allowed values
        nameSpaceURI - attribute namespace uri
        def - the default enum if it does not exist
        bInherit - if true: recurse into parent elements when searching the attribute as well
        Returns:
        the Vector of enumeration equivalents of the attribute
        Since:
        300402
      • getEnumerationsAttribute

        public java.util.Vector<? extends org.apache.commons.lang.enums.ValuedEnum> getEnumerationsAttribute​(java.lang.String key,
                                                                                                             java.lang.String nameSpaceURI,
                                                                                                             org.apache.commons.lang.enums.ValuedEnum enu,
                                                                                                             boolean bInherit)
        defines an enumerated list of attributes; used by the automated code generator
        Parameters:
        key - the attribute local name
        nameSpaceURI - the namespace URI
        enu - a dummy enumeration of the correct type, typically EnumXYZ.getEnum(0)
        bInherit - if true, also recurse into parent elements when searching the attribute
        Returns:
        Vector of ValuedEnum, null if no enum was set
      • setEnumerationsAttribute

        protected void setEnumerationsAttribute​(java.lang.String key,
                                                java.util.Vector<? extends org.apache.commons.lang.enums.ValuedEnum> value,
                                                java.lang.String nameSpaceURI)
        set an enumerated list of attributes; used by the automated code generator
        Parameters:
        key - the attribute name
        value - the enumeration vector
        nameSpaceURI - attribute namespace uri
        Throws:
        JDFException - wrong data type in vector
      • validAttribute

        @Deprecated
        public boolean validAttribute​(java.lang.String key,
                                      AttributeInfo.EnumAttributeType iType,
                                      boolean bRequired,
                                      java.lang.String nameSpaceURI)
        Deprecated.
        clean up attributeInfo tables instead use KElement public boolean validAttribute(String key,String nameSpaceURI, EnumValidationLevel level)
        is the attribute valid and of type iType?
        iType is of type EnumAttributeType, but may be expanded in child classes
        Parameters:
        key - the attribute name
        iType - the attribute type
        bRequired - true if this attribute is required
        nameSpaceURI - attribute namespace uri
        Returns:
        boolean: true if the attribute is valid
      • validEnumAttribute

        @Deprecated
        public boolean validEnumAttribute​(java.lang.String key,
                                          java.util.Vector v,
                                          boolean bRequired,
                                          java.lang.String nameSpaceURI)
        Deprecated.
        use getTheAttributeInfo instead
        ValidEnumAttribute - is the attribute valid and does it fit allowedValues, iType is of type EnumAttributeType but may be expanded in child classes
        Parameters:
        key - the attribute name
        v - Vector with all valid enums
        bRequired - true if this attribute is required
        nameSpaceURI - attribute namespace uri
        Returns:
        booelan - true if the attribute is valid
      • validEnumerationsAttribute

        @Deprecated
        public boolean validEnumerationsAttribute​(java.lang.String key,
                                                  java.util.Vector vs,
                                                  boolean bRequired,
                                                  java.lang.String nameSpaceURI)
        Deprecated.
        use getTheAttributeInfo instead
        is the attribute valid and does it fit allowedValues. iType is of type EnumAttributeType but may be expanded in child classes
        Parameters:
        key - the attribute name
        vs - comma separated string of allowed values
        bRequired - true if this attribute is required
        nameSpaceURI - attribute namespace uri
        Returns:
        true, if the attribute is valid
      • replaceChild

        public org.w3c.dom.Node replaceChild​(org.w3c.dom.Node arg0,
                                             org.w3c.dom.Node arg1)
                                      throws org.w3c.dom.DOMException
        Specified by:
        replaceChild in interface org.w3c.dom.Node
        Overrides:
        replaceChild in class KElement
        Throws:
        org.w3c.dom.DOMException
        See Also:
        ParentNode.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)
      • removeChild

        public org.w3c.dom.Node removeChild​(org.w3c.dom.Node arg0)
                                     throws org.w3c.dom.DOMException
        Specified by:
        removeChild in interface org.w3c.dom.Node
        Overrides:
        removeChild in class KElement
        Throws:
        org.w3c.dom.DOMException
        See Also:
        ParentNode.removeChild(org.w3c.dom.Node)
      • getTarget_JDFElement

        public KElement getTarget_JDFElement​(java.lang.String id,
                                             java.lang.String attrib)
        Gets the target of link. Follows an ID-IDREF pair by recursively searching for an attrib with the value id
        Parameters:
        id - value of the ID tag to search
        attrib - name of the ID tag, defaults to "ID"
        Returns:
        KElement the target of link - the element node.
      • insertBefore

        public KElement insertBefore​(java.lang.String elementName,
                                     org.w3c.dom.Node beforeChild,
                                     java.lang.String nameSpaceURI)
        Inserts the Element elementName before the existing Element node beforeChild. If beforeChild is null , insert elementName at the end of the list of children. If elementName is a DocumentFragment object, all of its children are inserted, in the same order, before beforeChild. If the elementName is already in the tree, it is removed first.

        default: insertBefore(elementName, beforeChild, null)

        Overrides:
        insertBefore in class KElement
        Parameters:
        elementName - The elementName to insert the element itself will be created
        beforeChild - The reference element, i.e., the elemente before which the new element must be inserted
        nameSpaceURI - The namespace to create elementName in
        Returns:
        KElement the element being inserted
      • cloneNewDoc

        public KElement cloneNewDoc()
        same as @see clone but the clone is in a new document
        Overrides:
        cloneNewDoc in class KElement
        Returns:
        See Also:
        Object.clone()
      • copyInto

        public KElement copyInto​(KElement src,
                                 boolean bRemove)
        copies a node into this, ignoring identical node names i.e. duplicating elements
        Overrides:
        copyInto in class KElement
        Parameters:
        src -
        bRemove - if true, remove existing information, else retain and overwrite / merge
        Returns:
        this
      • getEnumString

        @Deprecated
        public java.lang.String getEnumString​(int value,
                                              java.lang.String allowedValues)
        Deprecated.
        use EnumXYZ.getEnum(int)
        get the string value from an enumerated set of values
        Parameters:
        value - - the enum that is to be translated to a string
        allowedValues - - comma separated string of allowed values
        Returns:
        String - the string for the enum
      • getOwnerDocument_JDFElement

        public JDFDoc getOwnerDocument_JDFElement()
        Get the document object that owns this
        Returns:
        JDFDoc the owner document of this
      • getEnumNodeName

        @Deprecated
        public int getEnumNodeName​(java.util.Vector allowedValues)
        Deprecated.
        map a node's localname to an enumeration defined by allowedValues
        Parameters:
        allowedValues - comma separated string of allowed values
        Returns:
        int - the enum that corresponds to the nodename
      • getPartMapVector

        protected VJDFAttributeMap getPartMapVector()
        GetPartMapVector returns a vector of partmaps, null if no parts are present
        Returns:
        Vector
      • getPartMapArray

        protected JDFAttributeMapArray getPartMapArray()
        GetPartMapVector returns a vector of partmaps, null if no parts are present
        Returns:
        Vector
      • getPartMap

        protected JDFAttributeMap getPartMap()
        gets the part map
        Returns:
        JDFAttributeMap, of the part element
      • setPartMapVector

        protected void setPartMapVector​(VJDFAttributeMap vPart)
        sets all parts to those defined in vParts
        Parameters:
        vPart - vector of attribute maps for the parts
      • setPartMap

        protected void setPartMap​(JDFAttributeMap mPart)
        sets part to mPart
        Parameters:
        mPart - attribute map for the part to set
      • removePartMap

        protected void removePartMap​(JDFAttributeMap mPart)
        removes the part defined in mPart
        Parameters:
        mPart - attribute map for the part to remove
      • hasPartMap

        protected boolean hasPartMap​(JDFAttributeMap mPart)
        checks whether the part defined in mPart is included in this
        Parameters:
        mPart - Attribute map to check
        Returns:
        true if this has a part containing mPart
      • requiredLevel

        @Deprecated
        public static boolean requiredLevel​(JDFElement.EnumValidationLevel level)
        Deprecated.
        use EnumValidationLevel.isRequired()
        returns true if the enumeration level is either Complete or RecursiveComplete, i.e. if the parameter is required
        Parameters:
        level - the level to check
        Returns:
        true if required
      • getHRefs

        @Deprecated
        public VString getHRefs​(VString vDoneRefs,
                                boolean bRecurse)
        Deprecated.
        use getHRefs(VString vDoneRefs, boolean bRecurse, boolean bExpand)
        GetHRefs - get inter-resource linked resource IDs
        Parameters:
        vDoneRefs -
        bRecurse - if true, recurse followed refs
        Returns:
        VString
      • getHRefs

        public VString getHRefs​(VString vDoneRefs,
                                boolean bRecurse,
                                boolean bExpand)
        GetHRefs - get inter-resource linked resource IDs
        Parameters:
        vDoneRefs - (use null by default)
        bRecurse - if true recurse followed refs
        bExpand - if true expand partitioned resources
        Returns:
        VString - the vector of referenced resource IDs
      • getvHRefRes

        @Deprecated
        public VElement getvHRefRes​(boolean bRecurse)
        Deprecated.
        use getvHRefRes(true,false);
        get inter-resource linked resource vector
        Parameters:
        bRecurse -
        Returns:
        VElement
      • getvHRefRes

        public VElement getvHRefRes​(boolean bRecurse,
                                    boolean bExpand)
        get inter-resource linked resource vector
        Parameters:
        bRecurse - if true, recurse followed links
        bExpand - if true, expand partitioned resources and follow the refs from the leaves
        Returns:
        VElement - the inter-resource linked resource vector
      • appendrRefs

        @Deprecated
        public void appendrRefs​(java.lang.String value)
        Deprecated.
        rRefs was deprecated in JDF 1.2
        Append to attribute rRefs if it is not yet in the list
        Parameters:
        value - the rRef token to append
      • removeFromrRefs

        @Deprecated
        public int removeFromrRefs​(java.lang.String value)
        Deprecated.
        rRefs was deprecated in JDF 1.2
        Remove value from attribute rRefs if it is in the list
        Parameters:
        value - the rRef token to remove from the NMTOKENS list
        Returns:
      • getrRefs

        @Deprecated
        public VString getrRefs()
        Deprecated.
        rRefs was deprecated in JDF 1.2
        Get string attribute rRefs, i.e. split the blank separed attribute list
        Returns:
      • getLinkRoot

        public JDFResource getLinkRoot​(java.lang.String id)
        Gets the root resource of the target returns a null JDFElement if it does not exist or the name mangling is illegal
        Parameters:
        id - the id of the linked root. If null, the id of this is used.
        Returns:
        JDFResource the resource root of the resource referenced by this resource link
      • getLinkFromUserData

        protected JDFResource getLinkFromUserData​(java.lang.String myid)
      • version

        @Deprecated
        public final java.lang.String version()
        Deprecated.
        use getDefaultJDFVersion()
        returns the official JDF version string
        Returns:
        String: the inherited version information or "1.3" if no valid version info was found
      • write2Dir

        public java.io.File write2Dir​(java.lang.String dir)
        write to a directory - potentially generating a jobPartID
        Parameters:
        dir -
        Returns:
      • setVersion

        public void setVersion​(JDFElement.EnumVersion enumVer)
        set Version to enumVer
        Parameters:
        enumVer - the EnumVersion to set
      • getVersion

        @Deprecated
        public JDFElement.EnumVersion getVersion()
        Deprecated.
        060505 use getVersion(boolean);
        get EnumVersion attribute Version
        Returns:
        EnumVersion - attribute value
      • getVersion

        public JDFElement.EnumVersion getVersion​(boolean bInherit)
        get the version of this element
        Parameters:
        bInherit - if true, check ancestor nodes
        Returns:
        the version corresponding to this element
      • getMaxVersion

        public JDFElement.EnumVersion getMaxVersion​(boolean bInherit)
        get attribute MaxVersion, defaults to version if not set
        Parameters:
        bInherit - if true recurse through ancestors when searching
        Returns:
        EnumVersion - attribute value default - getMaxVersion(false)
      • stringToVersion

        @Deprecated
        public static JDFElement.EnumVersion stringToVersion​(java.lang.String enumName)
        Deprecated.
        use EnumVersion.getEnum
        Parameters:
        enumName -
        Returns:
        EnumVersion
      • getChildElements

        @Deprecated
        public KElement[] getChildElements()
        Deprecated.
        use KElement.getChildElementArray()
        not typesafe in case of elements in foreign namespaces note that this method previously returned JDFElement[]
        Method getChildElements.
        Returns:
        JDFElement[]
      • copyChildren

        public void copyChildren​(java.lang.String elementName,
                                 KElement src)
        Overrides:
        copyChildren in class KElement
        Parameters:
        elementName -
        src -
      • getChildElement

        @Deprecated
        public JDFElement getChildElement​(int n)
        Deprecated.
        use getElement(null, null ,n)
        Method getChildElement
        Parameters:
        n - Element index n (1 based)
        Returns:
        JDFElement
      • getUnknownPoolElements

        protected VString getUnknownPoolElements​(JDFElement.EnumPoolType poolType,
                                                 int nMax)
        get unknown elements for a specific pool
        Parameters:
        poolType - the PoolType to look for
        nMax - max. number of elements to retrieve
        Returns:
        VString of unknown pool elements
      • setSettingsPolicy

        public void setSettingsPolicy​(JDFElement.EnumSettingsPolicy value)
        Set attribute SettingsPolicy
        Parameters:
        value - the SettingsPolicy to set
      • getSettingsPolicy

        public JDFElement.EnumSettingsPolicy getSettingsPolicy​(boolean bInherit)
        Typesafe enumerated attribute SettingsPolicy
        Parameters:
        bInherit - recurse through ancestors when searching
        Returns:
      • setBestEffortExceptions

        public void setBestEffortExceptions​(VString value)
        Sets attribute BestEffortExceptions with the vector of values
        Parameters:
        value - vector of BestEffortExceptions tokens
      • appendBestEffortExceptions

        public void appendBestEffortExceptions​(java.lang.String value)
        Append a token to attribute BestEffortExceptions
        Parameters:
        value - the new BestEffortExceptions token
      • removeFromBestEffortExceptions

        public void removeFromBestEffortExceptions​(java.lang.String value)
        Remove a token from attribute BestEffortExceptions
        Parameters:
        value - the BestEffortExceptions token to remove
      • getBestEffortExceptions

        public java.lang.String getBestEffortExceptions()
        Gets the value of attribute BestEffortExceptions
        Returns:
        the attribute value
      • setMustHonorExceptions

        public void setMustHonorExceptions​(VString value)
        Sets attribute MustHonorExceptions with the vector of values
        Parameters:
        value - vector of MustHonorExceptions tokens
      • appendMustHonorExceptions

        public void appendMustHonorExceptions​(java.lang.String value)
        Append a token to attribute MustHonorExceptions
        Parameters:
        value - the new of MustHonorExceptions token
      • removeFromMustHonorExceptions

        public void removeFromMustHonorExceptions​(java.lang.String value)
        Remove a token from attribute MustHonorExceptions
        Parameters:
        value - the new of MustHonorExceptions token
      • getMustHonorExceptions

        public java.lang.String getMustHonorExceptions()
        gets the value of attribute MustHonorExceptions
        Returns:
        the attribute value
      • setOperatorInterventionExceptions

        public void setOperatorInterventionExceptions​(VString value)
        Sets attribute OperatorInterventionExceptions with the vector of values
        Parameters:
        value - the vector of OperatorInterventionExceptions tokens
      • appendOperatorInterventionExceptions

        public void appendOperatorInterventionExceptions​(java.lang.String value)
        Append a token to attribute OperatorInterventionExceptions
        Parameters:
        value - the new of OperatorInterventionExceptions token
      • removeFromOperatorInterventionExceptions

        public void removeFromOperatorInterventionExceptions​(java.lang.String value)
        Remove a token from attribute OperatorInterventionExceptions
        Parameters:
        value - the new of OperatorInterventionExceptions token
      • getOperatorInterventionExceptions

        public java.lang.String getOperatorInterventionExceptions()
        gets the value of attribute OperatorInterventionExceptions
        Returns:
        the attribute value
      • setDescriptiveName

        public void setDescriptiveName​(java.lang.String value)
        Set attribute DescriptiveName
        Parameters:
        value - value to set the attribute to
      • getDescriptiveName

        public java.lang.String getDescriptiveName()
        Get string attribute DescriptiveName
        Returns:
        the attribute value
      • appendGeneralID

        public JDFGeneralID appendGeneralID()
        append an empty GeneralID
        Returns:
        the newly created GeneralID
      • appendGeneralID

        public JDFGeneralID appendGeneralID​(java.lang.String idUsage,
                                            java.lang.String idValue)
        append a GeneralID with idValue, duplicate entries are retained generalID elements are always placed first and new GeneralID elements are appended at the end of the list
        Parameters:
        idUsage - the IDUsage attribute of the generalID
        idValue - the IDValue attribute of the generalID
        Returns:
        the newly created GeneralID
      • appendGeneralID

        public JDFGeneralID appendGeneralID​(java.lang.String idUsage,
                                            java.lang.String idValue,
                                            JDFAutoGeneralID.EnumDataType namedfeature)
        append a GeneralID with idValue, duplicate entries are retained generalID elements are always placed first and new GeneralID elements are appended at the end of the list
        Parameters:
        idUsage - the IDUsage attribute of the generalID
        idValue - the IDValue attribute of the generalID
        namedfeature - the datatype - may be null
        Returns:
        the newly created GeneralID
      • getGeneralID

        public JDFGeneralID getGeneralID​(int i)
        gets attribute GeneralID
        Parameters:
        i - get the i'th element that fits
        Returns:
        the attribute value
      • setGeneralID

        public JDFGeneralID setGeneralID​(java.lang.String idUsage,
                                         java.lang.String idValue)
        Creates or Updates a GeneralID with the IDUsage idUsage and IDValue=idValue all entries with a duplicate idUsage are removed
        Parameters:
        idUsage - usage to set the attribute to
        idValue - value to set the attribute to
        Returns:
        the newly set GeneralID
      • removeGeneralID

        public void removeGeneralID​(java.lang.String idUsage)
        removes GeneralID with the IDUsage idUsage
        Parameters:
        idUsage - value to set the attribute to
      • getGeneralID

        public java.lang.String getGeneralID​(java.lang.String idUsage)
        Gets IDValue of the GeneralID with IDUsage=idUsage null, if none exists
        Parameters:
        idUsage -
        Returns:
        String the attribute value
      • getGeneralID

        public java.lang.String getGeneralID​(java.lang.String idUsage,
                                             int iPos)
        Gets IDValue of the GeneralID with IDUsage=idUsage null, if none exists
        Parameters:
        idUsage -
        iPos -
        Returns:
        String the attribute value
      • getGeneralIDVectorMap

        @Deprecated
        public VectorMap<java.lang.String,​JDFGeneralID> getGeneralIDVectorMap()
        Deprecated.
        Gets a map of all GeneralID key-value Pair lists if multiple generalIDs with the same IDUsage are specified, each GeneralID is added to the VectorMap
        Returns:
        VectorMap the map of lists of attribute values
      • getGeneralIDListMap

        public ListMap<java.lang.String,​JDFGeneralID> getGeneralIDListMap()
        Gets a map of all GeneralID key-value Pair lists if multiple generalIDs with the same IDUsage are specified, each GeneralID is added to the VectorMap
        Returns:
        VectorMap the map of lists of attribute values
      • getGeneralIDMap

        public JDFAttributeMap getGeneralIDMap()
        Gets a map of all GeneralID key-value Pairs if multiple generalIDs with the same IDUsage are specified, the last one is added to the map
        Returns:
        JDFAttributeMap the map of attribute values
      • appendElement

        public KElement appendElement​(java.lang.String elementName,
                                      java.lang.String nameSpaceURI)
        Overrides:
        appendElement in class KElement
        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
        Throws:
        JDFException - if you tried to append an element into an unspecified namespace
      • appendComment

        public JDFComment appendComment()
        Appends element Comment to the end of 'this'
        Returns:
        the newly created JDFComment
      • getCreateComment

        public JDFComment getCreateComment​(int iSkip)
        Gets the iSkip-th element Comment. If doesn't exist, creates it
        Parameters:
        iSkip - number of elements to skip
        Returns:
        the newly created JDFComment
      • getComment

        public JDFComment getComment​(int iSkip)
        Gets the iSkip-th element Comment
        Parameters:
        iSkip - number of elements to skip
        Returns:
        JDFComment - the matching element
      • getComment

        public JDFComment getComment​(java.lang.String _name,
                                     int index)
        Gets the Comment with a given @Name
        Parameters:
        _name - Comment/@Name
        index - number of elements to skip
        Returns:
        JDFComment - the matching element
      • getCommentText

        public java.lang.String getCommentText​(java.lang.String _name,
                                               int index)
        Gets the Comment with a given @Name
        Parameters:
        _name - Comment/@Name
        index - number of elements to skip
        Returns:
        JDFComment - the matching element
      • getCreateComment

        public JDFComment getCreateComment​(java.lang.String _name,
                                           int index)
        Gets the Comment with a give @Name
        Parameters:
        _name - Comment/@Name
        index - number of elements to skip
        Returns:
        JDFComment - the matching element
      • appendPreview

        public JDFPreview appendPreview()
        Appends element JDFPreview to the end of 'this'
        Returns:
        the newly created JDFPreview
      • getCreatePreview

        public JDFPreview getCreatePreview​(int iSkip)
        Gets the iSkip-th element JDFPreview. If doesn't exist, creates it
        Parameters:
        iSkip - number of elements to skip
        Returns:
        the newly created JDFPreview
      • getPreview

        public JDFPreview getPreview​(int iSkip)
        Gets the iSkip-th element Comment
        Parameters:
        iSkip - number of elements to skip
        Returns:
        JDFPreview - the matching element
      • getChildWithMatchingAttribute

        public JDFElement getChildWithMatchingAttribute​(java.lang.String nodeName,
                                                        java.lang.String attName,
                                                        java.lang.String nameSpaceURI,
                                                        java.lang.String attVal,
                                                        int index,
                                                        boolean bDirect,
                                                        AttributeInfo.EnumAttributeType dataType)
        Gets a child with matching attributes, also follows refelements
        Parameters:
        nodeName - name of the child node to search for
        attName - attribute name to search for
        nameSpaceURI - namespace to search for
        attVal - a special value to search for
        index - if more then one child meets the condition, you can specify the one to return via an index
        bDirect - if true, look only in direct children, else search through all children, grandchildren etc.
        dataType - dataType to be matched
        Returns:
        JDFElement: the element which matches the above conditions
      • getChildWithAttribute

        public KElement getChildWithAttribute​(java.lang.String nodeName,
                                              java.lang.String attName,
                                              java.lang.String nameSpaceURI,
                                              java.lang.String attVal,
                                              int index,
                                              boolean bDirect)
        GetChildWithAttribute - Get a child with matching attributes

        default: getChildWithAttribute(nodeName, attName, null,attValue, 0, true)

        Overrides:
        getChildWithAttribute in class KElement
        Parameters:
        nodeName - name of the child node to search for
        attName - attribute name to search for
        nameSpaceURI - namespace to search for
        attVal - the attribute value to search for, Wildcard supported ( null)
        index - if more then one child meets the condition, you can specify the one to return via an index
        bDirect - if true, looks only in direct children, else search through all children, grandchildren etc.
        Returns:
        KElement the element which matches the above conditions
      • includesMatchingAttribute

        public boolean includesMatchingAttribute​(java.lang.String attName,
                                                 java.lang.String attVal,
                                                 AttributeInfo.EnumAttributeType dataType)
        test whether the attributes described by attName and attVal exist
        Parameters:
        attName - the name of the attribute to look for
        attVal - the value of the attribute to look for; a values of "*" is treated as true if the attribute exists, regardless of its value
        dataType - the dataType to be matched
        Returns:
        true, if such attribute exists
      • setStatus

        public void setStatus​(JDFElement.EnumNodeStatus s)
        Sets attribute Status
        Parameters:
        s - the status to set the attribute to
      • getDeepElementByID

        protected static KElement getDeepElementByID​(KElement base,
                                                     java.lang.String attName,
                                                     java.lang.String id,
                                                     KElement childToExclude,
                                                     XMLDocUserData ud)
        this is an optimized version of GetDeepElement() which returns a complete list of elements. Here we abort, when we found the first element that fits. (There is only one element, because the id must be unique)
        Parameters:
        base -
        attName - attribute name
        id - attribute ID value
        childToExclude - here can be specified, if this method should exclude a child-element when searching This is useful, when searching a tree up
        ud - userdata with reference to id cache, if null, no caching
        Returns:
        KElement the element specified by id and name
      • getAllRefs

        public java.util.HashSet<JDFElement> getAllRefs​(java.util.HashSet<JDFElement> vDoneRefs,
                                                        boolean bRecurse)
        Gets inter-resource linked resource IDs
        Parameters:
        vDoneRefs - (use null as default value)
        bRecurse - if true, return recursively linked IDs as well
        Returns:
        the HashSet of all refElements
      • matchesPath

        public boolean matchesPath​(java.lang.String path,
                                   boolean bFollowRefs)
        check whether this matches a simple xpath - note that references are NOT followed in case a node name is replaced with a "*"
        Overrides:
        matchesPath in class KElement
        Parameters:
        path - xpath to match
        Returns:
        boolean true, if this matches the given xpath
      • getValueForNewAttribute

        public static java.lang.String getValueForNewAttribute​(KElement ke,
                                                               java.lang.String attName)
        gets a reasonable value for an attribute
        Parameters:
        ke -
        attName -
        Returns:
      • getURLDoc

        protected JDFDoc getURLDoc​(java.lang.String url)
        returns the jdf doc referenced by url
        Parameters:
        url -
        Returns:
        the document
      • getURLInputStream

        protected java.io.InputStream getURLInputStream​(java.lang.String url)
        get the input stream that reads from URL
        Parameters:
        url -
        Returns:
        InputStream the input stream that the url points to, null if the url is inaccessible
      • getSchemaURL

        public static java.lang.String getSchemaURL​(JDFElement.EnumVersion version)
        get the schemaURL based on a version
        Parameters:
        version -
        Returns:
      • init

        public boolean init()
        Description copied from class: KElement
        Method init. Superclass of all inits
        Overrides:
        init in class KElement
        Returns:
        boolean true always
        See Also:
        KElement.init()