org.apache.stanbol.entityhub.servicesapi.query
Class ValueConstraint

java.lang.Object
  extended by org.apache.stanbol.entityhub.servicesapi.query.Constraint
      extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.stanbol.entityhub.servicesapi.query.Constraint
Constraint.ConstraintType
 
Constructor Summary
ValueConstraint(java.lang.Object value)
           
ValueConstraint(java.lang.Object value, java.lang.Iterable<java.lang.String> dataTypes)
           
 
Method Summary
 java.util.Collection<java.lang.String> getDataTypes()
          Getter for the list of the parsed data types URIs
 java.lang.Object getValue()
          Getter for the value
 java.lang.String toString()
           
 
Methods inherited from class org.apache.stanbol.entityhub.servicesapi.query.Constraint
getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueConstraint

public ValueConstraint(java.lang.Object value)

ValueConstraint

public ValueConstraint(java.lang.Object value,
                       java.lang.Iterable<java.lang.String> dataTypes)
Method Detail

getValue

public final java.lang.Object getValue()
Getter for the value

Returns:
the value or null if the value is not constraint

getDataTypes

public final java.util.Collection<java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.