|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RestrictedDatatype<T>
Title: Restricted Datatype
Description: Interface representing the value space of a datatype, optionally
constrained by application of constraing facets (see
applyConstrainingFacet(ATermAppl, Object)), and optionally excluding
specific values (see exclude(Collection)).Implementations should
be immutable, with all mutators returning either the object unchanged, or a
new object.
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
| Method Summary | |
|---|---|
RestrictedDatatype<T> |
applyConstrainingFacet(aterm.ATermAppl facet,
java.lang.Object value)
Apply a constraining facet to further restrict the value space |
RestrictedDatatype<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 interface com.clarkparsia.pellet.datatypes.DataRange |
|---|
contains, containsAtLeast, getValue, isEmpty, isEnumerable, isFinite, size, valueIterator |
| Method Detail |
|---|
Datatype<? extends T> getDatatype()
RestrictedDatatype<T> applyConstrainingFacet(aterm.ATermAppl facet,
java.lang.Object value)
throws InvalidConstrainingFacetException
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)
InvalidConstrainingFacetException
RestrictedDatatype<T> intersect(RestrictedDatatype<?> other,
boolean negated)
getDatatype().getPrimitiveDatatype().equals( other.getDatatype.getPrimiveDatatype()
other - restricted datatype to merge into thisnegated - true if other is negated,
false else
RestrictedDatatype, representing the intersection
of this and other
{@link - IllegalArgumentException} if the primitive datatypes for
the ranges are not equalRestrictedDatatype<T> exclude(java.util.Collection<?> values)
values that are not contained in the restriction are
ignored.
values - The values to exclude
RestrictedDatatypeRestrictedDatatype<T> union(RestrictedDatatype<?> other)
getDatatype().getPrimitiveDatatype().equals( other.getDatatype.getPrimiveDatatype()
other - restricted datatype to merge with this
RestrictedDatatype, representing the intersection
of this and other
{@link - IllegalArgumentException} if the primitive datatypes for
the ranges are not equal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||