Individuals

Named instances that represent specific, known values, like enums in OOP.

An individual is a specific, named instance of a class. Think of them like enum values or constants in OOP. In Java you might write enum Status { OPEN, IN_PROGRESS, COMPLETED }. In RDF, you define a class and then declare specific instances of it.

The examples on this page use the following prefixes:

@prefix vocab:    <https://example.org/vocab/> .
@prefix projects: <https://example.org/projects/> .
@prefix rdfs:     <http://www.w3.org/2000/01/rdf-schema#> .

Named Individuals

First define the class, then create instances:

vocab:Status a rdfs:Class ;
    rdfs:label "status" .

vocab:Open a vocab:Status ;
    rdfs:label "Open" ;
    rdfs:comment "Ready to be worked on." .

vocab:InProgress a vocab:Status ;
    rdfs:label "In Progress" ;
    rdfs:comment "Currently being worked on." .

vocab:Completed a vocab:Status ;
    rdfs:label "Completed" ;
    rdfs:comment "Finished." .

Each individual has a URI, a label, and a description. They exist in the graph as resources that can be referenced, queried, and described.

Using Individuals

Reference them like any other resource:

projects:q3 vocab:status vocab:InProgress .

This says the Q3 project has status "In Progress." Because vocab:InProgress is a resource, you can follow the link and read its label and description. You can also select everything with a specific status:

PREFIX vocab: <https://example.org/vocab/>

SELECT ?project WHERE {
    ?project vocab:status vocab:InProgress .
}

Individuals vs Literals

Compare:

# As a literal (like a raw string)
projects:q3 vocab:status "in-progress" .

# As an individual (like an enum value)
projects:q3 vocab:status vocab:InProgress .

With a literal, you have an opaque string. With an individual, you have something that can be described, labeled, and reasoned about. Individuals also enable precise validation: a constraint can say "status must be one of Open, InProgress, or Completed" by listing the allowed values.

When to Use Each

Use individuals for values from a known, finite set: statuses, priorities, categories, roles. Like enums in OOP, these are values where the set is defined upfront and each value has meaning worth capturing.

Use literals for free-form values: names, descriptions, URLs, quantities, timestamps. Like string or number fields in OOP, these are values where the range is open-ended.

See Also

On this page