Show / Hide Table of Contents

Class OntologyClass

Class for representing a class in an Ontology.

Inheritance
System.Object
OntologyResource
OntologyClass
Inherited Members
OntologyResource._literalProperties
OntologyResource._resourceProperties
OntologyResource._resource
OntologyResource._graph
OntologyResource.Resource
OntologyResource.Graph
OntologyResource.IntialiseProperty(string, bool)
OntologyResource.AddLiteralProperty(string, ILiteralNode, bool)
OntologyResource.AddLiteralProperty(Uri, ILiteralNode, bool)
OntologyResource.AddResourceProperty(string, INode, bool)
OntologyResource.AddResourceProperty(Uri, INode, bool)
OntologyResource.ClearLiteralProperty(string, bool)
OntologyResource.ClearLiteralProperty(Uri, bool)
OntologyResource.ClearResourceProperty(string, bool)
OntologyResource.ClearResourceProperty(Uri, bool)
OntologyResource.RemoveLiteralProperty(string, ILiteralNode, bool)
OntologyResource.RemoveLiteralProperty(Uri, ILiteralNode, bool)
OntologyResource.RemoveResourceProperty(string, INode, bool)
OntologyResource.RemoveResourceProperty(Uri, INode, bool)
OntologyResource.AddComment(string)
OntologyResource.AddComment(string, string)
OntologyResource.ClearComments()
OntologyResource.RemoveComment(ILiteralNode)
OntologyResource.RemoveComment(string)
OntologyResource.RemoveComment(string, string)
OntologyResource.AddDifferentFrom(INode)
OntologyResource.AddDifferentFrom(Uri)
OntologyResource.AddDifferentFrom(OntologyResource)
OntologyResource.ClearDifferentFrom()
OntologyResource.RemoveDifferentFrom(INode)
OntologyResource.RemoveDifferentFrom(Uri)
OntologyResource.RemoveDifferentFrom(OntologyResource)
OntologyResource.AddIsDefinedBy(INode)
OntologyResource.AddIsDefinedBy(Uri)
OntologyResource.AddIsDefinedBy(OntologyResource)
OntologyResource.ClearIsDefinedBy()
OntologyResource.RemoveIsDefinedBy(INode)
OntologyResource.RemoveIsDefinedBy(Uri)
OntologyResource.RemoveIsDefinedBy(OntologyResource)
OntologyResource.AddLabel(string)
OntologyResource.AddLabel(string, string)
OntologyResource.ClearLabels()
OntologyResource.RemoveLabel(ILiteralNode)
OntologyResource.RemoveLabel(string)
OntologyResource.RemoveLabel(string, string)
OntologyResource.AddSameAs(INode)
OntologyResource.AddSameAs(Uri)
OntologyResource.AddSameAs(OntologyResource)
OntologyResource.ClearSameAs()
OntologyResource.RemoveSameAs(INode)
OntologyResource.RemoveSameAs(Uri)
OntologyResource.RemoveSameAs(OntologyResource)
OntologyResource.AddSeeAlso(INode)
OntologyResource.AddSeeAlso(Uri)
OntologyResource.AddSeeAlso(OntologyResource)
OntologyResource.ClearSeeAlso()
OntologyResource.RemoveSeeAlso(INode)
OntologyResource.RemoveSeeAlso(Uri)
OntologyResource.RemoveSeeAlso(OntologyResource)
OntologyResource.AddType(INode)
OntologyResource.AddType(Uri)
OntologyResource.AddType(OntologyResource)
OntologyResource.ClearTypes()
OntologyResource.RemoveType(INode)
OntologyResource.RemoveType(Uri)
OntologyResource.RemoveType(OntologyResource)
OntologyResource.AddVersionInfo(string)
OntologyResource.ClearVersionInfo()
OntologyResource.RemoveVersionInfo(ILiteralNode)
OntologyResource.RemoveVersionInfo(string)
OntologyResource.GetLiteralProperty(string)
OntologyResource.GetLiteralProperty(Uri)
OntologyResource.GetResourceProperty(string)
OntologyResource.GetResourceProperty(Uri)
OntologyResource.VersionInfo
OntologyResource.Comment
OntologyResource.Label
OntologyResource.SeeAlso
OntologyResource.SameAs
OntologyResource.IsDefinedBy
OntologyResource.DifferentFrom
OntologyResource.Types
OntologyResource.TriplesWithSubject
OntologyResource.TriplesWithObject
OntologyResource.TriplesWithPredicate
OntologyResource.Triples
OntologyResource.ToString()
OntologyResource.AsClass()
OntologyResource.AsProperty()
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VDS.RDF.Ontology
Assembly: dotNetRdf.Ontology.dll
Syntax
public class OntologyClass : OntologyResource
Remarks

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

Constructors

| Improve this Doc View Source

OntologyClass(INode, IGraph)

Creates a new representation of a Class in the given Ontology Mode.

Declaration
public OntologyClass(INode resource, IGraph graph)
Parameters
Type Name Description
INode resource

Resource.

IGraph graph

Graph.

Remarks

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

Properties

| Improve this Doc View Source

DirectSubClasses

Gets the direct sub-classes of this class.

Declaration
public IEnumerable<OntologyClass> DirectSubClasses { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><OntologyClass>
Remarks

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

| Improve this Doc View Source

DirectSuperClasses

Gets the direct super-classes of this class.

Declaration
public IEnumerable<OntologyClass> DirectSuperClasses { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><OntologyClass>
Remarks

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

| Improve this Doc View Source

DisjointClasses

Gets the disjoint classes of this class.

Declaration
public IEnumerable<OntologyClass> DisjointClasses { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><OntologyClass>
Remarks

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

| Improve this Doc View Source

EquivalentClasses

Gets the equivalent classes of this class.

Declaration
public IEnumerable<OntologyClass> EquivalentClasses { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><OntologyClass>
Remarks

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

| Improve this Doc View Source

IndirectSubClasses

Gets the indirect sub-classes of this class.

Declaration
public IEnumerable<OntologyClass> IndirectSubClasses { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><OntologyClass>
Remarks

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

| Improve this Doc View Source

IndirectSuperClasses

Gets the indirect super-classes of this class.

Declaration
public IEnumerable<OntologyClass> IndirectSuperClasses { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><OntologyClass>
Remarks

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

| Improve this Doc View Source

Instances

Gets the instances (individuals) of this class.

Declaration
public IEnumerable<OntologyResource> Instances { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><OntologyResource>
Remarks

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

| Improve this Doc View Source

IsBottomClass

Gets whether something is a Bottom Class i.e. has no sub classes.

Declaration
public bool IsBottomClass { get; }
Property Value
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

IsDomainOf

Gets the properties which have this class as a domain.

Declaration
public IEnumerable<OntologyProperty> IsDomainOf { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><OntologyProperty>
Remarks

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

| Improve this Doc View Source

IsRangeOf

Gets the properties which have this class as a range.

Declaration
public IEnumerable<OntologyProperty> IsRangeOf { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><OntologyProperty>
Remarks

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

| Improve this Doc View Source

IsTopClass

Gets whether something is a Top Class i.e. has no super classes.

Declaration
public bool IsTopClass { get; }
Property Value
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

Siblings

Gets the Sibling classes of this class, if this class is the root of the ontology nothing is returned even if there are multiple root classes.

Declaration
public IEnumerable<OntologyClass> Siblings { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><OntologyClass>
Remarks

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

| Improve this Doc View Source

SubClasses

Gets the sub-classes of this class (both direct and indirect).

Declaration
public IEnumerable<OntologyClass> SubClasses { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><OntologyClass>
Remarks

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

| Improve this Doc View Source

SuperClasses

Gets the super-classes of this class (both direct and indirect).

Declaration
public IEnumerable<OntologyClass> SuperClasses { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><OntologyClass>
Remarks

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

Methods

| Improve this Doc View Source

AddDisjointClass(Uri)

Adds a new disjoint class for this class.

Declaration
public bool AddDisjointClass(Uri resource)
Parameters
Type Name Description
System.Uri resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

AddDisjointClass(INode)

Adds a new disjoint class for this class.

Declaration
public bool AddDisjointClass(INode resource)
Parameters
Type Name Description
INode resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

AddDisjointClass(OntologyClass)

Adds a new disjoint class for this class.

Declaration
public bool AddDisjointClass(OntologyClass @class)
Parameters
Type Name Description
OntologyClass class

Class.

Returns
Type Description
System.Boolean
Remarks

This overload also adds this class as a disjoint class of the given class.

| Improve this Doc View Source

AddDisjointClass(OntologyResource)

Adds a new disjoint class for this class.

Declaration
public bool AddDisjointClass(OntologyResource resource)
Parameters
Type Name Description
OntologyResource resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

AddEquivalentClass(Uri)

Adds an equivalent class for this class.

Declaration
public bool AddEquivalentClass(Uri resource)
Parameters
Type Name Description
System.Uri resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

AddEquivalentClass(INode)

Adds an equivalent class for this class.

Declaration
public bool AddEquivalentClass(INode resource)
Parameters
Type Name Description
INode resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

AddEquivalentClass(OntologyClass)

Adds an equivalent class for this class.

Declaration
public bool AddEquivalentClass(OntologyClass @class)
Parameters
Type Name Description
OntologyClass class

Class.

Returns
Type Description
System.Boolean
Remarks

This overload also adds this class as an equivalent class of the given class.

| Improve this Doc View Source

AddEquivalentClass(OntologyResource)

Adds an equivalent class for this class.

Declaration
public bool AddEquivalentClass(OntologyResource resource)
Parameters
Type Name Description
OntologyResource resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

AddSubClass(Uri)

Adds a new sub-class for this class.

Declaration
public bool AddSubClass(Uri resource)
Parameters
Type Name Description
System.Uri resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

AddSubClass(INode)

Adds a new sub-class for this class.

Declaration
public bool AddSubClass(INode resource)
Parameters
Type Name Description
INode resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

AddSubClass(OntologyClass)

Adds a new sub-class for this class.

Declaration
public bool AddSubClass(OntologyClass @class)
Parameters
Type Name Description
OntologyClass class

Class.

Returns
Type Description
System.Boolean
Remarks

This overload also adds this class as a super-class of the given class.

| Improve this Doc View Source

AddSubClass(OntologyResource)

Adds a new sub-class for this class.

Declaration
public bool AddSubClass(OntologyResource resource)
Parameters
Type Name Description
OntologyResource resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

AddSuperClass(Uri)

Adds a new super-class for this class.

Declaration
public bool AddSuperClass(Uri resource)
Parameters
Type Name Description
System.Uri resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

AddSuperClass(INode)

Adds a new super-class for this class.

Declaration
public bool AddSuperClass(INode resource)
Parameters
Type Name Description
INode resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

AddSuperClass(OntologyClass)

Adds a new super-class for this class.

Declaration
public bool AddSuperClass(OntologyClass @class)
Parameters
Type Name Description
OntologyClass class

Class.

Returns
Type Description
System.Boolean
Remarks

This overload also adds this class as a sub-class of the given class.

| Improve this Doc View Source

AddSuperClass(OntologyResource)

Adds a new super-class for this class.

Declaration
public bool AddSuperClass(OntologyResource resource)
Parameters
Type Name Description
OntologyResource resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

ClearDisjointClasses()

Removes all disjoint classes for this class.

Declaration
public bool ClearDisjointClasses()
Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

ClearEquivalentClasses()

Removes all equivalent classes for this class.

Declaration
public bool ClearEquivalentClasses()
Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

ClearSubClasses()

Removes all sub-classes for this class.

Declaration
public bool ClearSubClasses()
Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

ClearSuperClasses()

Removes all super-classes.

Declaration
public bool ClearSuperClasses()
Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

CreateIndividual(Uri)

Gets/Creates an Individual of this class.

Declaration
public Individual CreateIndividual(Uri resource)
Parameters
Type Name Description
System.Uri resource

Resource identifying the individual.

Returns
Type Description
Individual
Remarks

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

| Improve this Doc View Source

Equals(object)

Gets whether this Class is equal to another Class.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

Object to test.

Returns
Type Description
System.Boolean
Overrides
object.Equals(object)
Remarks

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

| Improve this Doc View Source

RemoveDisjointClass(Uri)

Removes a disjoint class for this class.

Declaration
public bool RemoveDisjointClass(Uri resource)
Parameters
Type Name Description
System.Uri resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

RemoveDisjointClass(INode)

Removes a disjoint class for this class.

Declaration
public bool RemoveDisjointClass(INode resource)
Parameters
Type Name Description
INode resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

RemoveDisjointClass(OntologyClass)

Removes a disjoint class for this class.

Declaration
public bool RemoveDisjointClass(OntologyClass @class)
Parameters
Type Name Description
OntologyClass class

Class.

Returns
Type Description
System.Boolean
Remarks

This overload also removes this class as a disjoint class of the given class.

| Improve this Doc View Source

RemoveDisjointClass(OntologyResource)

Removes a disjoint class for this class.

Declaration
public bool RemoveDisjointClass(OntologyResource resource)
Parameters
Type Name Description
OntologyResource resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

RemoveEquivalentClass(Uri)

Removes an equivalent class for this class.

Declaration
public bool RemoveEquivalentClass(Uri resource)
Parameters
Type Name Description
System.Uri resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

RemoveEquivalentClass(INode)

Removes an equivalent class for this class.

Declaration
public bool RemoveEquivalentClass(INode resource)
Parameters
Type Name Description
INode resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

RemoveEquivalentClass(OntologyClass)

Removes an equivalent class for this class.

Declaration
public bool RemoveEquivalentClass(OntologyClass @class)
Parameters
Type Name Description
OntologyClass class

Class.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

RemoveEquivalentClass(OntologyResource)

Removes an equivalent class for this class.

Declaration
public bool RemoveEquivalentClass(OntologyResource resource)
Parameters
Type Name Description
OntologyResource resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

RemoveSubClass(Uri)

Removes a sub-class for this class.

Declaration
public bool RemoveSubClass(Uri resource)
Parameters
Type Name Description
System.Uri resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

RemoveSubClass(INode)

Removes a sub-class for this class.

Declaration
public bool RemoveSubClass(INode resource)
Parameters
Type Name Description
INode resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

RemoveSubClass(OntologyClass)

Removes a sub-class for this class.

Declaration
public bool RemoveSubClass(OntologyClass @class)
Parameters
Type Name Description
OntologyClass class

Class.

Returns
Type Description
System.Boolean
Remarks

This overload also removes this class from being a super-class of the given class.

| Improve this Doc View Source

RemoveSubClass(OntologyResource)

Removes a sub-class for this class.

Declaration
public bool RemoveSubClass(OntologyResource resource)
Parameters
Type Name Description
OntologyResource resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

RemoveSuperClass(Uri)

Removes a super-class for this class.

Declaration
public bool RemoveSuperClass(Uri resource)
Parameters
Type Name Description
System.Uri resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

RemoveSuperClass(INode)

Removes a super-class for this class.

Declaration
public bool RemoveSuperClass(INode resource)
Parameters
Type Name Description
INode resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

| Improve this Doc View Source

RemoveSuperClass(OntologyClass)

Removes a super-class for this class.

Declaration
public bool RemoveSuperClass(OntologyClass @class)
Parameters
Type Name Description
OntologyClass class

Class.

Returns
Type Description
System.Boolean
Remarks

This overload also removes this class as a sub-class of the given class.

| Improve this Doc View Source

RemoveSuperClass(OntologyResource)

Removes a super-class for this class.

Declaration
public bool RemoveSuperClass(OntologyResource resource)
Parameters
Type Name Description
OntologyResource resource

Resource.

Returns
Type Description
System.Boolean
Remarks

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

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • OntologyClass(INode, IGraph)
  • Properties
    • DirectSubClasses
    • DirectSuperClasses
    • DisjointClasses
    • EquivalentClasses
    • IndirectSubClasses
    • IndirectSuperClasses
    • Instances
    • IsBottomClass
    • IsDomainOf
    • IsRangeOf
    • IsTopClass
    • Siblings
    • SubClasses
    • SuperClasses
  • Methods
    • AddDisjointClass(Uri)
    • AddDisjointClass(INode)
    • AddDisjointClass(OntologyClass)
    • AddDisjointClass(OntologyResource)
    • AddEquivalentClass(Uri)
    • AddEquivalentClass(INode)
    • AddEquivalentClass(OntologyClass)
    • AddEquivalentClass(OntologyResource)
    • AddSubClass(Uri)
    • AddSubClass(INode)
    • AddSubClass(OntologyClass)
    • AddSubClass(OntologyResource)
    • AddSuperClass(Uri)
    • AddSuperClass(INode)
    • AddSuperClass(OntologyClass)
    • AddSuperClass(OntologyResource)
    • ClearDisjointClasses()
    • ClearEquivalentClasses()
    • ClearSubClasses()
    • ClearSuperClasses()
    • CreateIndividual(Uri)
    • Equals(object)
    • RemoveDisjointClass(Uri)
    • RemoveDisjointClass(INode)
    • RemoveDisjointClass(OntologyClass)
    • RemoveDisjointClass(OntologyResource)
    • RemoveEquivalentClass(Uri)
    • RemoveEquivalentClass(INode)
    • RemoveEquivalentClass(OntologyClass)
    • RemoveEquivalentClass(OntologyResource)
    • RemoveSubClass(Uri)
    • RemoveSubClass(INode)
    • RemoveSubClass(OntologyClass)
    • RemoveSubClass(OntologyResource)
    • RemoveSuperClass(Uri)
    • RemoveSuperClass(INode)
    • RemoveSuperClass(OntologyClass)
    • RemoveSuperClass(OntologyResource)
  • Extension Methods
Back to top Generated by DocFX