|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DatatypeReasoner
Title: Datatype Reasoner
Description: Reasoner encapsulating all concrete domain and datatype handling
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
| Method Summary | |
|---|---|
boolean |
containsAtLeast(int n,
java.util.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(java.lang.Object value)
Get the canonical ATermAppl literal representation for a value
space object |
java.lang.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(java.util.Collection<aterm.ATermAppl> dataranges)
Shorthand for isSatisfiable(Collection, Object) where
value == null. |
boolean |
isSatisfiable(java.util.Collection<aterm.ATermAppl> dataranges,
java.lang.Object value)
Check the data ranges on a single literal node are satisfiable (independent of other nodes). |
boolean |
isSatisfiable(java.util.Set<Literal> nodes,
java.util.Map<Literal,java.util.Set<Literal>> ineqs)
Check that the data ranges and inequalities asserted on a collection of literal nodes are satisfiable. |
java.util.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) |
java.util.Iterator<?> |
valueIterator(java.util.Collection<aterm.ATermAppl> dataranges)
Get an iterator for the values of a finite datarange |
| Method Detail |
|---|
boolean containsAtLeast(int n,
java.util.Collection<aterm.ATermAppl> ranges)
throws InvalidConstrainingFacetException,
InvalidLiteralException,
UnrecognizedDatatypeException
n - the minimum number of elementsranges - the data ranges to intersect
true if the intersection of ranges
contains at least n elements, false
else
InvalidConstrainingFacetException
InvalidLiteralException
UnrecognizedDatatypeExceptionboolean declare(aterm.ATermAppl name)
isDeclared(ATermAppl).
name - the name (normally URI) of the datatype
true if name has not been previously
declared, false else.
aterm.ATermAppl getCanonicalRepresentation(aterm.ATermAppl literal)
throws InvalidLiteralException,
UnrecognizedDatatypeException
literal - the literal to canonicalize
InvalidLiteralException - if the literal is not in the lexical space of the datatype
UnrecognizedDatatypeException - 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(java.lang.Object value)
ATermAppl literal representation for a value
space object
value - Element of the value space for some datatype
ATermAppl representation of value
java.lang.IllegalArgumentException - if value is not contained in the value space of
any recognized datatype
java.lang.Object getValue(aterm.ATermAppl literal)
throws InvalidLiteralException,
UnrecognizedDatatypeException
java.lang.Byte.
literal -
literal
InvalidLiteralException - if the literal is not in the lexical space of the datatype
UnrecognizedDatatypeException - 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 datatype
true 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 range
true if name is supported,
false elseaterm.ATermAppl getDefinition(aterm.ATermAppl name)
null otherwise.
name - the name of the datatype
null otherwise.
boolean isSatisfiable(java.util.Collection<aterm.ATermAppl> dataranges)
throws InvalidConstrainingFacetException,
InvalidLiteralException,
UnrecognizedDatatypeException
isSatisfiable(Collection, Object) where
value == null.
dataranges - The data ranges on the literal node
true if the conjunction of the data ranges is
satisfiable, false else.
InvalidConstrainingFacetException
InvalidLiteralException
UnrecognizedDatatypeException
boolean isSatisfiable(java.util.Collection<aterm.ATermAppl> dataranges,
java.lang.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.
InvalidConstrainingFacetException
InvalidLiteralException
UnrecognizedDatatypeException
boolean isSatisfiable(java.util.Set<Literal> nodes,
java.util.Map<Literal,java.util.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 constraints
true if the data ranges and inequalities are
satisfiable, false else.
InvalidConstrainingFacetException
InvalidLiteralException
UnrecognizedDatatypeExceptionjava.util.Collection<aterm.ATermAppl> listDataRanges()
boolean define(aterm.ATermAppl name,
aterm.ATermAppl datarange)
DatatypeDefinition)
name - a URI used to refer to the datatypedatarange - the datarange
name is already used
boolean validLiteral(aterm.ATermAppl typedLiteral)
throws UnrecognizedDatatypeException
literal - The literal
true if the literal is in the lexical space of the
datatype, falseelse
UnrecognizedDatatypeException
java.util.Iterator<?> valueIterator(java.util.Collection<aterm.ATermAppl> dataranges)
throws InvalidConstrainingFacetException,
InvalidLiteralException,
UnrecognizedDatatypeException
dataranges - the data ranges
Iterator
InvalidConstrainingFacetException - if dataranges contains a datatype restriction in
which the constraining facet is not valid
InvalidLiteralException - if dataranges references a literal value that is
invalid
UnrecognizedDatatypeException - if dataranges references an unrecognized
datatype
java.lang.IllegalArgumentException - if the conjunction of dataranges is not
enumerable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||