|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.clarkparsia.pellet.datatypes.types.datetime.RestrictedTimelineDatatype
public class RestrictedTimelineDatatype
Title: Restricted time line datatype
Description: A base implementation for datatypes based on the XSD 7 property date time model. Calendar objects are converted to real numbers based on the XML 1.1 datatype spec. This implementation uses two real number interval collections (one with time zone present, one with time zone absent).
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
Constructor Summary | |
---|---|
RestrictedTimelineDatatype(Datatype<? extends javax.xml.datatype.XMLGregorianCalendar> datatype,
javax.xml.namespace.QName schemaType,
boolean requireTz)
|
Method Summary | |
---|---|
RestrictedDatatype<javax.xml.datatype.XMLGregorianCalendar> |
applyConstrainingFacet(aterm.ATermAppl facet,
java.lang.Object value)
Apply a constraining facet to further restrict the value space |
boolean |
contains(java.lang.Object value)
Check if a data range contains a particular value |
boolean |
containsAtLeast(int n)
Check that a data range contains a minimum number of elements |
RestrictedDatatype<javax.xml.datatype.XMLGregorianCalendar> |
exclude(java.util.Collection<?> values)
Exclude specific elements from the data range. |
Datatype<? extends javax.xml.datatype.XMLGregorianCalendar> |
getDatatype()
Query for the base datatype of a restricted datatype. |
static javax.xml.datatype.DatatypeFactory |
getDatatypeFactory()
|
javax.xml.datatype.XMLGregorianCalendar |
getValue(int i)
Return a value from an enumerable data range. |
RestrictedDatatype<javax.xml.datatype.XMLGregorianCalendar> |
intersect(RestrictedDatatype<?> other,
boolean negated)
Intersect this range with another range. |
boolean |
isEmpty()
Convenience method equivalent to !containsAtLeast(0) |
boolean |
isEnumerable()
Query if values in the data range can be enumerated. |
boolean |
isFinite()
Query if there are a finite number of values in the data range. |
int |
size()
Return the size of the data range. |
java.lang.String |
toString()
|
RestrictedDatatype<javax.xml.datatype.XMLGregorianCalendar> |
union(RestrictedDatatype<?> other)
Union this range with another range. |
java.util.Iterator<javax.xml.datatype.XMLGregorianCalendar> |
valueIterator()
Get a (possibly infinite) iterator over values in the data range. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RestrictedTimelineDatatype(Datatype<? extends javax.xml.datatype.XMLGregorianCalendar> datatype, javax.xml.namespace.QName schemaType, boolean requireTz)
Method Detail |
---|
public static javax.xml.datatype.DatatypeFactory getDatatypeFactory()
public RestrictedDatatype<javax.xml.datatype.XMLGregorianCalendar> applyConstrainingFacet(aterm.ATermAppl facet, java.lang.Object value) throws InvalidConstrainingFacetException
RestrictedDatatype
applyConstrainingFacet
in interface RestrictedDatatype<javax.xml.datatype.XMLGregorianCalendar>
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
public boolean contains(java.lang.Object value)
DataRange
contains
in interface DataRange<javax.xml.datatype.XMLGregorianCalendar>
value
- the value to check
true
if the data range contains value
,
false
elsepublic boolean containsAtLeast(int n)
DataRange
containsAtLeast
in interface DataRange<javax.xml.datatype.XMLGregorianCalendar>
n
- the number of elements
true
if the data range contains n
or
more elements, false
otherwisepublic RestrictedDatatype<javax.xml.datatype.XMLGregorianCalendar> exclude(java.util.Collection<?> values)
RestrictedDatatype
values
that are not contained in the restriction are
ignored.
exclude
in interface RestrictedDatatype<javax.xml.datatype.XMLGregorianCalendar>
values
- The values to exclude
RestrictedDatatype
public Datatype<? extends javax.xml.datatype.XMLGregorianCalendar> getDatatype()
RestrictedDatatype
getDatatype
in interface RestrictedDatatype<javax.xml.datatype.XMLGregorianCalendar>
public javax.xml.datatype.XMLGregorianCalendar getValue(int i)
DataRange
LiteralValueBranch
shiftTryNext
getValue
in interface DataRange<javax.xml.datatype.XMLGregorianCalendar>
i
- the index of the value in the data range
public RestrictedDatatype<javax.xml.datatype.XMLGregorianCalendar> intersect(RestrictedDatatype<?> other, boolean negated)
RestrictedDatatype
getDatatype().getPrimitiveDatatype().equals( other.getDatatype.getPrimiveDatatype()
intersect
in interface RestrictedDatatype<javax.xml.datatype.XMLGregorianCalendar>
other
- restricted datatype to merge into thisnegated
- true
if other
is negated,
false
else
RestrictedDatatype
, representing the intersection
of this
and other
public boolean isEmpty()
DataRange
!containsAtLeast(0)
isEmpty
in interface DataRange<javax.xml.datatype.XMLGregorianCalendar>
true
if the data range contains no elements,
false
otherwisepublic boolean isEnumerable()
DataRange
isEnumerable
in interface DataRange<javax.xml.datatype.XMLGregorianCalendar>
true
if the data range is enumerable,
false
otherwisepublic boolean isFinite()
DataRange
isFinite
in interface DataRange<javax.xml.datatype.XMLGregorianCalendar>
true
if the data range is finite, false
otherwisepublic int size()
DataRange
LiteralValueBranch
constructor
size
in interface DataRange<javax.xml.datatype.XMLGregorianCalendar>
public java.lang.String toString()
toString
in class java.lang.Object
public RestrictedDatatype<javax.xml.datatype.XMLGregorianCalendar> union(RestrictedDatatype<?> other)
RestrictedDatatype
getDatatype().getPrimitiveDatatype().equals( other.getDatatype.getPrimiveDatatype()
union
in interface RestrictedDatatype<javax.xml.datatype.XMLGregorianCalendar>
other
- restricted datatype to merge with this
RestrictedDatatype
, representing the intersection
of this
and other
public java.util.Iterator<javax.xml.datatype.XMLGregorianCalendar> valueIterator()
DataRange
valueIterator
in interface DataRange<javax.xml.datatype.XMLGregorianCalendar>
Iterator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |