Class SimpleN3RulesReasoner
An Inference Engine that supports simple N3 rules.
Inheritance
Implements
Inherited Members
Namespace: VDS.RDF.Query.Inference
Assembly: dotNetRdf.Inferencing.dll
Syntax
public class SimpleN3RulesReasoner : IInferenceEngine
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 .
}
Methods
| Improve this Doc View SourceApply(IGraph, IGraph)
Applies reasoning on the Input Graph materialising the generated Triples in the Output Graph.
Declaration
public void Apply(IGraph input, IGraph output)
Parameters
Type | Name | Description |
---|---|---|
IGraph | input | Input Graph. |
IGraph | output | Output Graph. |
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 .
}
Apply(IGraph)
Applies reasoning to the given Graph materialising the generated Triples in the same Graph.
Declaration
public void Apply(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
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 .
}
Initialise(IGraph)
Initialises the Reasoner.
Declaration
public void Initialise(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Rules Graph. |
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 .
}