|
||||||||||
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
public abstract class FormControl
The structural unit of forms that may bear information to be presented to human users and / or serve as a placeholder for user input.
Field Summary | |
---|---|
static String |
PROP_CONTROL_LABEL
Form controls may have a Label . |
static String |
PROP_HELP
Form controls may have a help string to be presented to human users when they need more info about the role of a form control. |
static String |
PROP_HINT
Form controls may have a hint string as a short hint about the role of a form control. |
static String |
PROP_PARENT_CONTROL
Apart from the three standard groups described in Form , all other
form controls are contained in a Group . |
static String |
PROP_REFERENCED_PPATH
If a form control is allowed to have associated data (initial value or user input) it must have a property path that is used to access related data within Form.PROP_DIALOG_DATA_ROOT . |
static String |
PROP_VALUE_RESTRICTION
Can be used to define local restrictions on the value of form controls in addition to restrictions possibly derivable from possibly available form data (the latter are called model-based restrictions). |
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 | |
---|---|
protected |
FormControl()
|
protected |
FormControl(String typeURI,
Object parent,
Label label,
PropertyPath ref,
MergedRestriction valueRestriction,
Object initialValue)
|
Method Summary | |
---|---|
Repeat |
getAncestorRepeat()
Returns the nearest Repeat control containing this control if
any. |
Form |
getFormObject()
Returns the form object containing this form control. |
String |
getHelpString()
Returns the help text for this control. |
String |
getHintString()
Returns the hint string for this control. |
Label |
getLabel()
Returns the Label of this control. |
int |
getMaxLength()
Tries to find out the largest number of characters in the string representation of the values associated with this control. |
Group |
getParentGroup()
Returns the Group control that contains this form control as a direct child. |
Repeat |
getParentRepeat()
If this control is a column in a Repeat control, that
Repeat control is returned, otherwise null. |
PropertyPath |
getReferencedPPath()
|
MergedRestriction |
getRestrictions()
Returns possible value restrictions by merging any local or model-based (defined over available form data) restrictions. |
Group[] |
getSuperGroups()
Returns the hierarchy of Group s containing this form control. |
String |
getTypeURI()
Returns the URI of the type of values that are / can be associated with this control if it is decidable, null otherwise. |
Object |
getValue()
Returns the value(s) currently associated with this control. |
boolean |
hasFocus()
Checks if Form.PROP_DIALOG_CURRENT_FOCUSED_CONTROL has this
control as value. |
boolean |
hasValue()
Checks if there is any value associated with this control in the form data. |
boolean |
isOfBooleanType()
Checks if the value returned by getTypeURI() is equal to
xsd:boolean. |
boolean |
isOfPrimitiveType()
Checks if the value returned by getTypeURI() is one of those
supported by the TypeMapper . |
boolean |
isRepeatable()
Checks if this control is a column in a Repeat control. |
void |
setHelpString(String value)
|
void |
setHintString(String value)
|
boolean |
setProperty(String propURI,
Object value)
For usage by de-serializers. |
String |
toString()
Returns the text of the Label possibly associated with this
control, null otherwise. |
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 PROP_CONTROL_LABEL
Label
.
public static final String PROP_HELP
public static final String PROP_HINT
public static final String PROP_PARENT_CONTROL
Form
, all other
form controls are contained in a Group
.
public static final String PROP_REFERENCED_PPATH
Form.PROP_DIALOG_DATA_ROOT
.
public static final String PROP_VALUE_RESTRICTION
Constructor Detail |
---|
protected FormControl()
protected FormControl(String typeURI, Object parent, Label label, PropertyPath ref, MergedRestriction valueRestriction, Object initialValue)
Method Detail |
---|
public Repeat getAncestorRepeat()
Repeat
control containing this control if
any. Identical with getParentRepeat()
if this control is a
column in a Repeat
control.
public Form getFormObject()
public String getHelpString()
PROP_HELP
public String getHintString()
PROP_HINT
public Label getLabel()
Label
of this control.
PROP_CONTROL_LABEL
public int getMaxLength()
Object.toString()
on each value. The values are
determined the following way:
()
is used
Repeat
object (i.e.,
assuming that a Repeat
object can be rendered as a table, then a
direct part of it would be rendered as a column of the table), all values
in that column are drawn.
getValue()
is used.
public MergedRestriction getRestrictions()
public Group getParentGroup()
public Repeat getParentRepeat()
Repeat
control, that
Repeat
control is returned, otherwise null.
public PropertyPath getReferencedPPath()
PROP_REFERENCED_PPATH
public Group[] getSuperGroups()
Group
s containing this form control. The
first element in the returned array (index 0) will be one of the three
standard groups of the form containing this control (see the
documentation of class Form
) and the last element will be its
direct parent group.
public String getTypeURI()
public Object getValue()
Repeat
control, the returned
value will be taken from the currently selected row in the Repeat
control.
public boolean hasFocus()
Form.PROP_DIALOG_CURRENT_FOCUSED_CONTROL
has this
control as value.
public boolean hasValue()
public boolean isOfBooleanType()
getTypeURI()
is equal to
xsd:boolean.
public boolean isOfPrimitiveType()
getTypeURI()
is one of those
supported by the TypeMapper
.
public boolean isRepeatable()
Repeat
control.
public void setHelpString(String value)
PROP_HELP
public void setHintString(String value)
PROP_HINT
public boolean setProperty(String propURI, Object value)
setProperty
in class Resource
Resource.setProperty(String, Object)
public String toString()
Label
possibly associated with this
control, null otherwise.
toString
in class Resource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |