org.semanticweb.HermiT.model.dataranges
Interface DataRange

All Superinterfaces:
DLPredicate
All Known Implementing Classes:
DatatypeRestriction, DatatypeRestrictionAnyURI, DatatypeRestrictionBoolean, DatatypeRestrictionDateTime, DatatypeRestrictionDateTimeFin, DatatypeRestrictionDouble, DatatypeRestrictionInteger, DatatypeRestrictionIntegerFin, DatatypeRestrictionLiteral, DatatypeRestrictionOWLRealPlus, DatatypeRestrictionString, EnumeratedDataRange

public interface DataRange
extends DLPredicate


Method Summary
 void addFacet(DatatypeRestriction.Facets facet, java.lang.String value)
          Adds a facet, if it is supported by the implementation that implements the data range.
 boolean addOneOf(DataConstant constant)
          Adds constant to the values that represent this data range.
 DatatypeRestriction.DT getDatatype()
          The datatype implements this DataRange instance
 java.net.URI getDatatypeURI()
          The URI of the datatype that implements this DataRange instance
 CanonicalDataRange getNewInstance()
           
 java.util.Set<DataConstant> getOneOf()
          Constants that are representing the allowed assignments for this datatype restriction.
 boolean isBottom()
          Checks whether this data range cannot contain values
 boolean isNegated()
          Checks whether this data range is negated.
 void negate()
          Negate this data range, i.e., if the range was negated it is no longer negated afterwards and if it was not negated it will be negated afterwards.
 boolean supports(DatatypeRestriction.Facets facet)
          Checks whether the given facet is supported by the concrete implementation of this data range.
 
Methods inherited from interface org.semanticweb.HermiT.model.DLPredicate
getArity, toString
 

Method Detail

getNewInstance

CanonicalDataRange getNewInstance()
Returns:
an new instance of the concrete implementation on which the method is called

getDatatypeURI

java.net.URI getDatatypeURI()
The URI of the datatype that implements this DataRange instance

Returns:
The URI for the type of the concrete implementation for this DataRange.

getDatatype

DatatypeRestriction.DT getDatatype()
The datatype implements this DataRange instance

Returns:
The datatype for the type of the concrete implementation for this DataRange.

getOneOf

java.util.Set<DataConstant> getOneOf()
Constants that are representing the allowed assignments for this datatype restriction. The strings are String representations of the datatype that concretely implements the DataRange, e.g., if the concrete implementation has URI for integers, the returned strings have to be interpreted as integers.

Returns:
A set of constants that represent the current datatype restrictions and are to be interpreted according to the datatype URI of the concrete implementation of the DataRange.

addOneOf

boolean addOneOf(DataConstant constant)
Adds constant to the values that represent this data range.

Parameters:
constant - A constants that is a String representation of a value that is to be interpreted according to the datatype URI of the concrete implementation of the DataRange
Returns:
true if the oneOf values did not already contain the given constant and false otherwise

isNegated

boolean isNegated()
Checks whether this data range is negated.

Returns:
true if negated and false otherwise.

negate

void negate()
Negate this data range, i.e., if the range was negated it is no longer negated afterwards and if it was not negated it will be negated afterwards.


isBottom

boolean isBottom()
Checks whether this data range cannot contain values

Returns:
true if the restrictions on this data range cause the interpretation of it to be empty and false otherwise.

addFacet

void addFacet(DatatypeRestriction.Facets facet,
              java.lang.String value)
              throws java.lang.IllegalArgumentException
Adds a facet, if it is supported by the implementation that implements the data range.

Parameters:
facet - A facet.
value - A String representation of the facet value.
Throws:
java.lang.IllegalArgumentException - if the facet is not supported by the concrete realisation of this data range.

supports

boolean supports(DatatypeRestriction.Facets facet)
Checks whether the given facet is supported by the concrete implementation of this data range.

Parameters:
facet - a facet.
Returns:
true if the facet is supported by the concrete implementation of this data range and false otherwise.