|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.middleware.rdf.Resource
org.universAAL.middleware.rdf.FinalizedResource
org.universAAL.middleware.ui.rdf.FormElement
org.universAAL.middleware.ui.rdf.FormControl
org.universAAL.middleware.ui.rdf.Input
org.universAAL.middleware.ui.rdf.Select
public class Select
An input control to be used if the user input is restricted to a fixed list
of acceptable values. As it allows multiple selections, it can be seen as an
abbreviation for a Repeat
control having only a Select1
as
child.
Field Summary | |
---|---|
static String |
MY_URI
|
static String |
PROP_CHOICES
The list of choices in a select control. |
Fields inherited from class org.universAAL.middleware.ui.rdf.Input |
---|
PROP_INPUT_ALERT, PROP_IS_MANDATORY |
Fields inherited from class org.universAAL.middleware.ui.rdf.FormControl |
---|
PROP_CONTROL_LABEL, PROP_HELP, PROP_HINT, PROP_PARENT_CONTROL, PROP_REFERENCED_PPATH, PROP_VALUE_RESTRICTION |
Fields inherited from class org.universAAL.middleware.ui.rdf.FormElement |
---|
PROP_APPEARANCE |
Fields inherited from class org.universAAL.middleware.rdf.Resource |
---|
ANON_URI_PREFIX, blockAddingTypes, isXMLLiteral, ns_delim_index, PROP_RDF_FIRST, PROP_RDF_REST, PROP_RDF_TYPE, PROP_RDFS_COMMENT, PROP_RDFS_LABEL, PROP_SERIALIZATION_FULL, PROP_SERIALIZATION_OPTIONAL, PROP_SERIALIZATION_REDUCED, PROP_SERIALIZATION_UNDEFINED, PROP_uAAL_INVOLVED_HUMAN_USER, props, RDF_EMPTY_LIST, RDF_NAMESPACE, RDFS_NAMESPACE, TYPE_RDF_LIST, TYPE_RDFS_CLASS, uAAL_NAMESPACE_PREFIX, uAAL_SERVICE_NAMESPACE, uAAL_VOCABULARY_NAMESPACE, uri |
Constructor Summary | |
---|---|
|
Select()
Just for use by de-serializers. |
|
Select(Group parent,
Label label,
PropertyPath ref,
MergedRestriction valueRestriction,
Object initialValue)
For use by applications. |
protected |
Select(String typeURI,
Group parent,
Label label,
PropertyPath ref,
MergedRestriction valueRestriction,
Object initialValue)
|
Method Summary | |
---|---|
void |
addChoiceItem(ChoiceItem item)
Adds the given choice item to the list of choices in this select control. |
void |
addChoiceList(ChoiceList list)
Adds the given choice list as a sublist to the list of choices in this select control. |
boolean |
generateChoices()
If the restrictions defined or derivable for this select control can be determined and a certain list of allowed values can be derived from those restriction, those values will be passed to generateChoices(Object[]) to construct the list of choices. |
boolean |
generateChoices(Object[] elems)
Having the actual values that the user should select from among them, this method automatically generates the list of choices for this select by trying to derive a label for them. |
Label[] |
getChoices()
Returns the list of choices in this select control. |
int |
getMaxCardinality()
Returns the maximum number of values that can be selected in the context of this select control. |
int |
getMaxLength()
Overrides FormControl.getMaxLength() by only considering the
labels of the choices currently associated with this select control. |
int |
getMinCardinality()
Returns the minimum number of values that must be associated with this select control as selected values. |
boolean |
isMultilevel()
Checks if any sublist is contained in the list of choices in this select control. |
boolean |
setProperty(String propURI,
Object value)
Just for use by de-serializers. |
boolean |
storeUserInputByLabelString(String selectedLabelString)
Tries to find the hidden value associated with a choice item whose label has been given as input and then store that value as user input by calling Input.storeUserInput(Object) . |
Methods inherited from class org.universAAL.middleware.ui.rdf.Input |
---|
getAlertString, isMandatory, setAlertString, storeUserInput |
Methods inherited from class org.universAAL.middleware.ui.rdf.FormControl |
---|
getAncestorRepeat, getFormObject, getHelpString, getHintString, getLabel, getParentGroup, getParentRepeat, getReferencedPPath, getRestrictions, getSuperGroups, getTypeURI, getValue, hasFocus, hasValue, isOfBooleanType, isOfPrimitiveType, isRepeatable, setHelpString, setHintString, toString |
Methods inherited from class org.universAAL.middleware.ui.rdf.FormElement |
---|
addAppearanceRecommendation, getAppearanceRecommendations |
Methods inherited from class org.universAAL.middleware.rdf.FinalizedResource |
---|
addType, getLocalName, getNamespace, getProperty, getPropertyURIs, getType, getTypes, getURI, hasQualifiedName, isAnon, numberOfProperties |
Methods inherited from class org.universAAL.middleware.rdf.Resource |
---|
addMultiLangProp, asList, asList, asRDFList, changeProperty, copy, deepCopy, equals, generateAnonURI, getDefaultLang, getFilename, getMultiLangProp, getOrConstructLabel, getPropSerializationType, getResource, getResourceComment, getResourceLabel, getStaticFieldValue, hashCode, hasProperty, isAnon, isBlockingAddingTypes, isClosedCollection, isQualifiedName, isWellFormed, literal, representsQualifiedURI, serializesAsXMLLiteral, setPropertyPath, setPropertyPath, setPropertyPathFromOffset, setResourceComment, setResourceLabel, toStringRecursive, toStringRecursive, unliteral |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String MY_URI
public static final String PROP_CHOICES
ChoiceItem
or ChoiceList
.
Constructor Detail |
---|
public Select()
public Select(Group parent, Label label, PropertyPath ref, MergedRestriction valueRestriction, Object initialValue)
parent
- The group to contain this select object.label
- The label.ref
- mandatory property path within the form data to which this
select object refers.valueRestriction
- Optional local restrictions on the value of this select
object.initialValue
- Optional initial / default value that will be made available
in the form data.protected Select(String typeURI, Group parent, Label label, PropertyPath ref, MergedRestriction valueRestriction, Object initialValue)
Method Detail |
---|
public void addChoiceItem(ChoiceItem item)
public void addChoiceList(ChoiceList list)
public boolean generateChoices(Object[] elems)
public boolean generateChoices()
generateChoices(Object[])
to construct the list of choices.
public Label[] getChoices()
ChoiceItem
or ChoiceList
.
public int getMaxCardinality()
public int getMaxLength()
FormControl.getMaxLength()
by only considering the
labels of the choices currently associated with this select control.
getMaxLength
in class FormControl
public int getMinCardinality()
public boolean isMultilevel()
public boolean setProperty(String propURI, Object value)
setProperty
in class Input
Resource.setProperty(String, Object)
public boolean storeUserInputByLabelString(String selectedLabelString)
Input.storeUserInput(Object)
. If no hidden value was found,
the label itself will be used as user input.
Note: for use by UI handlers that can not handle the association between
labels and values internally.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |