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
| Edit this page 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. |
Properties
| Edit this page View SourceDirectSubClasses
Gets the direct sub-classes of this class.
Declaration
public IEnumerable<OntologyClass> DirectSubClasses { get; }
Property Value
Type | Description |
---|---|
IEnumerable<OntologyClass> |
DirectSuperClasses
Gets the direct super-classes of this class.
Declaration
public IEnumerable<OntologyClass> DirectSuperClasses { get; }
Property Value
Type | Description |
---|---|
IEnumerable<OntologyClass> |
DisjointClasses
Gets the disjoint classes of this class.
Declaration
public IEnumerable<OntologyClass> DisjointClasses { get; }
Property Value
Type | Description |
---|---|
IEnumerable<OntologyClass> |
EquivalentClasses
Gets the equivalent classes of this class.
Declaration
public IEnumerable<OntologyClass> EquivalentClasses { get; }
Property Value
Type | Description |
---|---|
IEnumerable<OntologyClass> |
IndirectSubClasses
Gets the indirect sub-classes of this class.
Declaration
public IEnumerable<OntologyClass> IndirectSubClasses { get; }
Property Value
Type | Description |
---|---|
IEnumerable<OntologyClass> |
IndirectSuperClasses
Gets the indirect super-classes of this class.
Declaration
public IEnumerable<OntologyClass> IndirectSuperClasses { get; }
Property Value
Type | Description |
---|---|
IEnumerable<OntologyClass> |
Instances
Gets the instances (individuals) of this class.
Declaration
public IEnumerable<OntologyResource> Instances { get; }
Property Value
Type | Description |
---|---|
IEnumerable<OntologyResource> |
IsBottomClass
Gets whether something is a Bottom Class i.e. has no sub classes.
Declaration
public bool IsBottomClass { get; }
Property Value
Type | Description |
---|---|
bool |
IsDomainOf
Gets the properties which have this class as a domain.
Declaration
public IEnumerable<OntologyProperty> IsDomainOf { get; }
Property Value
Type | Description |
---|---|
IEnumerable<OntologyProperty> |
IsRangeOf
Gets the properties which have this class as a range.
Declaration
public IEnumerable<OntologyProperty> IsRangeOf { get; }
Property Value
Type | Description |
---|---|
IEnumerable<OntologyProperty> |
IsTopClass
Gets whether something is a Top Class i.e. has no super classes.
Declaration
public bool IsTopClass { get; }
Property Value
Type | Description |
---|---|
bool |
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 |
---|---|
IEnumerable<OntologyClass> |
SubClasses
Gets the sub-classes of this class (both direct and indirect).
Declaration
public IEnumerable<OntologyClass> SubClasses { get; }
Property Value
Type | Description |
---|---|
IEnumerable<OntologyClass> |
SuperClasses
Gets the super-classes of this class (both direct and indirect).
Declaration
public IEnumerable<OntologyClass> SuperClasses { get; }
Property Value
Type | Description |
---|---|
IEnumerable<OntologyClass> |
Methods
| Edit this page View SourceAddDisjointClass(Uri)
Adds a new disjoint class for this class.
Declaration
public bool AddDisjointClass(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
Uri | resource | Resource. |
Returns
Type | Description |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
AddEquivalentClass(Uri)
Adds an equivalent class for this class.
Declaration
public bool AddEquivalentClass(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
Uri | resource | Resource. |
Returns
Type | Description |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
AddSubClass(Uri)
Adds a new sub-class for this class.
Declaration
public bool AddSubClass(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
Uri | resource | Resource. |
Returns
Type | Description |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
AddSuperClass(Uri)
Adds a new super-class for this class.
Declaration
public bool AddSuperClass(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
Uri | resource | Resource. |
Returns
Type | Description |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
ClearDisjointClasses()
Removes all disjoint classes for this class.
Declaration
public bool ClearDisjointClasses()
Returns
Type | Description |
---|---|
bool |
ClearEquivalentClasses()
Removes all equivalent classes for this class.
Declaration
public bool ClearEquivalentClasses()
Returns
Type | Description |
---|---|
bool |
ClearSubClasses()
Removes all sub-classes for this class.
Declaration
public bool ClearSubClasses()
Returns
Type | Description |
---|---|
bool |
ClearSuperClasses()
Removes all super-classes.
Declaration
public bool ClearSuperClasses()
Returns
Type | Description |
---|---|
bool |
CreateIndividual(Uri)
Gets/Creates an Individual of this class.
Declaration
public Individual CreateIndividual(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
Uri | resource | Resource identifying the individual. |
Returns
Type | Description |
---|---|
Individual |
Equals(object)
Gets whether this Class is equal to another Class.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | Object to test. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceGetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
| Edit this page View SourceRemoveDisjointClass(Uri)
Removes a disjoint class for this class.
Declaration
public bool RemoveDisjointClass(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
Uri | resource | Resource. |
Returns
Type | Description |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
RemoveEquivalentClass(Uri)
Removes an equivalent class for this class.
Declaration
public bool RemoveEquivalentClass(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
Uri | resource | Resource. |
Returns
Type | Description |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
RemoveSubClass(Uri)
Removes a sub-class for this class.
Declaration
public bool RemoveSubClass(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
Uri | resource | Resource. |
Returns
Type | Description |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
RemoveSuperClass(Uri)
Removes a super-class for this class.
Declaration
public bool RemoveSuperClass(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
Uri | resource | Resource. |
Returns
Type | Description |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |