Class JDFResourcePool

java.lang.Object
org.apache.xerces.dom.NodeImpl
org.apache.xerces.dom.ChildNode
org.apache.xerces.dom.ParentNode
org.apache.xerces.dom.ElementImpl
org.apache.xerces.dom.ElementNSImpl
All Implemented Interfaces:
Serializable, Cloneable, IStreamWriter, Element, ElementTraversal, EventTarget, Node, NodeList, TypeInfo

public class JDFResourcePool extends JDFPool
See Also:
  • Constructor Details

    • JDFResourcePool

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

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

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

    • getTheElementInfo

      protected ElementInfo getTheElementInfo()
      Overrides:
      getTheElementInfo in class JDFElement
      Returns:
      the elementinfo
    • 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 String toString()
      toString
      Overrides:
      toString in class KElement
      Returns:
      String
      See Also:
    • 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(String strName, int i, 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(String strName, JDFResource.EnumResourceClass resClass, 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, 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(String strName, JDFAttributeMap mAttrib, 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, String strName, JDFAttributeMap mAttrib, 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(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 HashSet<JDFElement> getAllRefs(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.