It's difficult in OWL (and RDF) to represent sequences, it's more about unordered sets of things. The best way to do this I find is to assign a number via a property, you then keep track of this index and use it to iterate over when needed.
The OWL ontology representing what you want to capture could be like that (using Manchester syntax - you can save as .owl file and open with Protege - #
are comments):
Prefix: xsd: <http://www.w3.org/2001/XMLSchema#>
Prefix: owl: <http://www.w3.org/2002/07/owl#>
Prefix: : <brain#>
Prefix: xml: <http://www.w3.org/XML/1998/namespace>
Prefix: rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
Prefix: dc: <http://purl.org/dc/elements/1.1/>
Prefix: rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Ontology: <brain.owl>
Datatype: xsd:int
ObjectProperty: has
Characteristics:
Transitive
# Property used to save the number in the sequence
DataProperty: episode-number
Range:
xsd:int
# Definition of a program: A program as at least a series
Class: Program
SubClassOf:
has some Series
Class: owl:Thing
# Definition of series: A series as at least one episode
Class: Series
SubClassOf:
has some Episode
Class: Episode
# Instance of episode
Individual: episode1
Types:
Episode
# Episode number
Facts:
episode-number "1"^^xsd:int
# Second instance of episode
Individual: episode2
Types:
Episode
Facts:
episode-number "2"^^xsd:int
Let's say that then you want to iterate over the episode instances. This can be achieved with the OWL query Episode and episode-number value 1
. You have to take care of updating the number yourself.