Class JDFResourcePool

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

      • JDFResourcePool

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

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

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

      • getLinkInfoTable

        public static ElemInfoTable[] getLinkInfoTable()
        gets the elemeinfotable for the resourcelinkpool based on this pool
        Note that the cardinality is not updated and that the pool should be used for version checks only
        Returns:
        ElemInfoTable[] the resourcelinkpools elemeninfotable
      • toString

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

        public VString getResIds()
        GetResIds - returns a set of all IDs of the resources that are in this pool
        Returns:
        Vector - all IDs of the pool childs
      • getResource

        public JDFResource getResource​(java.lang.String strName,
                                       int i,
                                       java.lang.String nameSpaceURI)
        Method GetResource.

        default: GetResource(name, 0, JDFConstants.EMPTYSTRING)

        Parameters:
        strName - name of the resource to look for
        i - the index of the child, or -1 to create a new one
        nameSpaceURI - the namespace to search in
        Returns:
        JDFResource: the resource you were looking for, null if not found
      • appendResource

        public JDFResource appendResource​(JDFResource res)
        append an existing resource by moving it here
        Parameters:
        res - name of the resource to append
        Returns:
        JDFResource: the appended resource
      • appendResource

        public JDFResource appendResource​(java.lang.String strName,
                                          JDFResource.EnumResourceClass resClass,
                                          java.lang.String nameSpaceURI)
        append a resource

        default: AppendResource(name, resClass, null)

        Parameters:
        strName - name of the resource to append
        resClass - class of the resource to append
        nameSpaceURI - the namespace for the resource
        Returns:
        JDFResource: the appended resource
      • copyResource

        @Deprecated
        public VString copyResource​(JDFResource r,
                                    JDFResource.EnumSpawnStatus copyStatus,
                                    VJDFAttributeMap vParts,
                                    java.lang.String spawnID)
        Deprecated.
        use JDFNode.copySpawnedResources
        copies a resource recursively, optionally fixes status flags and locks in the source resource

        default: copyResource(r, null, new VJDFAttributeMap(), null)

        Parameters:
        r - the resource to copy into this
        copyStatus - rw or ro
        vParts - part map vector of the partitions to copy
        spawnID - the spawnID of the spawning that initiated the copy
        Returns:
        VString: vector of resource names that have been copied
      • getPoolChildren

        public VElement getPoolChildren​(java.lang.String strName,
                                        JDFAttributeMap mAttrib,
                                        java.lang.String nameSpaceURI)
        Method GetPoolChildren Gets all children with the attribute name,mAttrib, nameSpaceURI out of the pool
        Parameters:
        strName - - name of the child
        mAttrib - - a attribute to search for
        nameSpaceURI -
        Returns:
        VElement - a vector with all elements in the pool matching the conditions default: GetPoolChildren(null, null, null)
      • getPoolChild

        public JDFResource getPoolChild​(int i,
                                        java.lang.String strName,
                                        JDFAttributeMap mAttrib,
                                        java.lang.String nameSpaceURI)
        Method getPoolChild
        get a child resource from the pool matching the parameters

        default: GetPoolChild(i, null, null, null)

        Parameters:
        i - the index of the child or -1 to make a new one.
        strName - the name of the element
        mAttrib - the attribute of the element
        nameSpaceURI - the namespace to search in
        Returns:
        JDFResource: the pool child matching the conditions above
      • getUnknownElements

        public VString getUnknownElements​(boolean bIgnorePrivate,
                                          int nMax)
        return a vector of unknown element nodenames

        default: GetUnknownElements(true, 99999999)

        Overrides:
        getUnknownElements in class JDFElement
        Parameters:
        bIgnorePrivate - ignores private elements. !Must be here to provide correct validation
        nMax - - max entries in vector
        Returns:
        Vector of unknown element nodenames
      • getResourceByID

        public JDFResource getResourceByID​(java.lang.String id)
        returns a the resource with ID=id, if it is in this pool
        Parameters:
        id - the ID of the requested resource
        Returns:
        JDFResource: the resource, empty element if it does not exist
      • getAllRefs

        public java.util.HashSet<JDFElement> getAllRefs​(java.util.HashSet<JDFElement> vDoneRefs,
                                                        boolean bRecurse)
        get refElements
        Overrides:
        getAllRefs in class JDFElement
        Parameters:
        vDoneRefs - used internally for recursion
        bRecurse - if true, also return recursively linked IDs
        Returns:
        HashSet: the vector of referenced resource IDs
      • getUnlinkedResources

        public VElement getUnlinkedResources()
        get all completely unlinked resources
        Returns:
        V the vector of unlinked resources.