@prefix : <https://w3id.org/citydata/part1/v1/> .
@prefix cc: <http://creativecommons.org/ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix time: <http://www.w3.org/2006/time#> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@base <https://w3id.org/citydata/part1/v1/> .

<https://w3id.org/citydata/part1/v1/ActivityPattern> rdf:type owl:Ontology ;
                                                      owl:imports prov:Activity ,
                                                                  :ChangePattern ,
                                                                  :SpatialLocPattern ;
                                                      cc:license "http://creativecommons.org/licenses/by/4.0/" ;
                                                      dcterms:alternative "CDM Activity Pattern" ;
                                                      dcterms:creator "Kenneth Vaughn" ,
                                                                      "Mark Fox" ,
                                                                      "Megan Katsumi" ;
                                                      dcterms:modified "2026-02-12"^^xsd:date ;
                                                      dcterms:title "Information technology - City data model - Part 1: Foundation level concepts - Activity Pattern" ;
                                                      vann:preferredNamespacePrefix "cdm1" ;
                                                      vann:preferredNamespaceUri "https://w3id.org/citydata/part1/v1/" ;
                                                      rdfs:comment "The prior version of this ontology used a different ontology IRI. This update remains semantically consistent with the version adopted as ISO 5087-1:2023." ;
                                                      owl:priorVersion <https://standards.iso.org/iso-iec/5087/-1/ed-1/en/ontology/Activity/> ;
                                                      owl:versionIRI <https://w3id.org/citydata/part1/v1/ActivityPattern/r3.0/> ;
                                                      owl:versionInfo "1.3.0" ;
                                                      skos:definition "This ontology specifies the foundation-level concepts related to the activity pattern of the city data model." .

#################################################################
#    Object Properties
#################################################################

###  https://w3id.org/citydata/part1/v1/ActivityObjectProperty
:ActivityObjectProperty rdf:type owl:ObjectProperty ;
                        rdfs:subPropertyOf :FoundationalCdmObjectProperty ;
                        skos:definition "Added for organizational purposes, to identify all activity object properties defined in the City Data Model." .


###  https://w3id.org/citydata/part1/v1/achievedAt
:achievedAt rdf:type owl:ObjectProperty ;
            rdfs:subPropertyOf :ActivityObjectProperty ;
            rdfs:domain :State ;
            rdfs:range time:TemporalEntity ;
            owl:propertyChainAxiom ( [ owl:inverseOf :effectOf
                                     ]
                                     :endOf
                                   ) ,
                                   ( [ owl:inverseOf :hasDecomp
                                     ]
                                     :conjunctiveAchievedAt
                                     time:intervalDuring
                                   ) ,
                                   ( [ owl:inverseOf :preconditionOf
                                     ]
                                     :beginOf
                                   ) ;
            skos:definition "Identifies the time Interval or Instant during which the State was satisfied." .


###  https://w3id.org/citydata/part1/v1/beginOf
:beginOf rdf:type owl:ObjectProperty ;
         rdfs:subPropertyOf :ActivityObjectProperty ;
         rdfs:domain :Activity ;
         rdfs:range time:Instant ;
         owl:propertyChainAxiom ( :occursAt
                                  time:hasBeginning
                                ) ;
         skos:definition "Identifies the time Instant at which the Activity occurs." .


###  https://w3id.org/citydata/part1/v1/causedByActivity
:causedByActivity rdf:type owl:ObjectProperty ;
                  rdfs:subPropertyOf :ActivityObjectProperty ;
                  owl:inverseOf :causesState ;
                  rdfs:domain :State ;
                  rdfs:range :Activity ;
                  skos:definition "Identifies an Activity that in some (indirect) way caused the State to be realized. The causedByActivity property is the inverse of the causes property and is a generalization (super-property) of the effectOf property." .


###  https://w3id.org/citydata/part1/v1/causesState
:causesState rdf:type owl:ObjectProperty ;
             rdfs:subPropertyOf :ActivityObjectProperty ;
             rdfs:domain :Activity ;
             rdfs:range :State ;
             skos:definition "Identifies a State that in some (indirect) way was caused by the occurrence of the Activity. An Activity is caused by a State if the State is an effect of the Activity or if the State is an effect of some subactivity of the Activity. The causes property is a generalization (super-property) of the hasEffect property." .


###  https://w3id.org/citydata/part1/v1/conjunctiveAchievedAt
:conjunctiveAchievedAt rdf:type owl:ObjectProperty ;
                       rdfs:subPropertyOf :achievedAt ;
                       rdfs:domain :ConjunctiveState .


###  https://w3id.org/citydata/part1/v1/disjunctiveAchievedAt
:disjunctiveAchievedAt rdf:type owl:ObjectProperty ;
                       rdfs:subPropertyOf :achievedAt ;
                       rdfs:domain :DisjunctiveState .


###  https://w3id.org/citydata/part1/v1/effectOf
:effectOf rdf:type owl:ObjectProperty ;
          rdfs:subPropertyOf :ActivityObjectProperty ;
          owl:inverseOf :hasEffect ;
          rdfs:domain :State ;
          rdfs:range :Activity ;
          skos:definition "Identifies an Activity that the State was realized by." .


###  https://w3id.org/citydata/part1/v1/enabledByState
:enabledByState rdf:type owl:ObjectProperty ;
                rdfs:subPropertyOf :ActivityObjectProperty ;
                owl:inverseOf :enablesActivity ;
                rdfs:domain :Activity ;
                rdfs:range :State ;
                skos:definition "Identifies a State that in some (indirect) way enabled the Activity to occur. An Activity is enabled by a State if the State is a precondition for the Activity or if the State is a precondition of some subactivity of the Activity. The enabledByState property is a generalization (super-property) of the hasPrecondition property." .


###  https://w3id.org/citydata/part1/v1/enablesActivity
:enablesActivity rdf:type owl:ObjectProperty ;
                 rdfs:subPropertyOf :ActivityObjectProperty ;
                 rdfs:domain :State ;
                 rdfs:range :Activity ;
                 skos:definition "Identifies an Activity that in some (indirect) way was enabled by the State. The enables property is the inverse of the enabledByState property and is a generalization (super-property) of the preconditionOf property." .


###  https://w3id.org/citydata/part1/v1/endOf
:endOf rdf:type owl:ObjectProperty ;
       rdfs:subPropertyOf :ActivityObjectProperty ;
       rdfs:domain :Activity ;
       rdfs:range time:Instant ;
       owl:propertyChainAxiom ( :occursAt
                                time:hasEnd
                              ) ;
       skos:definition "Identifies the time Instant at which the Activity ends." .


###  https://w3id.org/citydata/part1/v1/hasDecomp
:hasDecomp rdf:type owl:ObjectProperty ;
           rdfs:subPropertyOf :hasSubstate ;
           skos:definition "Identifies two or more States into which the State may be immediately decomposed, i.e. its direct children." .


###  https://w3id.org/citydata/part1/v1/hasEffect
:hasEffect rdf:type owl:ObjectProperty ;
           rdfs:subPropertyOf :causesState ;
           skos:definition "Identifies a State that is realized once the Activity has occurred." .


###  https://w3id.org/citydata/part1/v1/hasPrecondition
:hasPrecondition rdf:type owl:ObjectProperty ;
                 rdfs:subPropertyOf :enabledByState ;
                 owl:inverseOf :preconditionOf ;
                 skos:definition "Identifies a State that must be realized in order for the Activity to occur." .


###  https://w3id.org/citydata/part1/v1/hasStatus
:hasStatus rdf:type owl:ObjectProperty ;
           rdfs:subPropertyOf :ActivityObjectProperty ;
           skos:definition "Identifies the status of the parent Thing at some point or interval in time." .


###  https://w3id.org/citydata/part1/v1/hasSubactivity
:hasSubactivity rdf:type owl:ObjectProperty ;
                rdfs:subPropertyOf :ActivityObjectProperty ;
                rdfs:domain :Activity ;
                rdfs:range :Activity ;
                skos:definition "Identifies a more granular Activity into which the Activity may be decomposed." .


###  https://w3id.org/citydata/part1/v1/hasSubstate
:hasSubstate rdf:type owl:ObjectProperty ;
             rdfs:subPropertyOf :ActivityObjectProperty ;
             rdf:type owl:TransitiveProperty ;
             rdfs:domain :NonTerminalState ;
             rdfs:range :State ;
             skos:definition "Identifies a State into which the complex state decomposes, at any level (i.e. its child state, grandchild state, etc.). The hasSubState property is transitive and a super-property of the hasDecomp property." .


###  https://w3id.org/citydata/part1/v1/occursAfter
:occursAfter rdf:type owl:ObjectProperty ;
             rdfs:subPropertyOf :ActivityObjectProperty ;
             owl:inverseOf :occursBefore .


###  https://w3id.org/citydata/part1/v1/occursAt
:occursAt rdf:type owl:ObjectProperty ;
          rdfs:subPropertyOf :ActivityObjectProperty ;
          rdfs:domain :Activity ;
          rdfs:range time:Interval ;
          skos:definition "Identifies a time Interval over which the Activity occurs." .


###  https://w3id.org/citydata/part1/v1/occursBefore
:occursBefore rdf:type owl:ObjectProperty ;
              rdfs:subPropertyOf :ActivityObjectProperty ;
              rdf:type owl:TransitiveProperty ;
              rdfs:domain :Activity ;
              rdfs:range :Activity ;
              rdfs:comment "An activity occursBefore another if its endOf instant is before the beginOf instant of the other activity; the occursBefore relation is transitive. We cannot define this semantics in OWL, though it could be captured in future work by an extension with rules." ;
              skos:definition "Identifies an Activity that the Activity occurred before." .


###  https://w3id.org/citydata/part1/v1/occursDirectlyAfter
:occursDirectlyAfter rdf:type owl:ObjectProperty ;
                     rdfs:subPropertyOf :occursAfter ;
                     owl:inverseOf :occursDirectlyBefore .


###  https://w3id.org/citydata/part1/v1/occursDirectlyBefore
:occursDirectlyBefore rdf:type owl:ObjectProperty ;
                      rdfs:subPropertyOf :occursBefore ;
                      rdfs:domain :Activity ;
                      rdfs:range :Activity ;
                      rdfs:comment "An activity occursDirectlyBefore another if it occursAt an interval that meets the interval of the other activity. We cannot define this semantics in OWL, though it could be captured by an extension with rules." ;
                      skos:definition "Identifies an Activity that occurred immediately prior to the Activity. The occursDirectlyBefore property is a sub-property of the occursBefore property." .


###  https://w3id.org/citydata/part1/v1/preconditionOf
:preconditionOf rdf:type owl:ObjectProperty ;
                rdfs:subPropertyOf :enablesActivity ;
                rdfs:domain :State ;
                rdfs:range :Activity ;
                skos:definition "Identifies an Activity that requires the State to be realized in order to occur." .


###  https://w3id.org/citydata/part1/v1/satisfiedBy
:satisfiedBy rdf:type owl:ObjectProperty ;
             rdfs:subPropertyOf :ActivityObjectProperty ;
             rdfs:domain :ManifestationState ;
             rdfs:range :Manifestation ;
             skos:definition "Specifies the Manifestation that is to be satisfied (i.e., realized)." .


###  https://w3id.org/citydata/part1/v1/scheduledFor
:scheduledFor rdf:type owl:ObjectProperty ;
              rdfs:subPropertyOf :ActivityObjectProperty ;
              rdfs:range time:Interval ;
              skos:definition "Identifies a time Interval during which a Thing occurs." .


###  https://w3id.org/citydata/part1/v1/terminalAchievedAt
:terminalAchievedAt rdf:type owl:ObjectProperty ;
                    rdfs:subPropertyOf :achievedAt ;
                    rdfs:domain :TerminalState .


#################################################################
#    Classes
#################################################################

###  https://w3id.org/citydata/part1/v1/Activity
:Activity rdf:type owl:Class ;
          rdfs:subClassOf prov:Activity ,
                          :ActivityThing ,
                          [ rdf:type owl:Restriction ;
                            owl:onProperty :associatedLocation ;
                            owl:allValuesFrom :Location
                          ] ,
                          [ rdf:type owl:Restriction ;
                            owl:onProperty :causesState ;
                            owl:allValuesFrom :State
                          ] ,
                          [ rdf:type owl:Restriction ;
                            owl:onProperty :enabledByState ;
                            owl:allValuesFrom :State
                          ] ,
                          [ rdf:type owl:Restriction ;
                            owl:onProperty :hasEffect ;
                            owl:allValuesFrom :State
                          ] ,
                          [ rdf:type owl:Restriction ;
                            owl:onProperty :hasPrecondition ;
                            owl:allValuesFrom :State
                          ] ,
                          [ rdf:type owl:Restriction ;
                            owl:onProperty :hasSubactivity ;
                            owl:allValuesFrom :Activity
                          ] ,
                          [ rdf:type owl:Restriction ;
                            owl:onProperty :occursBefore ;
                            owl:allValuesFrom :Activity
                          ] ,
                          [ rdf:type owl:Restriction ;
                            owl:onProperty :occursDirectlyBefore ;
                            owl:allValuesFrom :Activity
                          ] ,
                          [ rdf:type owl:Restriction ;
                            owl:onProperty :beginOf ;
                            owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                            owl:onClass time:Instant
                          ] ,
                          [ rdf:type owl:Restriction ;
                            owl:onProperty :endOf ;
                            owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                            owl:onClass time:Instant
                          ] ,
                          [ rdf:type owl:Restriction ;
                            owl:onProperty :occursAt ;
                            owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                            owl:onClass time:Interval
                          ] ,
                          [ rdf:type owl:Restriction ;
                            owl:onProperty :hasStatus ;
                            owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                            owl:onClass :ActivityStatus
                          ] ,
                          [ rdf:type owl:Restriction ;
                            owl:onProperty :scheduledFor ;
                            owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                            owl:onClass time:Interval
                          ] ;
          skos:definition """An Activity describes something that occurs in the domain.
An Activity may be further defined by (decomposed into) Subactivities.
An Activity may have precondition and/or effect State.
An Activity may be enabled by or cause some State. An enabling of causing state is a generalization of a precondition/effect; an Activity is enabled by or causes some State if it has a subactivity with a precondition or effect (respectively) of that State. 
In other words, the state may not be required directly before, or cause directly after the activity, but by some more specialized sub-activity.
An Activity occurs at some point in time and space.
An Activity takes place during some interval, and so has some duration.
An Activity may have some Manifestations that participate in it.""" .


###  https://w3id.org/citydata/part1/v1/ActivityStatus
:ActivityStatus rdf:type owl:Class ;
                rdfs:subClassOf :ActivityThing ;
                skos:definition "The status of the Activity." .


###  https://w3id.org/citydata/part1/v1/ActivityThing
:ActivityThing rdf:type owl:Class ;
               rdfs:subClassOf :FoundationalCdmThing ;
               skos:definition "Added for organizational purposes, to identify all classes defined in the Activity pattern." .


###  https://w3id.org/citydata/part1/v1/ConjunctiveState
:ConjunctiveState rdf:type owl:Class ;
                  rdfs:subClassOf :NonTerminalState ;
                  owl:disjointWith :DisjunctiveState ;
                  skos:definition "A type of NonTerminalState that is defined by the conjunction of its child States." .


###  https://w3id.org/citydata/part1/v1/DisjunctiveState
:DisjunctiveState rdf:type owl:Class ;
                  rdfs:subClassOf :NonTerminalState ;
                  skos:definition "A type of NonTerminalState that is defined by the disjunction of its child States. A State cannot be both conjunctive and disjunctive. " .


###  https://w3id.org/citydata/part1/v1/ManifestationState
:ManifestationState rdf:type owl:Class ;
                    rdfs:subClassOf :TerminalState ,
                                    [ rdf:type owl:Restriction ;
                                      owl:onProperty :satisfiedBy ;
                                      owl:allValuesFrom :Manifestation
                                    ] ;
                    skos:definition "A specialization of TerminalState, the ManifestationState specifies a Manifestation class that an individual must satisfy in order for the ManifestationState to be true." .


###  https://w3id.org/citydata/part1/v1/NonTerminalState
:NonTerminalState rdf:type owl:Class ;
                  rdfs:subClassOf :State ,
                                  [ rdf:type owl:Restriction ;
                                    owl:onProperty :hasSubstate ;
                                    owl:allValuesFrom :State
                                  ] ,
                                  [ rdf:type owl:Restriction ;
                                    owl:onProperty :hasDecomp ;
                                    owl:minQualifiedCardinality "2"^^xsd:nonNegativeInteger ;
                                    owl:onClass :State
                                  ] ;
                  owl:disjointWith :TerminalState ;
                  rdfs:comment "hasDecomp is not a transitive relation, it only refers to the direct children of a non-terminal state type. A more general relation that is transitive is the substate relation." ;
                  skos:definition "A NonTerminalState has child States (a.k.a., sub-states) that are either conjuctive or disjunctive. Each child may be a TerminalState or NonTerminalState; eventually a TerminalState is reached. A State cannot be both non-terminal and terminal." .


###  https://w3id.org/citydata/part1/v1/State
:State rdf:type owl:Class ;
       rdfs:subClassOf :ActivityThing ,
                       [ rdf:type owl:Restriction ;
                         owl:onProperty :achievedAt ;
                         owl:allValuesFrom time:TemporalEntity
                       ] ,
                       [ rdf:type owl:Restriction ;
                         owl:onProperty :causedByActivity ;
                         owl:allValuesFrom :Activity
                       ] ,
                       [ rdf:type owl:Restriction ;
                         owl:onProperty :effectOf ;
                         owl:allValuesFrom :Activity
                       ] ,
                       [ rdf:type owl:Restriction ;
                         owl:onProperty :enablesActivity ;
                         owl:allValuesFrom :Activity
                       ] ,
                       [ rdf:type owl:Restriction ;
                         owl:onProperty :preconditionOf ;
                         owl:allValuesFrom :Activity
                       ] ,
                       [ rdf:type owl:Restriction ;
                         owl:onProperty :hasStatus ;
                         owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                         owl:onClass :StateStatus
                       ] ,
                       [ rdf:type owl:Restriction ;
                         owl:onProperty :scheduledFor ;
                         owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                         owl:onClass time:Interval
                       ] ;
       skos:definition """A State describes some situation in the world which may or may not be satisfied (true) at a given point in time. A State refers to a class of manifestations. It may be a precondition or effect of some Activity, or more generally it may be enabled or be caused by some Activity. If a state is complex, it may refer to some combination of classes of manifestations.
        Example: A shopping activity, Activity-Shop, can require both the VehicleW30LGas state, but also some state wherein the mall is open, OpenMall. Each state is defined separately. The combined state is then defined as the conjunction of the two states. Thus, we could say that the preconditions for Activity-Shop are: precondition(VehicleW30LGas,Activity-Shop) AND  precondition(OpenMall,Activity-Shop). Alternatively, if the preconditions were required disjunctively, we could state: precondition(VehicleW30LGas,Activity-Shop) OR precondition(OpenMall,Activity-Shop).
        In large and complex domains, there can be cases in which the above approach is undesirable. In particular, due to the complexity of the description that results as the state being described becomes more detailed. In many cases it will be more natural and convenient to be able to refer to a single, aggregate state. We therefore extend the representation of States to capture aggregation, as approached in the concept of state trees introduced by TOVE as a construct for the activity cluster.
        A State may be either non-terminal or terminal. A terminal state has no child states, and therefore refers directly to a class of manifestations, whereas a non-terminal state has child states, which may define some classes of manifestations, or further define some other complex states.
            NonTerminalState(x) v TerminalState(x) = State(x)
        A state  cannot be both non-terminal and terminal.
            TerminalState disjointWith NonTerminalState""" .


###  https://w3id.org/citydata/part1/v1/StateStatus
:StateStatus rdf:type owl:Class ;
             rdfs:subClassOf :ActivityThing .


###  https://w3id.org/citydata/part1/v1/TerminalState
:TerminalState rdf:type owl:Class ;
               rdfs:subClassOf :State ;
               skos:definition "A terminal state type has no substates (cannot be decomposed). It corresponds to a particular class of manifestations. A terminal state is achieved at some time if and only if there exists a manifestation within its defined classification, that exists at that time." .
