public interface DatatypeReasoner
Title: Datatype Reasoner
Description: Reasoner encapsulating all concrete domain and datatype handling
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsAtLeast(int n,
Collection<aterm.ATermAppl> ranges)
Check that the intersection of a collection of data ranges contains a
minimum number of elements.
|
boolean |
declare(aterm.ATermAppl name)
Declare a named datatype.
|
boolean |
define(aterm.ATermAppl name,
aterm.ATermAppl datarange)
Name a data range (see OWL 2
DatatypeDefinition) |
aterm.ATermAppl |
getCanonicalRepresentation(aterm.ATermAppl literal)
Get the canonical representation of a literal.
|
Datatype<?> |
getDatatype(aterm.ATermAppl uri)
Get the datatype identified by a uri
|
aterm.ATermAppl |
getDefinition(aterm.ATermAppl name)
Returns the definition for the given datatype name if it is defined, or
null otherwise. |
aterm.ATermAppl |
getLiteral(Object value)
Get the canonical
ATermAppl literal representation for a value
space object |
Object |
getValue(aterm.ATermAppl literal)
Get the Java object representation of the data value.
|
boolean |
isDeclared(aterm.ATermAppl name)
Check if a specific datatype or named data range has been declared.
|
boolean |
isDefined(aterm.ATermAppl name)
Check if a specific datatype or named data range can be supported by the
datatype reasoner.
|
boolean |
isSatisfiable(Collection<aterm.ATermAppl> dataranges)
Shorthand for
isSatisfiable(Collection, Object) where
value == null. |
boolean |
isSatisfiable(Collection<aterm.ATermAppl> dataranges,
Object value)
Check the data ranges on a single literal node are satisfiable
(independent of other nodes).
|
boolean |
isSatisfiable(Set<Literal> nodes,
Map<Literal,Set<Literal>> ineqs)
Check that the data ranges and inequalities asserted on a collection of
literal nodes are satisfiable.
|
Collection<aterm.ATermAppl> |
listDataRanges()
Return a collection of all known data ranges.
|
boolean |
validLiteral(aterm.ATermAppl typedLiteral)
Check if a typed literal is valid (i.e., it is in the lexical space for
its datatype)
|
Iterator<?> |
valueIterator(Collection<aterm.ATermAppl> dataranges)
Get an iterator for the values of a finite datarange
|
boolean containsAtLeast(int n,
Collection<aterm.ATermAppl> ranges)
throws InvalidConstrainingFacetException,
InvalidLiteralException,
UnrecognizedDatatypeException
n - the minimum number of elementsranges - the data ranges to intersecttrue if the intersection of ranges
contains at least n elements, false
elseInvalidConstrainingFacetExceptionInvalidLiteralExceptionUnrecognizedDatatypeExceptionboolean declare(aterm.ATermAppl name)
isDeclared(ATermAppl).name - the name (normally URI) of the datatypetrue if name has not been previously
declared, false else.aterm.ATermAppl getCanonicalRepresentation(aterm.ATermAppl literal)
throws InvalidLiteralException,
UnrecognizedDatatypeException
literal - the literal to canonicalizeInvalidLiteralException - if the literal is not in the lexical space of the datatypeUnrecognizedDatatypeException - if the datatype is not recognizedDatatype<?> getDatatype(aterm.ATermAppl uri)
uri - the datatype identifier (e.g., xsd:integer)Datatype if uri is recognized,
null otherwiseaterm.ATermAppl getLiteral(Object value)
ATermAppl literal representation for a value
space objectvalue - Element of the value space for some datatypeATermAppl representation of valueIllegalArgumentException - if value is not contained in the value space of
any recognized datatypeObject getValue(aterm.ATermAppl literal) throws InvalidLiteralException, UnrecognizedDatatypeException
java.lang.Byte.literal - literalInvalidLiteralException - if the literal is not in the lexical space of the datatypeUnrecognizedDatatypeException - if the datatype is not recognizedboolean isDeclared(aterm.ATermAppl name)
xsd:integer)declare(ATermAppl), which typically precedes a
call to define(ATermAppl, ATermAppl)define(ATermAppl, ATermAppl)name - the name (normally URI) of the datatypetrue if name has been declared,
false
elseboolean isDefined(aterm.ATermAppl name)
name parameter of a call
define(ATermAppl, ATermAppl)name - the name (normally URI) of the datatype or named data rangetrue if name is supported,
false elseaterm.ATermAppl getDefinition(aterm.ATermAppl name)
null otherwise.name - the name of the datatypenull otherwise.boolean isSatisfiable(Collection<aterm.ATermAppl> dataranges) throws InvalidConstrainingFacetException, InvalidLiteralException, UnrecognizedDatatypeException
isSatisfiable(Collection, Object) where
value == null.dataranges - The data ranges on the literal nodetrue if the conjunction of the data ranges is
satisfiable, false else.InvalidConstrainingFacetExceptionInvalidLiteralExceptionUnrecognizedDatatypeExceptionboolean isSatisfiable(Collection<aterm.ATermAppl> dataranges, Object value) throws InvalidConstrainingFacetException, InvalidLiteralException, UnrecognizedDatatypeException
dconjunction - The data ranges on the literal nodevalue - A constant value asserted for the node or null if
no such value is present.true if the conjunction of the data ranges is
satisfiable, false else.InvalidConstrainingFacetExceptionInvalidLiteralExceptionUnrecognizedDatatypeExceptionboolean isSatisfiable(Set<Literal> nodes, Map<Literal,Set<Literal>> ineqs) throws InvalidConstrainingFacetException, InvalidLiteralException, UnrecognizedDatatypeException
nodes - A set representing all literals with in-edges from a single
individualineqs - A map representing all literal inequality constraintstrue if the data ranges and inequalities are
satisfiable, false else.InvalidConstrainingFacetExceptionInvalidLiteralExceptionUnrecognizedDatatypeExceptionCollection<aterm.ATermAppl> listDataRanges()
boolean define(aterm.ATermAppl name,
aterm.ATermAppl datarange)
DatatypeDefinition)name - a URI used to refer to the datatypedatarange - the datarangename is already usedboolean validLiteral(aterm.ATermAppl typedLiteral)
throws UnrecognizedDatatypeException
literal - The literaltrue if the literal is in the lexical space of the
datatype, falseelseUnrecognizedDatatypeExceptionIterator<?> valueIterator(Collection<aterm.ATermAppl> dataranges) throws InvalidConstrainingFacetException, InvalidLiteralException, UnrecognizedDatatypeException
dataranges - the data rangesIteratorInvalidConstrainingFacetException - if dataranges contains a datatype restriction in
which the constraining facet is not validInvalidLiteralException - if dataranges references a literal value that is
invalidUnrecognizedDatatypeException - if dataranges references an unrecognized
datatypeIllegalArgumentException - if the conjunction of dataranges is not
enumerableCopyright © 2019. All rights reserved.