Class OntologyClass
Class for representing a class in an Ontology.
Inherited Members
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 SourceOntologyClass(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 SourceDirectSubClasses
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 SourceAddDisjointClass(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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.