Class SetHelper

    • Field Detail

      • PARAMETER_SET

        public static final java.lang.String PARAMETER_SET
    • Constructor Detail

      • SetHelper

        public SetHelper​(KElement set)
        Parameters:
        set - the set to help on
    • Method Detail

      • getAmountSum

        public double getAmountSum​(boolean bGood)
        Parameters:
        bGood - good=true
        Returns:
      • ensureReference

        public void ensureReference​(KElement src,
                                    java.lang.String key)
        ensure a reference *FROM* src
        Parameters:
        src -
        key - the reference key in src
      • isSet

        public static boolean isSet​(KElement e)
        is the element a set?
        Parameters:
        e -
        Returns:
      • isSet

        public static boolean isSet​(java.lang.String localName)
        is the element name a set?
        Parameters:
        localName -
        Returns:
      • getPartition

        public ResourceHelper getPartition​(java.lang.String key,
                                           java.lang.String value)
        Parameters:
        map -
        Returns:
      • getResource

        public ResourceHelper getResource​(java.lang.String key,
                                          java.lang.String value)
        Parameters:
        map -
        Returns:
      • getPartition

        public ResourceHelper getPartition​(int index)
        Parameters:
        index -
        Returns:
      • getResource

        public ResourceHelper getResource​(int index)
        Parameters:
        index -
        Returns:
      • getCreateVPartition

        public ResourceHelper getCreateVPartition​(VJDFAttributeMap vmap,
                                                  boolean addRes)
        get an existing partition with at least a matching partmap
        Parameters:
        vmap -
        addRes -
        Returns:
      • getCreateExactPartition

        public ResourceHelper getCreateExactPartition​(JDFAttributeMap map,
                                                      boolean addRes)
        get an existing partition with at least a matching partmap
        Parameters:
        vmap -
        addRes -
        Returns:
      • getCreatePartitions

        public java.util.Vector<ResourceHelper> getCreatePartitions​(VJDFAttributeMap vmap,
                                                                    boolean addRes)
        creates 1 partition for each entry in the map
        Parameters:
        vmap -
        addRes -
        Returns:
      • getCreatePartition

        public ResourceHelper getCreatePartition​(int index,
                                                 boolean addRes)
        Parameters:
        index -
        addRes -
        Returns:
      • getCreateResource

        public ResourceHelper getCreateResource​(int index,
                                                boolean addRes)
        Parameters:
        index -
        addRes -
        Returns:
      • removePartitions

        public void removePartitions()
        remove all partitions in this set
      • appendResource

        public ResourceHelper appendResource​(JDFAttributeMap partMap,
                                             boolean addRes)
        Parameters:
        partMap -
        addRes - if true, also add the detailed resource element, e.g. Layout
        Returns:
      • appendPartition

        public ResourceHelper appendPartition​(JDFAttributeMap partMap,
                                              boolean addRes)
        Parameters:
        partMap -
        addRes - if true, also add the detailed resource element, e.g. Layout
        Returns:
      • appendResource

        public ResourceHelper appendResource​(VJDFAttributeMap partMaps,
                                             boolean addRes)
        Parameters:
        partMap -
        addRes - if true, also add the detailed resource element, e.g. Layout
        Returns:
      • getPartitions

        public java.util.Vector<ResourceHelper> getPartitions()
        Returns:
        the vector of partition helpers
      • getPartitionList

        public java.util.List<ResourceHelper> getPartitionList()
        Returns:
        the list of partition helpers - never null
      • getResourceList

        public java.util.List<ResourceHelper> getResourceList()
        Returns:
        the list of partition helpers - never null
      • getName

        public java.lang.String getName()
        Returns:
        the name of the resource set also fixes it in case it needs to be calculated from kids
      • getPartitionName

        public java.lang.String getPartitionName()
        Returns:
      • getSetName

        public static java.lang.String getSetName​(KElement e)
        Parameters:
        e - the element to test
        Returns:
        then asset type name (Parameter, Resource etc)
      • getSetName

        public static java.lang.String getSetName​(java.lang.String setName)
        Parameters:
        setName - the name of the set element
        Returns:
        then asset type name (Parameter, Resource etc)
      • getSuperPartitions

        public java.util.Vector<ResourceHelper> getSuperPartitions​(JDFAttributeMap map)
        returns all partitions that are a superset of map
        Parameters:
        map -
        Returns:
      • getSet

        public KElement getSet()
        Returns:
      • getProcessUsage

        public java.lang.String getProcessUsage()
        Returns:
      • getCombinedProcessIndex

        public JDFIntegerList getCombinedProcessIndex()
        Returns:
      • removeTypeFromCPI

        public void removeTypeFromCPI​(int pos)
        remove a CPI process
        Parameters:
        typ -
        pos -
      • addTypeToCPI

        public void addTypeToCPI​(int pos)
        add a CPI process
        Parameters:
        typ -
        pos -
      • setCombinedProcessIndex

        public void setCombinedProcessIndex​(JDFIntegerList cpi)
      • setProcessUsage

        public void setProcessUsage​(java.lang.String processUsage)
      • getExternalID

        public java.lang.String getExternalID()
        Overrides:
        getExternalID in class BaseXJDFHelper
        Returns:
        the productID of the product
      • toString

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

        public ResourceHelper getPartition​(java.lang.String id)
        get a partition by id
        Parameters:
        id -
        Returns:
      • getPartMapVector

        public VJDFAttributeMap getPartMapVector()
        returns the unified partmaps
        Returns:
      • getPartMapList

        public java.util.List<JDFAttributeMap> getPartMapList()
        returns the unified partmaps
        Returns:
      • getPartMapVectors

        public java.util.Collection<VJDFAttributeMap> getPartMapVectors()
        Returns:
        the ordered collection of PartMapVectors of each child resource
      • getPartMapLists

        public java.util.Collection<java.util.List<JDFAttributeMap>> getPartMapLists()
        Returns:
        the ordered collection of PartMapVectors of each child resource
      • getDependentJobParts

        public VString getDependentJobParts()
        Returns:
      • setName

        public void setName​(java.lang.String name)
        Parameters:
        name -
      • removeIDs

        public void removeIDs()
      • indexOf

        public int indexOf​(ResourceHelper bsHelper)
        Parameters:
        bsHelper -
        Returns:
      • getHelper

        public static SetHelper getHelper​(KElement e)
        factory to create a helper from an element
        Parameters:
        root - the element to parse
        Returns:
        the helper
      • setExternalID

        public void setExternalID​(java.lang.String newID)
        See Also:
        BaseXJDFHelper.setExternalID(java.lang.String)
      • setDescriptiveName

        public void setDescriptiveName​(java.lang.String description)
        See Also:
        BaseXJDFHelper.setDescriptiveName(java.lang.String)
      • setGeneralID

        public JDFGeneralID setGeneralID​(java.lang.String idUsage,
                                         java.lang.String idValue)
        See Also:
        BaseXJDFHelper.setGeneralID(java.lang.String, java.lang.String)
      • matches

        public boolean matches​(java.lang.Object subset)
        Description copied from interface: IMatches
        returns true if subset somehow matches this the semantics are defined by the filtering algorithm, thus it could be a filter or a subset i.e. subset contains either equivalent elements or null and no non-matching elements matches(null) always returns true
        Specified by:
        matches in interface IMatches
        Parameters:
        subset - the object to filter against
        Returns:
        true if it matches
      • size

        public int size()
        the number of partitions (resource elements)
        Returns: