Class Individual
Represents an Individual i.e. an instance of some class in an ontology.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: VDS.RDF.Ontology
Assembly: dotNetRDF.dll
Syntax
public class Individual : OntologyResource
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
Constructors
| Improve this Doc View SourceIndividual(INode, IGraph)
Gets an Individual from the Graph.
Declaration
public Individual(INode resource, IGraph graph)
Parameters
Type | Name | Description |
---|---|---|
INode | resource | Resource that represents the Individual. |
IGraph | graph | Graph the Individual is in. |
Remarks
Requires that an individual (a resource which is the subject of at least one triple where the predicate is rdf:type) is already present in the Graph.
|
Improve this Doc
View Source
Individual(INode, INode, IGraph)
Gets/Creates an Individual from the Graph.
Declaration
public Individual(INode resource, INode resourceClass, IGraph graph)
Parameters
Type | Name | Description |
---|---|---|
INode | resource | Resource that represents the Individual. |
INode | resourceClass | Class to create/add the Individual to. |
IGraph | graph | Graph the Individual is in. |
Remarks
Allows for creating new Individuals in the Graph or adding existing resources to another Class. If the resource for the Individual or the given Class are new then they will be added to the Graph.
Properties
| Improve this Doc View SourceClasses
Gets all the Classes that this resource belongs to.
Declaration
public IEnumerable<OntologyClass> Classes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<OntologyClass> |
Methods
| Improve this Doc View SourceHasClass(Uri)
Gets whether the Individual belongs to a class identified by the given URI.
Declaration
public bool HasClass(Uri class)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | class | Class URI. |
Returns
Type | Description |
---|---|
System.Boolean |
HasClass(INode)
Gets whether the Individual belongs to a class identified by the given resource.
Declaration
public bool HasClass(INode class)
Parameters
Type | Name | Description |
---|---|---|
INode | class | Class. |
Returns
Type | Description |
---|---|
System.Boolean |
HasClass(OntologyClass)
Gets whether the Individual belongs to a specific class.
Declaration
public bool HasClass(OntologyClass class)
Parameters
Type | Name | Description |
---|---|---|
OntologyClass | class | Class. |
Returns
Type | Description |
---|---|
System.Boolean |