Class TaskValues

java.lang.Object
com.uc4.api.objects.TaskValues

public class TaskValues extends Object
This class represents task values and PromptSets.
  • Constructor Details

    • TaskValues

      protected TaskValues(com.uc4.util.XMLDocument doc, Element task)
  • Method Details

    • getInheritFromParent

      public int getInheritFromParent()
      Returns an integer which describes how variable values are inherited from its parent.
      • 0 ... All values
      • 1 ... Defined values only
      • 2 ... None
      Returns:
      Inherit mode
    • valueKeyIterator

      public Iterator<String> valueKeyIterator()
      Returns an iterator over validity keywords. All validity keywords have the type java.lang.String
      Returns:
      Iterator
    • parentValueKeyIterator

      public Iterator<String> parentValueKeyIterator()
      Returns an iterator over parent validity keywords. All parent validity keywords have the type java.lang.String
      Returns:
      Iterator
    • replaceValue

      public boolean replaceValue(String kw, String value)
      Replaces an existing value.
      Parameters:
      kw - Key
      value - Value
      Returns:
      If true the value will be replaced if a key with this name does already exist
    • replaceValueOnlyIfChanged

      @Deprecated public boolean replaceValueOnlyIfChanged(String kw, String value)
      Deprecated.
      Deprecated, kept only for binary compatibility.
      Replaces an existing value and overrideDefinition if values differ. The semantics of this method have turned out to not make sense - don't use it.
      Parameters:
      kw - Key
      value - Value
      Returns:
      If true the value and the overrideDefinition will be replaced if a key with this name already exists.
    • valueSize

      public int valueSize()
      Returns:
      Number of entries in the Variable.
    • parentValueSize

      public int parentValueSize()
      Returns:
      Number of entries in the parent Variable.
    • promptSetSize

      public int promptSetSize()
      Returns:
      Number of PromptSet entries
    • promptSetIterator

      public Iterator<PromptSetDefinition> promptSetIterator()
      Returns an iterator over PromptSetDefinition.
      Returns:
      Iterator
    • getValue

      public String getValue(String validityKeyword)
      Returns the value for a given validity keyword The method returns null if the validity keyword does not exist.
      Parameters:
      validityKeyword - Key
      Returns:
      Value or null if the key does not exist
    • isValueOverridden

      public boolean isValueOverridden(String validityKeyword)
      Returns if the value for a given validity keyword (variable) was overridden
      Parameters:
      validityKeyword - Key
      Returns:
      overridden value or false if the key does not exist
    • getParentValue

      public String getParentValue(String validityKeyword)
      Returns the parent value for a given validity keyword The method returns null if the validity keyword does not exist.
      Parameters:
      validityKeyword - Key
      Returns:
      Parent value or null if the key does not exist
    • getErtUsage

      public ErtUsage getErtUsage(String validityKeyword)
      Returns the ErtUsage value for a given validity keyword The method returns ErtUsage.NONE if the validity keyword does not exist.
      Parameters:
      validityKeyword - Key
      Returns:
      Return the ErtUsage or ErtUsage.NONE if the key does not exist
    • getParentErtUsage

      public ErtUsage getParentErtUsage(String validityKeyword)
      Returns the ErtUsage value of the parent, for a given validity keyword The method returns ErtUsage.NONE if the validity keyword does not exist.
      Parameters:
      validityKeyword - Key
      Returns:
      Return the ErtUsage or ErtUsage.NONE if the key does not exist
    • copy

      public TaskValues copy()
      This method is used to return the copy of the TaskValues Object.
      Returns:
      TaskValues