Package openllet.core.datatypes
Class EmptyRestrictedDatatype<T>
- java.lang.Object
-
- openllet.core.datatypes.EmptyDataRange<T>
-
- openllet.core.datatypes.EmptyRestrictedDatatype<T>
-
- Type Parameters:
T
- kind of element
- All Implemented Interfaces:
DataRange<T>
,RestrictedDatatype<T>
public class EmptyRestrictedDatatype<T> extends EmptyDataRange<T> implements RestrictedDatatype<T>
Title: Empty Iterator
Description: Re-usable empty restricted _datatype implementation. Cannot be static so that parameterization is handled correctly.
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
- Author:
- Mike Smith
-
-
Field Summary
-
Fields inherited from interface openllet.core.datatypes.RestrictedDatatype
UNSUPPORTED_FORMAT, UNSUPPORTED_VALUE
-
-
Constructor Summary
Constructors Constructor Description EmptyRestrictedDatatype(Datatype<? extends T> datatype)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RestrictedDatatype<T>
applyConstrainingFacet(openllet.aterm.ATermAppl facet, java.lang.Object value)
Apply a constraining facet to further restrict the value spaceRestrictedDatatype<T>
exclude(java.util.Collection<?> values)
Exclude specific elements from the _data range.Datatype<? extends T>
getDatatype()
Query for the base datatype of a restricted datatype.RestrictedDatatype<T>
intersect(RestrictedDatatype<?> other, boolean negated)
Intersect this range with another range.RestrictedDatatype<T>
union(RestrictedDatatype<?> other)
Union this range with another range.-
Methods inherited from class openllet.core.datatypes.EmptyDataRange
contains, containsAtLeast, getValue, isEmpty, isEnumerable, isFinite, size, valueIterator
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface openllet.core.datatypes.DataRange
contains, containsAtLeast, getValue, isEmpty, isEnumerable, isFinite, size, valueIterator
-
-
-
-
Method Detail
-
applyConstrainingFacet
public RestrictedDatatype<T> applyConstrainingFacet(openllet.aterm.ATermAppl facet, java.lang.Object value)
Description copied from interface:RestrictedDatatype
Apply a constraining facet to further restrict the value space- Specified by:
applyConstrainingFacet
in interfaceRestrictedDatatype<T>
- Parameters:
facet
- the constraining facet name (typically a URI)value
- the value for the constraining facet. This is not necessarily in the value space of the base datatype (e.g., length facet values on string types are not)- Returns:
- the further restricted value space
-
exclude
public RestrictedDatatype<T> exclude(java.util.Collection<?> values)
Description copied from interface:RestrictedDatatype
Exclude specific elements from the _data range. Used when a restricted _data range is in a conjunction with a negative enumeration. Elements invalues
that are not contained in the restriction are ignored.- Specified by:
exclude
in interfaceRestrictedDatatype<T>
- Parameters:
values
- The values to exclude- Returns:
- A new
RestrictedDatatype
-
getDatatype
public Datatype<? extends T> getDatatype()
Description copied from interface:RestrictedDatatype
Query for the base datatype of a restricted datatype. This is not necessarily a primitive datatype.- Specified by:
getDatatype
in interfaceRestrictedDatatype<T>
- Returns:
- the base datatype
-
intersect
public RestrictedDatatype<T> intersect(RestrictedDatatype<?> other, boolean negated)
Description copied from interface:RestrictedDatatype
Intersect this range with another range. It must be the case thatgetDatatype().getPrimitiveDatatype().equals( other.getDatatype.getPrimiveDatatype()
- Specified by:
intersect
in interfaceRestrictedDatatype<T>
- Parameters:
other
- restricted datatype to merge into thisnegated
-true
ifother
is negated,false
else- Returns:
- a new
RestrictedDatatype
, representing the intersection ofthis
andother
-
union
public RestrictedDatatype<T> union(RestrictedDatatype<?> other)
Description copied from interface:RestrictedDatatype
Union this range with another range. It must be the case thatgetDatatype().getPrimitiveDatatype().equals( other.getDatatype.getPrimiveDatatype()
- Specified by:
union
in interfaceRestrictedDatatype<T>
- Parameters:
other
- restricted datatype to merge with this- Returns:
- a new
RestrictedDatatype
, representing the intersection ofthis
andother
-
-