public interface ConstraintFactory
Modifier and Type | Field and Description |
---|---|
static int |
EDGE_CONSTRAINT_TYPE |
static int |
NODE_CONSTRAINT_TYPE |
Modifier and Type | Method and Description |
---|---|
SearchConstraint |
createConstraint(java.lang.Object value,
SearchOperator operator,
java.lang.Object specifier,
de.ims.icarus.util.Options options) |
int |
getConstraintType() |
java.lang.Object |
getDefaultValue(java.lang.Object specifier)
Returns the value to be used as constraint in the case that
no user input was made.
|
java.lang.String |
getDescription() |
java.lang.Object[] |
getLabelSet(java.lang.Object specifier)
Returns a collection of possible values that should be displayed to the
user when editing the constraint.
|
int |
getMaxInstanceCount()
Returns the maximum allowed count of constraint instances
created by this factory.
|
int |
getMinInstanceCount()
Returns the minimum required count of constraint instances
created by this factory.
|
java.lang.String |
getName() |
SearchOperator[] |
getSupportedOperators() |
java.lang.Object[] |
getSupportedSpecifiers() |
java.lang.String |
getToken() |
java.lang.Class<?> |
getValueClass(java.lang.Object specifier)
Returns the class of supported values.
|
java.lang.Object |
labelToValue(java.lang.Object label,
java.lang.Object specifier)
Transforms or parses the given
label into a value
suitable for SearchConstraint objects created by this factory. |
java.lang.Object |
valueToLabel(java.lang.Object value,
java.lang.Object specifier)
Transforms the given
value into a label object
that can be used for interface elements presented to the user. |
static final int EDGE_CONSTRAINT_TYPE
static final int NODE_CONSTRAINT_TYPE
SearchConstraint createConstraint(java.lang.Object value, SearchOperator operator, java.lang.Object specifier, de.ims.icarus.util.Options options)
SearchOperator[] getSupportedOperators()
java.lang.String getName()
java.lang.String getDescription()
java.lang.String getToken()
java.lang.Class<?> getValueClass(java.lang.Object specifier)
null
than only the values returned by #getValueSet()
are considered
legal!java.lang.Object getDefaultValue(java.lang.Object specifier)
java.lang.Object[] getLabelSet(java.lang.Object specifier)
#getValueClass()
returns
null
these values are considered to be the only legal collection
of possible values!java.lang.Object labelToValue(java.lang.Object label, java.lang.Object specifier)
label
into a value
suitable for SearchConstraint
objects created by this factory.java.lang.Object valueToLabel(java.lang.Object value, java.lang.Object specifier)
value
into a label
object
that can be used for interface elements presented to the user.int getConstraintType()
int getMinInstanceCount()
-1
allows the
user interface to make that decision.int getMaxInstanceCount()
-1
deactivates
the upper limit and allows the user interface to handle the
decision. Note that aside from that reserved return value all
values that are less than the current minimum as obtained from
getMinInstanceCount()
will cause exceptions.java.lang.Object[] getSupportedSpecifiers()