Click or drag to resize

SimpleN3RulesReasoner Class

An Inference Engine that supports simple N3 rules.
Inheritance Hierarchy
SystemObject
  VDS.RDF.Query.InferenceSimpleN3RulesReasoner

Namespace:  VDS.RDF.Query.Inference
Assembly:  dotNetRDF (in dotNetRDF.dll) Version:
Syntax
public class SimpleN3RulesReasoner : IInferenceEngine

The SimpleN3RulesReasoner type exposes the following members.

Constructors
  NameDescription
Public methodSimpleN3RulesReasoner
Initializes a new instance of the SimpleN3RulesReasoner class
Top
Methods
  NameDescription
Public methodApply(IGraph)
Applies reasoning to the given Graph materialising the generated Triples in the same Graph.
Public methodApply(IGraph, IGraph)
Applies reasoning on the Input Graph materialising the generated Triples in the Output Graph.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitialise
Initialises the Reasoner.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

This reasoner should be initialised with a Graph that contains simple N3 rules such as the following:

{ ?x a ?type } => { ?type a rdfs:Class }.

When initialised the reasoner takes account of variables declared with @forAll and @forSome directives though no guarantees that scoping will be correct if you've got multiple @forAll and @forSome directives.

When the reasoner is applied to a Graph rules are implemented by generating a SPARQL Update INSERT command like the following and executing it on the given Graph.

INSERT
{
  ?type a rdfs:Class .
}
WHERE
{
  ?x a ?type .
}
See Also