public abstract class AbstractConstraintFactory extends java.lang.Object implements ConstraintFactory, SearchParameters
Modifier and Type | Field and Description |
---|---|
protected static java.lang.Object[] |
DEFAULT_UNDEFINED_VALUESET |
EDGE_CONSTRAINT_TYPE, NODE_CONSTRAINT_TYPE
DEFAULT_OPTIMIZE_SEARCH, DEFAULT_SEARCH_CASESENSITIVE, DEFAULT_SEARCH_MAX_LENGTH, DEFAULT_SEARCH_MIN_LENGTH, DEFAULT_SEARCH_MODE, DEFAULT_SEARCH_NON_PROJECTIVE, DEFAULT_SEARCH_ORIENTATION, DEFAULT_SEARCH_RESULT_LIMIT, OPTIMIZE_SEARCH, SEARCH_CASESENSITIVE, SEARCH_MAX_LENGTH, SEARCH_MIN_LENGTH, SEARCH_MODE, SEARCH_NON_PROJECTIVE, SEARCH_ORIENTATION, SEARCH_RESULT_LIMIT
Constructor and Description |
---|
AbstractConstraintFactory(java.lang.String token,
int type,
java.lang.String nameKey,
java.lang.String descriptionKey) |
Modifier and Type | Method and Description |
---|---|
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() |
protected static ValueHandler |
getHandler(java.lang.Object key) |
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.
|
protected boolean |
isFlagSet(int flags,
int mask) |
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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createConstraint
protected static final java.lang.Object[] DEFAULT_UNDEFINED_VALUESET
public AbstractConstraintFactory(java.lang.String token, int type, java.lang.String nameKey, java.lang.String descriptionKey)
protected static ValueHandler getHandler(java.lang.Object key)
protected boolean isFlagSet(int flags, int mask)
public int getConstraintType()
getConstraintType
in interface ConstraintFactory
ConstraintFactory.getConstraintType()
public java.lang.String getToken()
getToken
in interface ConstraintFactory
Identity.getId()
public java.lang.String getName()
getName
in interface ConstraintFactory
Identity.getName()
public java.lang.String getDescription()
getDescription
in interface ConstraintFactory
Identity.getDescription()
public java.lang.Class<?> getValueClass(java.lang.Object specifier)
ConstraintFactory
null
than only the values returned by #getValueSet()
are considered
legal!getValueClass
in interface ConstraintFactory
public java.lang.Object getDefaultValue(java.lang.Object specifier)
ConstraintFactory
getDefaultValue
in interface ConstraintFactory
public java.lang.Object labelToValue(java.lang.Object label, java.lang.Object specifier)
ConstraintFactory
label
into a value
suitable for SearchConstraint
objects created by this factory.labelToValue
in interface ConstraintFactory
public java.lang.Object valueToLabel(java.lang.Object value, java.lang.Object specifier)
ConstraintFactory
value
into a label
object
that can be used for interface elements presented to the user.valueToLabel
in interface ConstraintFactory
public SearchOperator[] getSupportedOperators()
getSupportedOperators
in interface ConstraintFactory
ConstraintFactory.getSupportedOperators()
public java.lang.Object[] getLabelSet(java.lang.Object specifier)
ConstraintFactory
#getValueClass()
returns
null
these values are considered to be the only legal collection
of possible values!getLabelSet
in interface ConstraintFactory
de.ims.icarus.search_tools.ConstraintFactory#getValueSet()
public int getMinInstanceCount()
ConstraintFactory
-1
allows the
user interface to make that decision.getMinInstanceCount
in interface ConstraintFactory
public int getMaxInstanceCount()
ConstraintFactory
-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
ConstraintFactory.getMinInstanceCount()
will cause exceptions.getMaxInstanceCount
in interface ConstraintFactory
public java.lang.Object[] getSupportedSpecifiers()
getSupportedSpecifiers
in interface ConstraintFactory