Class OntologyGraph
Represents a Graph with additional methods for extracting ontology based information from it.
Implements
System.IDisposable
System.Xml.Serialization.IXmlSerializable
System.Runtime.Serialization.ISerializable
Inherited Members
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 SourceOntologyGraph()
Creates a new Ontology Graph.
Declaration
public OntologyGraph()
Properties
| Improve this Doc View SourceAllClasses
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> |
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> |
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> |
OwlClasses
Get all OWL classes defined in the graph.
Declaration
public IEnumerable<OntologyClass> OwlClasses { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<OntologyClass> |
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> |
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> |
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> |
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> |
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 SourceCreateIndividual(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 |
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 |
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 |
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 |
CreateOntologyClass()
Gets/Creates an anonymous ontology class in the Graph.
Declaration
public virtual OntologyClass CreateOntologyClass()
Returns
Type | Description |
---|---|
OntologyClass |
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 |
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 |
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 |
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 |
CreateOntologyResource()
Gets/Creates an anonymous ontology resource in the Graph.
Declaration
public virtual OntologyResource CreateOntologyResource()
Returns
Type | Description |
---|---|
OntologyResource |
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 |
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 |
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. |
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
System.IDisposable
System.Xml.Serialization.IXmlSerializable
System.Runtime.Serialization.ISerializable