Interface IOwlReasoner
Proposed interface for OWL Reasoners - currently incomplete.
Namespace: VDS.RDF.Query.Inference
Assembly: dotNetRdf.Inferencing.dll
Syntax
public interface IOwlReasoner
Remarks
Important: This interface is specifically designed so that it does not require the provision of a Graph to methods unless the method does not make sense without taking an IGraph as a parameter. This is because we envisage the use of this interface for connecting to reasoners which have their own access to the data over which they are reasoning and do not need it providing explicitly to them.
Reasoner implementations may throw NotSupportedException for operations they don't support and may throw any other appropriate exceptions as appropriate for operations that encounter errors.
Properties
| Edit this page View SourceUnsatisfiable
Returns the enumeration of unsatisfiable classes.
Declaration
IEnumerable<OntologyResource> Unsatisfiable { get; }
Property Value
Type | Description |
---|---|
IEnumerable<OntologyResource> |
Exceptions
Type | Condition |
---|---|
NotSupportedException | May be thrown if the Reasoner does not support such an operation. |
Methods
| Edit this page View SourceAdd(IGraph)
Adds a Graph to the reasoners knowledge base.
Declaration
void Add(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
Remarks
A reasoner may choose to do nothing in this method if that reasoner especially if it operates using some pre-defined, remote or otherwise immutable knowledge base.
Exceptions
Type | Condition |
---|---|
NotSupportedException | May be thrown if the Reasoner does not support such an operation. |
Classify()
Extracts the triples which comprise the class hierarchy.
Declaration
IEnumerable<Triple> Classify()
Returns
Type | Description |
---|---|
IEnumerable<Triple> |
Exceptions
Type | Condition |
---|---|
NotSupportedException | May be thrown if the Reasoner does not support such an operation. |
Extract(IEnumerable<string>)
Extracts all possible triples using the given extraction modes.
Declaration
IEnumerable<Triple> Extract(IEnumerable<string> modes)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<string> | modes | Extraction Modes. |
Returns
Type | Description |
---|---|
IEnumerable<Triple> |
Remarks
The modes
permits for the specification of an extraction mode for reasoners that can extract specific subsets of reasoning. Where this is not supported the reasoner should simply extract all triples that can be inferred by reasoning.
Exceptions
Type | Condition |
---|---|
NotSupportedException | May be thrown if the Reasoner does not support such an operation. |
Extract(string)
Extracts all possible triples using the given extraction mode.
Declaration
IEnumerable<Triple> Extract(string mode)
Parameters
Type | Name | Description |
---|---|---|
string | mode | Extraction Mode. |
Returns
Type | Description |
---|---|
IEnumerable<Triple> |
Remarks
The mode
permits for the specification of an extraction mode for reasoners that can extract specific subsets of reasoning. Where this is not supported the reasoner should simply extract all triples that can be inferred by reasoning.
Exceptions
Type | Condition |
---|---|
NotSupportedException | May be thrown if the Reasoner does not support such an operation. |
Extract(IGraph, INode)
Extract a reasoning enhanced sub-graph from the given Graph rooted at the given Node.
Declaration
IGraph Extract(IGraph g, INode n)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
INode | n | Root Node. |
Returns
Type | Description |
---|---|
IGraph |
IsConsistent()
Returns whether the underlying knowledge base is consistent.
Declaration
bool IsConsistent()
Returns
Type | Description |
---|---|
bool |
Exceptions
Type | Condition |
---|---|
NotSupportedException | May be thrown if the Reasoner does not support such an operation. |
IsConsistent(IGraph)
Returns whether the given Graph is consistent with the underlying knowledge base.
Declaration
bool IsConsistent(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
Returns
Type | Description |
---|---|
bool |
Exceptions
Type | Condition |
---|---|
NotSupportedException | May be thrown if the Reasoner does not support such an operation. |
Realize()
Extracts the triples which comprise the class hierarchy and individuals of those classes.
Declaration
IEnumerable<Triple> Realize()
Returns
Type | Description |
---|---|
IEnumerable<Triple> |
Exceptions
Type | Condition |
---|---|
NotSupportedException | May be thrown if the Reasoner does not support such an operation. |