Show / Hide Table of Contents

Class OntologyGraph

Represents a Graph with additional methods for extracting ontology based information from it.
Inheritance
System.Object
BaseGraph
Graph
OntologyGraph
ReasonerGraph
Implements
IGraph
INodeFactory
System.IDisposable
System.Xml.Serialization.IXmlSerializable
System.Runtime.Serialization.ISerializable
Inherited Members
Graph.Assert(Triple)
Graph.Assert(IEnumerable<Triple>)
Graph.Retract(Triple)
Graph.Retract(IEnumerable<Triple>)
Graph.GetUriNode(Uri)
Graph.GetUriNode(String)
Graph.GetLiteralNode(String)
Graph.GetLiteralNode(String, String)
Graph.GetLiteralNode(String, Uri)
Graph.GetBlankNode(String)
Graph.GetTriples(INode)
Graph.GetTriples(Uri)
Graph.GetTriplesWithSubject(INode)
Graph.GetTriplesWithSubject(Uri)
Graph.GetTriplesWithPredicate(INode)
Graph.GetTriplesWithPredicate(Uri)
Graph.GetTriplesWithObject(INode)
Graph.GetTriplesWithObject(Uri)
Graph.GetTriplesWithSubjectPredicate(INode, INode)
Graph.GetTriplesWithSubjectObject(INode, INode)
Graph.GetTriplesWithPredicateObject(INode, INode)
BaseGraph._triples
BaseGraph._nsmapper
BaseGraph._baseuri
BaseGraph._bnodemapper
BaseGraph.Triples
BaseGraph.Nodes
BaseGraph.AllNodes
BaseGraph.NamespaceMap
BaseGraph.BaseUri
BaseGraph.IsEmpty
BaseGraph.Clear()
BaseGraph.CreateBlankNode()
BaseGraph.CreateBlankNode(String)
BaseGraph.CreateLiteralNode(String)
BaseGraph.CreateLiteralNode(String, String)
BaseGraph.CreateLiteralNode(String, Uri)
BaseGraph.CreateUriNode()
BaseGraph.CreateUriNode(Uri)
BaseGraph.CreateUriNode(String)
BaseGraph.CreateVariableNode(String)
BaseGraph.CreateGraphLiteralNode()
BaseGraph.CreateGraphLiteralNode(IGraph)
BaseGraph.ContainsTriple(Triple)
BaseGraph.Merge(IGraph)
BaseGraph.Merge(IGraph, Boolean)
BaseGraph.Equals(Object)
BaseGraph.Equals(IGraph, Dictionary<INode, INode>)
BaseGraph.IsSubGraphOf(IGraph)
BaseGraph.IsSubGraphOf(IGraph, Dictionary<INode, INode>)
BaseGraph.HasSubGraph(IGraph)
BaseGraph.HasSubGraph(IGraph, Dictionary<INode, INode>)
BaseGraph.Difference(IGraph)
BaseGraph.ResolveQName(String)
BaseGraph.GetNextBlankNodeID()
BaseGraph.TripleAsserted
BaseGraph.TripleRetracted
BaseGraph.Changed
BaseGraph.ClearRequested
BaseGraph.Cleared
BaseGraph.MergeRequested
BaseGraph.Merged
BaseGraph.OnTripleAsserted(Object, TripleEventArgs)
BaseGraph.RaiseTripleAsserted(TripleEventArgs)
BaseGraph.RaiseTripleAsserted(Triple)
BaseGraph.OnTripleRetracted(Object, TripleEventArgs)
BaseGraph.RaiseTripleRetracted(TripleEventArgs)
BaseGraph.RaiseTripleRetracted(Triple)
BaseGraph.RaiseGraphChanged(TripleEventArgs)
BaseGraph.RaiseGraphChanged()
BaseGraph.RaiseClearRequested()
BaseGraph.RaiseCleared()
BaseGraph.RaiseMergeRequested()
BaseGraph.RaiseMerged()
BaseGraph.AttachEventHandlers(BaseTripleCollection)
BaseGraph.DetachEventHandlers(BaseTripleCollection)
BaseGraph.Dispose()
BaseGraph.GetObjectData(SerializationInfo, StreamingContext)
BaseGraph.GetSchema()
BaseGraph.ReadXml(XmlReader)
BaseGraph.WriteXml(XmlWriter)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: VDS.RDF.Ontology
Assembly: dotNetRDF.dll
Syntax
public class OntologyGraph : Graph, IGraph, INodeFactory, IDisposable, IXmlSerializable, ISerializable
Remarks

See Using the Ontology API for some informal documentation on the use of the Ontology namespace.

Constructors

| Improve this Doc View Source

OntologyGraph()

Creates a new Ontology Graph.
Declaration
public OntologyGraph()

Properties

| Improve this Doc View Source

AllClasses

Gets all classes defined in the graph using the standard rdfs:Class and owl:Class types.
Declaration
public IEnumerable<OntologyClass> AllClasses { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<OntologyClass>
| Improve this Doc View Source

AllProperties

Gets all properties defined in the graph using any of the standard property types (rdf:Property, owl:AnnotationProperty, owl:DataProperty, owl:ObjectProperty).
Declaration
public IEnumerable<OntologyProperty> AllProperties { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<OntologyProperty>
| Improve this Doc View Source

OwlAnnotationProperties

Gets all OWL Annotation properties defined in the graph.
Declaration
public IEnumerable<OntologyProperty> OwlAnnotationProperties { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<OntologyProperty>
| Improve this Doc View Source

OwlClasses

Get all OWL classes defined in the graph.
Declaration
public IEnumerable<OntologyClass> OwlClasses { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<OntologyClass>
| Improve this Doc View Source

OwlDatatypeProperties

Gets all OWL Data properties defined in the graph.
Declaration
public IEnumerable<OntologyProperty> OwlDatatypeProperties { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<OntologyProperty>
| Improve this Doc View Source

OwlObjectProperties

Gets all OWL Object properties defined in the graph.
Declaration
public IEnumerable<OntologyProperty> OwlObjectProperties { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<OntologyProperty>
| Improve this Doc View Source

OwlProperties

Gets all properties defined in the graph using any of the standard OWL property types (owl:AnnotationProperty, owl:DataProperty, owl:ObjectProperty).
Declaration
public IEnumerable<OntologyProperty> OwlProperties { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<OntologyProperty>
| Improve this Doc View Source

RdfClasses

Get all the RDFS classes defined in the graph.
Declaration
public IEnumerable<OntologyClass> RdfClasses { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<OntologyClass>
| Improve this Doc View Source

RdfProperties

Gets all RDF properties defined in the graph.
Declaration
public IEnumerable<OntologyProperty> RdfProperties { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<OntologyProperty>

Methods

| Improve this Doc View Source

CreateIndividual(Uri)

Gets an existing individual in the Graph.
Declaration
public virtual Individual CreateIndividual(Uri resource)
Parameters
Type Name Description
System.Uri resource Individual Resource.
Returns
Type Description
Individual
| Improve this Doc View Source

CreateIndividual(Uri, Uri)

Gets/Creates an individual in the Graph of the given class.
Declaration
public virtual Individual CreateIndividual(Uri resource, Uri class)
Parameters
Type Name Description
System.Uri resource Individual Resource.
System.Uri class Class.
Returns
Type Description
Individual
| Improve this Doc View Source

CreateIndividual(INode)

Gets an existing individual in the Graph.
Declaration
public virtual Individual CreateIndividual(INode resource)
Parameters
Type Name Description
INode resource Individual Resource.
Returns
Type Description
Individual
| Improve this Doc View Source

CreateIndividual(INode, INode)

Gets/Creates an individual in the Graph of the given class.
Declaration
public virtual Individual CreateIndividual(INode resource, INode class)
Parameters
Type Name Description
INode resource Individual Resource.
INode class Class.
Returns
Type Description
Individual
| Improve this Doc View Source

CreateOntologyClass()

Gets/Creates an anonymous ontology class in the Graph.
Declaration
public virtual OntologyClass CreateOntologyClass()
Returns
Type Description
OntologyClass
| Improve this Doc View Source

CreateOntologyClass(Uri)

Gets/Creates an ontology class in the Graph.
Declaration
public virtual OntologyClass CreateOntologyClass(Uri resource)
Parameters
Type Name Description
System.Uri resource Class Resource.
Returns
Type Description
OntologyClass
| Improve this Doc View Source

CreateOntologyClass(INode)

Gets/Creates an ontology class in the Graph.
Declaration
public virtual OntologyClass CreateOntologyClass(INode resource)
Parameters
Type Name Description
INode resource Class Resource.
Returns
Type Description
OntologyClass
| Improve this Doc View Source

CreateOntologyProperty(Uri)

Gets/Creates an ontology property in the Graph.
Declaration
public virtual OntologyProperty CreateOntologyProperty(Uri resource)
Parameters
Type Name Description
System.Uri resource Property Resource.
Returns
Type Description
OntologyProperty
| Improve this Doc View Source

CreateOntologyProperty(INode)

Gets/Creates an ontology property in the Graph.
Declaration
public virtual OntologyProperty CreateOntologyProperty(INode resource)
Parameters
Type Name Description
INode resource Property Resource.
Returns
Type Description
OntologyProperty
| Improve this Doc View Source

CreateOntologyResource()

Gets/Creates an anonymous ontology resource in the Graph.
Declaration
public virtual OntologyResource CreateOntologyResource()
Returns
Type Description
OntologyResource
| Improve this Doc View Source

CreateOntologyResource(Uri)

Gets/Creates an ontology resource in the Graph.
Declaration
public virtual OntologyResource CreateOntologyResource(Uri resource)
Parameters
Type Name Description
System.Uri resource Resource.
Returns
Type Description
OntologyResource
| Improve this Doc View Source

CreateOntologyResource(INode)

Gets/Creates an ontology resource in the Graph.
Declaration
public virtual OntologyResource CreateOntologyResource(INode resource)
Parameters
Type Name Description
INode resource Resource.
Returns
Type Description
OntologyResource
| Improve this Doc View Source

GetClasses(INode)

Get all classes defined in the graph where anything of a specific type is considered a class.
Declaration
public IEnumerable<OntologyClass> GetClasses(INode classType)
Parameters
Type Name Description
INode classType Type which represents classes.
Returns
Type Description
System.Collections.Generic.IEnumerable<OntologyClass> Enumeration of classes.
| Improve this Doc View Source

GetProperties(INode)

Get all properties defined in the graph where anything of a specific type is considered a property.
Declaration
public IEnumerable<OntologyProperty> GetProperties(INode propertyType)
Parameters
Type Name Description
INode propertyType Type which represents properties.
Returns
Type Description
System.Collections.Generic.IEnumerable<OntologyProperty> Enumeration of properties.

Implements

IGraph
INodeFactory
System.IDisposable
System.Xml.Serialization.IXmlSerializable
System.Runtime.Serialization.ISerializable

Extension Methods

GraphExtensions.ToDataTable(IGraph)
Extensions.AsEnumerable<T>(T)
Extensions.Assert(IGraph, INode, INode, INode)
Extensions.Retract(IGraph, INode, INode, INode)
Extensions.AssertList<T>(IGraph, IEnumerable<T>, Func<T, INode>)
Extensions.AssertList<T>(IGraph, INode, IEnumerable<T>, Func<T, INode>)
Extensions.AssertList(IGraph, IEnumerable<INode>)
Extensions.AssertList(IGraph, INode, IEnumerable<INode>)
Extensions.GetListAsTriples(IGraph, INode)
Extensions.GetListItems(IGraph, INode)
Extensions.GetListNodes(IGraph, INode)
Extensions.RetractList(IGraph, INode)
Extensions.AddToList<T>(IGraph, INode, IEnumerable<T>, Func<T, INode>)
Extensions.AddToList(IGraph, INode, IEnumerable<INode>)
Extensions.RemoveFromList<T>(IGraph, INode, IEnumerable<T>, Func<T, INode>)
Extensions.RemoveFromList(IGraph, INode, IEnumerable<INode>)
GraphExtensions.ExecuteQuery(IGraph, String)
GraphExtensions.ExecuteQuery(IGraph, IRdfHandler, ISparqlResultsHandler, String)
GraphExtensions.ExecuteQuery(IGraph, SparqlParameterizedString)
GraphExtensions.ExecuteQuery(IGraph, IRdfHandler, ISparqlResultsHandler, SparqlParameterizedString)
GraphExtensions.ExecuteQuery(IGraph, SparqlQuery)
GraphExtensions.ExecuteQuery(IGraph, IRdfHandler, ISparqlResultsHandler, SparqlQuery)
GraphExtensions.LoadFromFile(IGraph, String, IRdfReader)
GraphExtensions.LoadFromFile(IGraph, String)
GraphExtensions.LoadFromUri(IGraph, Uri, IRdfReader)
GraphExtensions.LoadFromUri(IGraph, Uri)
GraphExtensions.LoadFromString(IGraph, String, IRdfReader)
GraphExtensions.LoadFromString(IGraph, String)
GraphExtensions.LoadFromEmbeddedResource(IGraph, String)
GraphExtensions.LoadFromEmbeddedResource(IGraph, String, IRdfReader)
GraphExtensions.SaveToFile(IGraph, String, IRdfWriter)
GraphExtensions.SaveToFile(IGraph, String, IStoreWriter)
GraphExtensions.SaveToFile(IGraph, String)
GraphExtensions.SaveToStream(IGraph, TextWriter, IRdfWriter)
GraphExtensions.SaveToStream(IGraph, TextWriter, IStoreWriter)
GraphExtensions.SaveToStream(IGraph, String, TextWriter)
DynamicExtensions.AsDynamic(IGraph, Uri, Uri)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • OntologyGraph()
  • Properties
    • AllClasses
    • AllProperties
    • OwlAnnotationProperties
    • OwlClasses
    • OwlDatatypeProperties
    • OwlObjectProperties
    • OwlProperties
    • RdfClasses
    • RdfProperties
  • Methods
    • CreateIndividual(Uri)
    • CreateIndividual(Uri, Uri)
    • CreateIndividual(INode)
    • CreateIndividual(INode, INode)
    • CreateOntologyClass()
    • CreateOntologyClass(Uri)
    • CreateOntologyClass(INode)
    • CreateOntologyProperty(Uri)
    • CreateOntologyProperty(INode)
    • CreateOntologyResource()
    • CreateOntologyResource(Uri)
    • CreateOntologyResource(INode)
    • GetClasses(INode)
    • GetProperties(INode)
  • Implements
  • Extension Methods
Back to top Generated by DocFX