Class 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
    • Constructor Detail

      • EmptyRestrictedDatatype

        public EmptyRestrictedDatatype​(Datatype<? extends T> datatype)
    • 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 interface RestrictedDatatype<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 in values that are not contained in the restriction are ignored.
        Specified by:
        exclude in interface RestrictedDatatype<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 interface RestrictedDatatype<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 that getDatatype().getPrimitiveDatatype().equals( other.getDatatype.getPrimiveDatatype()
        Specified by:
        intersect in interface RestrictedDatatype<T>
        Parameters:
        other - restricted datatype to merge into this
        negated - true if other is negated, false else
        Returns:
        a new RestrictedDatatype, representing the intersection of this and other