Show / Hide Table of Contents

Class SimpleN3RulesReasoner

An Inference Engine that supports simple N3 rules.

Inheritance
object
SimpleN3RulesReasoner
Implements
IInferenceEngine
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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

| Edit this page View Source

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.

| Edit this page View Source

Apply(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.

| Edit this page View Source

Initialise(IGraph)

Initialises the Reasoner.

Declaration
public void Initialise(IGraph g)
Parameters
Type Name Description
IGraph g

Rules Graph.

Implements

IInferenceEngine

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Methods
    • Apply(IGraph)
    • Apply(IGraph, IGraph)
    • Initialise(IGraph)
  • Implements
  • Extension Methods
Back to top Generated by DocFX