public abstract class FormControl extends FormElement
Modifier and Type | Field and Description |
---|---|
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
|
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).
|
PROP_APPEARANCE
ANON_URI_PREFIX, blockAddingTypes, isXMLLiteral, NAMESPACE_PREFIX, ns_delim_index, PROP_INVOLVED_HUMAN_USER, 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, props, RDF_EMPTY_LIST, RDF_NAMESPACE, RDFS_NAMESPACE, SERVICE_NAMESPACE, TYPE_RDF_LIST, TYPE_RDFS_CLASS, uri, VOCABULARY_NAMESPACE
Modifier | Constructor and Description |
---|---|
protected |
FormControl() |
protected |
FormControl(String typeURI,
Object parent,
Label label,
PropertyPath ref,
MergedRestriction valueRestriction,
Object initialValue) |
Modifier and Type | Method and Description |
---|---|
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()
|
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. |
addAppearanceRecommendation, getAppearanceRecommendations
addType, getLocalName, getNamespace, getProperty, getPropertyURIs, getType, getTypes, getURI, hasQualifiedName, isAnon, numberOfProperties
addMultiLangProp, asList, asList, asRDFList, changeProperty, copy, deepCopy, equals, generateAnonURI, getDefaultLang, getFilename, getMultiLangProp, getOrConstructLabel, getOrConstructLabel, getPropSerializationType, getResource, getResourceComment, getResourceLabel, getResourceLabel, getStaticFieldValue, hashCode, hasProperty, isAnon, isBlockingAddingTypes, isClosedCollection, isQualifiedName, isWellFormed, literal, representsQualifiedURI, serializesAsXMLLiteral, setPropertyPath, setPropertyPath, setPropertyPathFromOffset, setResourceComment, setResourceLabel, toStringRecursive, toStringRecursive, unliteral
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
protected FormControl()
protected FormControl(String typeURI, Object parent, Label label, PropertyPath ref, MergedRestriction valueRestriction, Object initialValue)
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()
public PropertyPath getReferencedPPath()
PROP_REFERENCED_PPATH
public Group[] getSuperGroups()
public String getTypeURI()
public Object getValue()
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 boolean setProperty(String propURI, Object value)
setProperty
in class Resource
Resource.setProperty(String, Object)
Copyright © 2018 universAAL Consortium. All rights reserved.