public class Group extends FormControl
Modifier and Type | Field and Description |
---|---|
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.
|
PROP_CONTROL_LABEL, PROP_HELP, PROP_HINT, PROP_PARENT_CONTROL, PROP_REFERENCED_PPATH, PROP_VALUE_RESTRICTION
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 |
---|---|
|
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) |
Modifier and Type | Method and Description |
---|---|
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.
|
getAncestorRepeat, getFormObject, getHelpString, getHintString, getLabel, getParentGroup, getParentRepeat, getReferencedPPath, getRestrictions, getSuperGroups, getTypeURI, getValue, hasFocus, hasValue, isOfBooleanType, isOfPrimitiveType, isRepeatable, setHelpString, setHintString, toString
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 MY_URI
public static final String PROP_CHILDREN
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)
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.Copyright © 2018 universAAL Consortium. All rights reserved.