Class JDFRefElement

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

    public class JDFRefElement
    extends JDFElement
    See Also:
    Serialized Form
    • Constructor Detail

      • JDFRefElement

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

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

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

      • hasPart

        @Deprecated
        public boolean hasPart()
        Deprecated.
        060310 use inline hasChildElement(ElementName.PART, null);
        test Part element existence
        Returns:
      • setrRef

        public void setrRef​(java.lang.String value)
        Set attribute rRef
        Parameters:
        value - the value to set the attribute to
      • fitsName

        public boolean fitsName​(java.lang.String nodeName,
                                java.lang.String nameSpaceURI)
        returns true if the name specified fits the node name of this
        Overrides:
        fitsName in class KElement
        Parameters:
        nodeName - the name of the node to test. may be either local or qualified
        nameSpaceURI - the namespace of the node to test.
        Returns:
        true if ok
      • getrRef

        public java.lang.String getrRef()
        Get string attribute rRef
        Returns:
        String - the vaue of the attribute
      • setrSubRef

        @Deprecated
        public void setrSubRef​(java.lang.String value)
        Deprecated.
        in JDF 1.2
        Set attribute rSubRef
        Parameters:
        value - the value to set the attribute to
      • getrSubRef

        public java.lang.String getrSubRef()
        Get string attribute rSubRef
        Returns:
        String - the vaue of the attribute
      • isValid

        public boolean isValid​(JDFElement.EnumValidationLevel level)
        Description copied from class: JDFElement
        Mother of all validators
        Overrides:
        isValid in class JDFElement
        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
        See Also:
        JDFElement.isValid(org.cip4.jdflib.core.JDFElement.EnumValidationLevel)
      • validResourcePosition

        public boolean validResourcePosition()
        Returns:
      • getTargetRoot

        public JDFResource getTargetRoot()
        get the referenced target resource The resource's PartUsage is evaluated to correctly retrieve implicit or explicit partitions
        may return null
        Returns:
        JDFResource - the reference target partition
      • getTarget

        public JDFResource getTarget()
        get the referenced target resource The resource's PartUsage is evaluated to correctly retrieve implicit or explicit partitions
        may return null overrides the deprecated method JDFElement.getTarget()
        Overrides:
        getTarget in class JDFElement
        Returns:
        JDFResource - the reference target partition
      • getPart

        public JDFPart getPart()
        Get element Part
        Returns:
        JDFPart - the element
      • getRefNodeName

        public java.lang.String getRefNodeName()
        return the NodeName of the referenced resource
        Returns:
        the nodename of the referenced resource
      • getRefLocalName

        public java.lang.String getRefLocalName()
        return the Localname of the target
        Returns:
      • inlineRef

        public JDFElement inlineRef()
        inline this refElement by replacing it with a copy of its target
        Returns:
        JDFElement - the newly created element
        Throws:
        JDFException - if no target exists
      • deleteRef

        public JDFElement deleteRef​(boolean bCheckRefCount)
        delete this refElement and it's target
        Parameters:
        bCheckRefCount - if true, check that no other element refers to the target before deleting
        if bCheckRefCount=false, the target is force deleted
        Returns:
        JDFElement the deleted targeelement
        Since:
        290502
      • appendPart

        public JDFPart appendPart()
        Method AppendPart.
        Returns:
        JDFPart
      • getRefName

        public static java.lang.String getRefName​(java.lang.String base)
        Parameters:
        base -
        Returns:
      • getCreatePart

        public JDFPart getCreatePart()
        get element JDFPart, create one if it doesn't exist
        Returns:
        JDFPart
      • removePart

        @Deprecated
        public void removePart()
        Deprecated.
      • getPartMapVector

        @Deprecated
        public VJDFAttributeMap getPartMapVector()
        Deprecated.
        060310 not more than one is allowed - use getPartMap
        get part map vector
        Overrides:
        getPartMapVector in class JDFElement
        Returns:
        VJDFAttributeMap: vector of attribute maps, one for each part
      • setPartMap

        public void setPartMap​(JDFAttributeMap mPart)
        set all parts to those define in vParts
        Overrides:
        setPartMap in class JDFElement
        Parameters:
        mPart - attribute map for the part to set
      • removePartMap

        public void removePartMap​(JDFAttributeMap mPart)
        Description copied from class: JDFElement
        removes the part defined in mPart
        Overrides:
        removePartMap in class JDFElement
        Parameters:
        mPart - attribute map for the part to remove
      • hasPartMap

        public boolean hasPartMap​(JDFAttributeMap mPart)
        check whether the part defined in mPart is included
        Overrides:
        hasPartMap in class JDFElement
        Parameters:
        mPart - attribute map for the part to remove
        Returns:
        boolean - returns true if the part exists