|
||||||||||
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.Group
public class Group
The structural unit of forms that serves as a container for other form controls.
Field Summary | |
---|---|
static String |
MY_URI
|
static String |
PROP_CHILDREN
For each group, the list of form controls that have been created with that group as their direct container (parent) in the order of their creation. |
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 | |
---|---|
|
Group()
For use by de-serializers only. |
|
Group(Group parent,
Label label,
PropertyPath ref,
MergedRestriction valueRestriction,
Resource initialValue)
Constructs a new group. |
protected |
Group(String typeURI,
Group parent,
Label label,
PropertyPath ref,
MergedRestriction valueRestriction,
Object initialValue)
|
Method Summary | |
---|---|
void |
doModelBasedExpansion()
Based on the knowledge about the type of this group (see FormControl.getTypeURI() ), this method generates a hierarchy of form
controls that reflects the exact structure known from the type of this
group. |
FormControl[] |
getChildren()
|
LevelRating |
getComplexity()
This should help UI handlers to decide how to "render" a group. |
int |
getHierarchyLevel()
Returns the level of this group in the hierarchical structure of a form. |
int |
getMaxLength()
Overrides FormControl.getMaxLength() by returning always -1,
because no standard string representation of a group exists. |
int |
getNumberOfSubgroups()
Returns the number of direct subgroups in this group. |
boolean |
hasInput()
Checks if there are any input controls in the subtree rooted at this group. |
boolean |
hasOutput()
Checks if there are any output controls in the subtree rooted at this group. |
boolean |
isRootGroup()
Checks if this group is one of the standard groups in the form (see the documentation of the class Form ). |
FormControl |
searchFormControl(String formControlURI)
look for a FormControl within the group with the given URI. |
boolean |
setProperty(String propURI,
Object value)
For usage by de-serializers. |
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_CHILDREN
Constructor Detail |
---|
public Group()
public Group(Group parent, Label label, PropertyPath ref, MergedRestriction valueRestriction, Resource initialValue)
Repeat
control.
parent
- The mandatory parent group as the direct container of this
group. See FormControl.PROP_PARENT_CONTROL
.label
- The optional Label
to be associated with this group.
See FormControl.PROP_CONTROL_LABEL
.ref
- See FormControl.PROP_REFERENCED_PPATH
.valueRestriction
- See FormControl.PROP_VALUE_RESTRICTION
. Because Groups may
contain input controls, you may specify here a
MergedRestriction
to let
the dialog package to derive the value restrictions for any
input control whose FormControl.PROP_REFERENCED_PPATH
starts with the path given for ref
(the previous
parameter in this constructor). If ref
is
null
, this parameter will be ignored.initialValue
- A Resource
to be used as
the initial value for this group. If this is specified, then
the initial values of any other control whose
FormControl.PROP_REFERENCED_PPATH
starts with the path
given for the above ref
might be derivable from
this value.protected Group(String typeURI, Group parent, Label label, PropertyPath ref, MergedRestriction valueRestriction, Object initialValue)
Method Detail |
---|
public void doModelBasedExpansion()
FormControl.getTypeURI()
), this method generates a hierarchy of form
controls that reflects the exact structure known from the type of this
group. Info about the structure of the type of this group will be
available only if FormControl.getTypeURI()
returns a subclass of
ManagedIndividual
; then, the structural info will be retrieved based on
the standard properties of that class
and
the class restrictions on them
. Properties with insufficient
restrictions will be ignored. A property of type
ManagedIndividual
will create a subgroup; a property with a fixed set of values in its
range will create a Select
or Select1
control, depending
on possibly known cardinalities; all other properties will create an
InputField
. All of the above may be packed in a Repeat
control, if the corresponding property allows more than one value.
public FormControl[] getChildren()
PROP_CHILDREN
public LevelRating getComplexity()
LevelRating.none
and LevelRating.full
.public int getHierarchyLevel()
Form
) have the level 1. Their direct subgroups have the level 2,
and so forth.
public int getMaxLength()
FormControl.getMaxLength()
by returning always -1,
because no standard string representation of a group exists.
getMaxLength
in class FormControl
public int getNumberOfSubgroups()
public boolean hasInput()
public boolean hasOutput()
public boolean isRootGroup()
Form
).
public boolean setProperty(String propURI, Object value)
FormControl
setProperty
in class FormControl
Resource.setProperty(String, Object)
public FormControl searchFormControl(String formControlURI)
formControlURI
-
FormControl
or null if not found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |