org.apache.stanbol.entityhub.servicesapi.query
Class ValueConstraint
java.lang.Object
org.apache.stanbol.entityhub.servicesapi.query.Constraint
org.apache.stanbol.entityhub.servicesapi.query.ValueConstraint
- Direct Known Subclasses:
- ReferenceConstraint
public class ValueConstraint
- extends Constraint
A constraint the filters/selects based on the value and/or the parsed
dataTypes. A valid constraint MUST define a value OR valid data type. A
valid data type is defined as a String that is NOT NULL and NOT empty.
If the collection of data types is null components processing
this constraint are encouraged to deduct the data types based on the type
of the value.
- Author:
- Rupert Westenthaler
| Methods inherited from class org.apache.stanbol.entityhub.servicesapi.query.Constraint |
getType |
DEFAULT_MODE
public static final ValueConstraint.MODE DEFAULT_MODE
- The default
ValueConstraint.MODE is ValueConstraint.MODE.any
ValueConstraint
public ValueConstraint(Object value)
ValueConstraint
public ValueConstraint(Object value,
Iterable<String> dataTypes)
ValueConstraint
public ValueConstraint(Object value,
Iterable<String> dataTypes,
ValueConstraint.MODE mode)
getValues
public final Set<Object> getValues()
- Getter for the value
- Returns:
- the value or
null if the value is not constraint
getMode
public ValueConstraint.MODE getMode()
- Getter for the
ValueConstraint.MODE of this ValueConstraint
- Returns:
- the mode
getDataTypes
public final Collection<String> getDataTypes()
- Getter for the list of the parsed data types URIs
- Returns:
- the list of dataType URIs or an empty list if not defined.
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.