Package com.uc4.api.objects
Class TaskValues
- java.lang.Object
-
- com.uc4.api.objects.TaskValues
-
public class TaskValues extends java.lang.Object
This class represents task values and PromptSets.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TaskValues(com.uc4.util.XMLDocument doc, org.w3c.dom.Element task)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TaskValues
copy()
This method is used to return the copy of the TaskValues Object.ErtUsage
getErtUsage(java.lang.String validityKeyword)
Returns theErtUsage
value for a given validity keyword The method returnsErtUsage.NONE
if the validity keyword does not exist.int
getInheritFromParent()
Returns an integer which describes how variable values are inherited from its parent.ErtUsage
getParentErtUsage(java.lang.String validityKeyword)
Returns theErtUsage
value of the parent, for a given validity keyword The method returnsErtUsage.NONE
if the validity keyword does not exist.java.lang.String
getParentValue(java.lang.String validityKeyword)
Returns the parent value for a given validity keyword The method returnsnull
if the validity keyword does not exist.java.lang.String
getValue(java.lang.String validityKeyword)
Returns the value for a given validity keyword The method returnsnull
if the validity keyword does not exist.boolean
isValueOverridden(java.lang.String validityKeyword)
Returns if the value for a given validity keyword (variable) was overriddenjava.util.Iterator<java.lang.String>
parentValueKeyIterator()
Returns an iterator over parent validity keywords.int
parentValueSize()
java.util.Iterator<PromptSetDefinition>
promptSetIterator()
Returns an iterator overPromptSetDefinition
.int
promptSetSize()
boolean
replaceValue(java.lang.String kw, java.lang.String value)
Replaces an existing value.boolean
replaceValueOnlyIfChanged(java.lang.String kw, java.lang.String value)
Deprecated.Deprecated, kept only for binary compatibility.java.util.Iterator<java.lang.String>
valueKeyIterator()
Returns an iterator over validity keywords.int
valueSize()
-
-
-
Method Detail
-
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 java.util.Iterator<java.lang.String> valueKeyIterator()
Returns an iterator over validity keywords. All validity keywords have the typejava.lang.String
- Returns:
- Iterator
-
parentValueKeyIterator
public java.util.Iterator<java.lang.String> parentValueKeyIterator()
Returns an iterator over parent validity keywords. All parent validity keywords have the typejava.lang.String
- Returns:
- Iterator
-
replaceValue
public boolean replaceValue(java.lang.String kw, java.lang.String value)
Replaces an existing value.- Parameters:
kw
- Keyvalue
- Value- Returns:
- If true the value will be replaced if a key with this name does already exist
-
replaceValueOnlyIfChanged
@Deprecated public boolean replaceValueOnlyIfChanged(java.lang.String kw, java.lang.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
- Keyvalue
- 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 java.util.Iterator<PromptSetDefinition> promptSetIterator()
Returns an iterator overPromptSetDefinition
.- Returns:
- Iterator
-
getValue
public java.lang.String getValue(java.lang.String validityKeyword)
Returns the value for a given validity keyword The method returnsnull
if the validity keyword does not exist.- Parameters:
validityKeyword
- Key- Returns:
- Value or null if the key does not exist
-
isValueOverridden
public boolean isValueOverridden(java.lang.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 java.lang.String getParentValue(java.lang.String validityKeyword)
Returns the parent value for a given validity keyword The method returnsnull
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(java.lang.String validityKeyword)
Returns theErtUsage
value for a given validity keyword The method returnsErtUsage.NONE
if the validity keyword does not exist.- Parameters:
validityKeyword
- Key- Returns:
- Return the
ErtUsage
orErtUsage.NONE
if the key does not exist
-
getParentErtUsage
public ErtUsage getParentErtUsage(java.lang.String validityKeyword)
Returns theErtUsage
value of the parent, for a given validity keyword The method returnsErtUsage.NONE
if the validity keyword does not exist.- Parameters:
validityKeyword
- Key- Returns:
- Return the
ErtUsage
orErtUsage.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
-
-