Package org.aksw.jenax.constraint.impl
Class VSpaceImpl
java.lang.Object
org.aksw.jenax.constraint.impl.VSpaceImpl
- All Implemented Interfaces:
Cloneable,Constrainable,VSpace
An implementation of value space backed by
NodeRanges.
The parameters of the methods stateIntersection(VSpace) and stateUnion(VSpace)
only accept instances of VSpaceImpl. Any other type yields a ClassCastException.- Author:
- raven
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Domain<org.apache.jena.sparql.expr.ValueSpace,ComparableNodeValue> protected NodeRanges -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static VSpaceImplcreate(NodeRanges nodeRanges) forDimension(Object dimensionKey) TODO The factory-aspect of creating a new ValueSpace with an open dimension should go to ValueSpaceSchemaDomain<?,?> booleanbooleanisLimitedTo(Object dimensionKey) Whether the value space only has ranges in the dimension with the given key (e.g.<X extends Comparable<X>>
VSpacemapDimensionToNewVSpace(Object fromDimKey, Class<X> itemType, Object toDimKey, Function<com.google.common.collect.Range<X>, com.google.common.collect.Range<X>> mapper) Create a new value space by mapping the values from a given dimension Issue: We don't know if the mapping is surjective - i.e.org.aksw.commons.algebra.allen.AllenRelationReturn a relation for how this space relates to another.static com.google.common.collect.Range<org.aksw.commons.util.range.Cmp<Map.Entry<?,org.aksw.commons.util.range.Cmp<ComparableNodeValue>>>> stateIntersection(VSpace valueSpace) stateUnion(VSpace valueSpace) toString()
-
Field Details
-
domain
-
nodeRanges
-
-
Constructor Details
-
VSpaceImpl
-
-
Method Details
-
getDomain
-
create
-
getNodeRanges
-
clone
-
isLimitedTo
Description copied from interface:VSpaceWhether the value space only has ranges in the dimension with the given key (e.g. numeric, iRI, text, ...)- Specified by:
isLimitedToin interfaceVSpace
-
stateIntersection
- Specified by:
stateIntersectionin interfaceConstrainable- Specified by:
stateIntersectionin interfaceVSpace
-
stateUnion
- Specified by:
stateUnionin interfaceConstrainable- Specified by:
stateUnionin interfaceVSpace
-
isConflicting
public boolean isConflicting()- Specified by:
isConflictingin interfaceConstrainable
-
toString
-
forDimension
TODO The factory-aspect of creating a new ValueSpace with an open dimension should go to ValueSpaceSchema- Specified by:
forDimensionin interfaceVSpace
-
mapDimensionToNewVSpace
public <X extends Comparable<X>> VSpace mapDimensionToNewVSpace(Object fromDimKey, Class<X> itemType, Object toDimKey, Function<com.google.common.collect.Range<X>, com.google.common.collect.Range<X>> mapper) Description copied from interface:VSpaceCreate a new value space by mapping the values from a given dimension Issue: We don't know if the mapping is surjective - i.e. if the src range is unconstrained, the tgt range in that dimension may yet be constrained.- Specified by:
mapDimensionToNewVSpacein interfaceVSpace
-
relateTo
Description copied from interface:VSpaceReturn a relation for how this space relates to another. In particular, it allows for testing whether e.g. the values of this space appear all before the values in another one with respect to the domain. The returned relation is the bitwise OR of the Allen relation of each dimension. -
span
public static com.google.common.collect.Range<org.aksw.commons.util.range.Cmp<Map.Entry<?,org.aksw.commons.util.range.Cmp<ComparableNodeValue>>>> span(VSpace vspace)
-