W3C

DRAFT Road Accident Ontology

Status of this Document

This is a public document. First draft by Daniel Dardailler, to share for W3C geek week 2012 in July.

Editor: Daniel Dardailler, July 21th 2012, Finalized the runtime ontology using OWL2 Manchester syntax.

See OWL content and graph below.

Next steps: finalize the datamodel, enter some individuals and create some queries

Background

I'm interested in designing some structured data logic to represent Road Accident, their parties, location, causes, effects, etc, so that we see more of the UK googlemap layer webapp showing accident-prone crossings, with more semantics available (aka: query for "car brand with the smaller number of serious casualty for rear passenger seats on motorways").

The aim is to create a useful/coherent Road Accident ontology and accompanying resources/tools to describe traffic or road accidents, involving people, vehicle, animal, having cause, effects, etc. with RDF/OWL.

Another goal is first to have fun designing/tuning an ontology, one made of easy-to-grasp concepts, and eventually to facilitate the growth of this particular segment of the web of open data, by providing some ready-to-use tools for people tracking these events (it could be in a crowd sourced db, or a gov maintained one, so we need to work at the lowest common denominator: an interoperable schema and some tools).

I think we are all concerned by road accidents and I don't see a single organization that is going to do this job to accelerate progress in avoiding them (I contacted a couple of them, see below in ref).

Notes: need to look better for existing work, and reuse if possible, but I couldn't find anything really relevant for what I want to achieve, at the higher level that is - what you see being used in googlemap is usually pretty linear data (address, hour, type:car/bike, etc) , and what you found in international organizations is usually detailed leaf ontology (i.e. on type of injuries, vehicles, road, etc, but nothing structuring the whole domain together) and I also think it's better to start designing ontology on a white board, to better understand all the information you want to handle, and be willing to drop it all if you find an pre-existing design or pieces that matches those requirements.


Draft Ontology V2

ra3 owl graph

OWL manchester syntax code V2

# this content loads fine in webprotege and protege, giving this layout



Prefix: xsd: <http://www.w3.org/2001/XMLSchema#>
Prefix: owl: <http://www.w3.org/2002/07/owl#>
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#>
Prefix: : <http://www.w3.org/ontologies/2012/6/ra.owl#>
Prefix: ra: <ra:http://www.w3.org/2012/7/ra3.owl#>

Ontology: <http://www.w3.org/2012/7/ra3.owl>


AnnotationProperty: rdfs:comment

    
Datatype: xsd:positiveInteger

    
Datatype: xsd:anyURI

    
Datatype: xsd:date

    
Datatype: rdf:PlainLiteral

    
Datatype: xsd:boolean

    
Datatype: xsd:string

    
Datatype: xsd:integer

    
ObjectProperty: ra:drives

    SubPropertyOf: 
        ra:isIn
    
    Domain: 
        owl:Thing
    
    Range: 
        ra:Vehicle
    
    
ObjectProperty: isPassengerOf

    SubPropertyOf: 
        ra:isIn
    
    Range: 
        ra:Vehicle
    
    
ObjectProperty: ra:involves

    Annotations: 
        rdfs:comment "involves Person, Vehicle, Animal, NonLivingThing like a stone on the road, another RoadAccident, etc"
    
    Domain: 
        ra:RoadAccident
    
    Range: 
        owl:Thing
    
    
ObjectProperty: ra:carries

    Domain: 
        owl:Thing
    
    Range: 
        owl:Thing
    
    
ObjectProperty: ra:insures

    Domain: 
        ra:InsuranceCompany
    
    Range: 
        owl:Thing
    
    InverseOf: 
        ra:insuredBy
    
    
ObjectProperty: ra:isIn

    Annotations: 
        rdfs:comment "anything can be in anything"@en
    
    EquivalentTo: 
        ra:isOn
    
    Domain: 
        owl:Thing
    
    Range: 
        owl:Thing
    
    
ObjectProperty: ra:location

    Domain: 
        ra:Event
    
    Range: 
        ra:Location
    
    
ObjectProperty: ra:isOn

    EquivalentTo: 
        ra:isIn
    
    Domain: 
        owl:Thing
    
    Range: 
        owl:Thing
    
    
ObjectProperty: ra:drivenBy

    Domain: 
        ra:Vehicle
    
    
ObjectProperty: ra:isOwnedBy

    Annotations: 
        rdfs:comment "a person cannot be owned"
    
    Domain: 
        owl:Thing
    
    Range: 
        ra:Person
    
    
ObjectProperty: ra:deliveredBy

    Domain: 
        ra:OfficialID
    
    Range: 
        ra:Organization
    
    
ObjectProperty: ra:insuredBy

    Domain: 
        owl:Thing
    
    Range: 
        ra:InsuranceCompany
    
    InverseOf: 
        ra:insures
    
    
ObjectProperty: ra:isPartOf

    Domain: 
        owl:Thing
    
    Range: 
        owl:Thing
    
    
ObjectProperty: ra:includes

    Domain: 
        owl:Thing
    
    Range: 
        owl:Thing
    
    
ObjectProperty: ra:delivers

    Domain: 
        owl:Thing
    
    Range: 
        owl:Thing
    
    
ObjectProperty: ra:owns

    Annotations: 
        rdfs:comment "only Person and org owns things, several possible"
    
    Domain: 
        ra:Person
    
    Range: 
        owl:Thing
    
    
ObjectProperty: ra:involvedIn

    Domain: 
        owl:Thing
    
    Range: 
        ra:RoadAccident
    
    
DataProperty: ra:insuranceType

    Annotations: 
        rdfs:comment "name of coverage package in the given insurance"
    
    Domain: 
        owl:Thing
    
    Range: 
        xsd:string
    
    
DataProperty: ra:ageInyears

    Annotations: 
        rdfs:comment "age at event time"
    
    Range: 
        xsd:positiveInteger
    
    
DataProperty: ra:lastName

    Domain: 
        ra:LivingBeing
    
    Range: 
        xsd:string
    
    EquivalentTo: 
        ra:Name
    
    
DataProperty: ra:vehicleCategory

    Domain: 
        ra:Vehicle
    
    Range: 
        {"bicycle" , "bus" , "car" , "motocycle" , "truck"}
    
    
DataProperty: ra:driverLicenceCategory

    Domain: 
        ra:DriverLicence
    
    Range: 
        {"lightvehicle" , "motorcycle" , "truck"}
    
    
DataProperty: ra:positionInVehicle

    Range: 
        {"backseat" , "front passenger" , "truck platform"}
    
    
DataProperty: ra:accidentDetails

    Domain: 
        ra:RoadAccident
    
    Range: 
        xsd:anyURI
    
    
DataProperty: ra:vehicleColor

    Domain: 
        ra:Vehicle
    
    Range: 
        {"darkgrey" , "green" , "lightgrey"}
    
    
DataProperty: ra:orgAddress

    Domain: 
        ra:Organization
    
    Range: 
        xsd:string
    
    
DataProperty: ra:vehicleProblem

    Domain: 
        ra:Vehicle
    
    Range: 
        {"brake" , "deadengine" , "flattire"}
    
    
DataProperty: ra:relatedDamage

    Annotations: 
        rdfs:comment "apply to non living thing, cars, robot, same as injury for person/animal"
    
    Domain: 
        ra:NonLivingThing
    
    Range: 
        xsd:string
    
    
DataProperty: ra:parked

    Domain: 
        ra:Vehicle
    
    Range: 
        xsd:boolean
    
    
DataProperty: ra:birthDate

    Domain: 
        ra:LivingBeing
    
    EquivalentTo: 
        ra:makeDate
    
    
DataProperty: ra:animalRace

    Annotations: 
        rdfs:comment "Person are not Animal in my universe"
    
    Range: 
        {"boar" , "cat" , "deer" , "dog" , "donkey" , "horse"}
    
    
DataProperty: ra:relatedInjuryDesc

    Annotations: 
        rdfs:comment "sms size description of injury"
    
    Domain: 
        ra:LivingBeing
    
    Range: 
        xsd:string
    
    
DataProperty: ra:insuranceID

    Domain: 
        owl:Thing
    
    Range: 
        xsd:string
    
    
DataProperty: ra:Name

    Annotations: 
        rdfs:comment "same as lastName if not present"
    
    Domain: 
        ra:LivingBeing
    
    Range: 
        xsd:string
    
    EquivalentTo: 
        ra:lastName
    
    
DataProperty: ra:isWitness

    Annotations: 
        rdfs:comment "robot and animal cannot be witness or declares something in my universe"
    
    Domain: 
        ra:Person
    
    Range: 
        xsd:boolean
    
    
DataProperty: ra:speedUnit

    Domain: 
        owl:Thing
    
    Range: 
        {"kmh" , "mph"}
    
    
DataProperty: ra:vehicleBrand

    Domain: 
        ra:Vehicle
    
    Range: 
        xsd:string
    
    
DataProperty: ra:email

    Domain: 
        ra:LivingBeing
    
    Range: 
        xsd:string
    
    
DataProperty: ra:orgShortName

    Domain: 
        ra:Organization
    
    Range: 
        xsd:string
    
    
DataProperty: ra:trafficViolation

    Annotations: 
        rdfs:comment "robot, animal, pedestrian included"
    
    Domain: 
        owl:Thing
    
    Range: 
        {"crossingfordidden" , "priority" , "redlight" , "speed" , "stop"}
    
    
DataProperty: ra:driverLicenceNumber

    Domain: 
        ra:DriverLicence
    
    Range: 
        xsd:string
    
    
DataProperty: ra:gps

    Annotations: 
        rdfs:comment "e.g. lat:45.0 long:-6.5"
    
    Domain: 
        ra:Location
    
    Range: 
        xsd:string
    
    
DataProperty: ra:weatherCondition

    Domain: 
        ra:RoadAccident
    
    Range: 
        {"earthquake" , "flood" , "ice" , "mud" , "normal" , "rain" , "smoke" , "snow" , "wind"}
    
    
DataProperty: ra:isRemote

    Domain: 
        owl:Thing
    
    Range: 
        xsd:boolean
    
    
DataProperty: ra:passengerProtection

    Annotations: 
        rdfs:comment "use None to say that the passenger didn't have one"
    
    Range: 
        {"airbag" , "arceau" , "helmet" , "seatbelt"}
    
    
DataProperty: ra:deliveredDate

    Domain: 
        ra:OfficialID
    
    Range: 
        xsd:date
    
    
DataProperty: ra:vehicleID

    Domain: 
        ra:Vehicle
    
    Range: 
        xsd:string
    
    
DataProperty: ra:makeDate

    Annotations: 
        rdfs:comment "creation or delivered date"
    
    Domain: 
        ra:NonLivingThing
    
    Range: 
        xsd:date
    
    EquivalentTo: 
        ra:birthDate
    
    
DataProperty: ra:speed

    Annotations: 
        rdfs:comment "speed in speedunit, default kmh"@en
    
    Domain: 
        owl:Thing
    
    Range: 
        xsd:integer
    
    
DataProperty: ra:isSerious

    Domain: 
        ra:RoadAccident
    
    Range: 
        xsd:boolean
    
    
DataProperty: ra:relatedInjury

    Annotations: 
        rdfs:comment "use some kind of existing classification"
    
    Domain: 
        ra:LivingBeing
    
    Range: 
        {"fatal" , "light" , "none" , "severe"}
    
    
DataProperty: ra:declares

    Domain: 
        ra:Person
    
    Range: 
        xsd:string
    
    
DataProperty: ra:driverProblem

    Range: 
        {"asleep" , "heartattack" , "lostcontrol" , "mistake" , "notlooking" , "onthephone"}
    
    
DataProperty: ra:orgFullName

    Domain: 
        ra:Organization
    
    Range: 
        xsd:string
    
    
DataProperty: ra:isOnRoadType

    Annotations: 
        rdfs:comment "roadType of Road the accident happens on"
    
    Domain: 
        ra:RoadAccident
    
    Range: 
        {"freeway" , "motorway" , "street"}
    
    
DataProperty: ra:SSN

    Annotations: 
        rdfs:comment "every living being can have a social security number, a person HAS one"
    
    Domain: 
        ra:LivingBeing
    
    Range: 
        xsd:string
    
    
DataProperty: ra:address

    Domain: 
        ra:Location
    
    Range: 
        xsd:string
    
    
DataProperty: ra:firstName

    Domain: 
        ra:LivingBeing
    
    Range: 
        xsd:string
    
    
DataProperty: ra:lightCondition

    Domain: 
        ra:RoadAccident
    
    Range: 
        {"darkness" , "daylight" , "inbetween" , "unknown"}
    
    
DataProperty: ra:date

    Domain: 
        ra:Event
    
    Range: 
        xsd:date
    
    
DataProperty: ra:validityDate

    Domain: 
        ra:OfficialID
    
    Range: 
        xsd:date
    
    
DataProperty: ra:isInService

    Annotations: 
        rdfs:comment "someone working at the time of the even. dog can work by themselves"
    
    Domain: 
        ra:LivingBeing
    
    Range: 
        xsd:boolean
    
    
Class: owl:Thing

    
Class: ra:Infant

    SubClassOf: 
        ra:Child
    
    
Class: ra:LivingBeing

    DisjointWith: 
        ra:NonLivingThing
    
    
Class: ra:Teenager

    SubClassOf: 
        ra:Child
    
    
Class: ra:Event

    SubClassOf: 
        ra:NonLivingThing
    
    
Class: ra:Child

    SubClassOf: 
        ra:Person
    
    
Class: ra:RoadAccident

    SubClassOf: 
        ra:Event
    
    
Class: ra:DriverLicence

    SubClassOf: 
        ra:OfficialID
    
    HasKey: 
        ra:driverLicenceNumber
    
    
Class: ra:Location

    SubClassOf: 
        ra:NonLivingThing
    
    
Class: ra:Senior

    SubClassOf: 
        ra:Adult
    
    
Class: ra:InsuranceCert

    SubClassOf: 
        ra:OfficialID
    
    
Class: ra:Woman

    SubClassOf: 
        ra:Person
    
    DisjointWith: 
        ra:Man
    
    
Class: ra:OfficialAgency

    SubClassOf: 
        ra:Organization
    
    
Class: ra:Robot

    SubClassOf: 
        ra:NonLivingThing
    
    
Class: ra:Organization

    SubClassOf: 
        ra:NonLivingThing
    
    
Class: ra:Document

    SubClassOf: 
        ra:NonLivingThing
    
    
Class: ra:Person

    SubClassOf: 
        ra:LivingBeing
    
    DisjointWith: 
        ra:Animal
    
    
Class: ra:InsuranceCompany

    SubClassOf: 
        ra:OfficialAgency
    
    HasKey: 
        ra:orgShortName
    
    
Class: ra:Man

    SubClassOf: 
        ra:Person
    
    DisjointWith: 
        ra:Woman
    
    
Class: ra:Animal

    SubClassOf: 
        ra:LivingBeing
    
    DisjointWith: 
        ra:Person
    
    
Class: ra:Vehicle

    SubClassOf: 
        ra:NonLivingThing
    
    HasKey: 
        ra:vehicleID
    
    
Class: ra:NonLivingThing

    Annotations: 
        rdfs:comment "Top class for non living thing like vehicle, robot, etc"
    
    DisjointWith: 
        ra:LivingBeing
    
    
Class: ra:OfficialID

    SubClassOf: 
        ra:Document
    
    
Class: ra:Adult

    SubClassOf: 
        ra:Person
    
    
Individual: TrashCan

    Types: 
        ra:NonLivingThing
    
    
Individual: VETSUP

    Types: 
        ra:InsuranceCompany
    
    Facts:  
     ra:insures  Nala
    
    
Individual: Carpentras

    Types: 
        ra:Location
    
    
Individual: Nala

    Types: 
        ra:Animal
    
    Facts:  
     ra:involvedIn  RA170560,
     ra:isOn  Alice,
     ra:insuredBy  VETSUP,
     ra:isOwnedBy  DanielD,
     ra:passengerProtection  "none",
     ra:relatedInjuryDesc  "broken nail and vomit on fur",
     ra:insuranceID  "mieaou007",
     ra:ageInyears  "17",
     ra:relatedInjury  "light",
     ra:positionInVehicle  "backseat",
     ra:animalRace  "maine coon female cat",
     ra:Name  "Nala"
    
    
Individual: RA170560

    Types: 
        ra:RoadAccident
    
    Facts:  
     ra:location  Carpentras,
     ra:involves  Laurie,
     ra:involves  Yaya,
     ra:involves  GreenPunto,
     ra:involves  Nala,
     ra:involves  Alice,
     ra:involves  DanielD,
     ra:date  "17/05/1960",
     ra:isOnRoadType  "motorway",
     ra:address  "11 rue du temple",
     ra:weatherCondition  "rain",
     ra:gps  "lat 43 long 6",
     ra:accidentDetails  "http://dardailler.net",
     ra:lightCondition  "night",
     ra:isSerious  "false"
    
    
Individual: Yaya

    Types: 
        ra:Vehicle
    
    Facts:  
     ra:insuredBy  MAIF,
     ra:isOwnedBy  DanielD,
     ra:parked  "yes",
     ra:vehicleColor  "lightgrey",
     ra:speed  "0",
     ra:relatedDamage  "back door left side bumped",
     ra:vehicleBrand  "Toyota",
     ra:vehicleCategory  "car",
     ra:vehicleID  "765 DD 12"
    
    
Individual: GreenPunto

    Types: 
        ra:Vehicle
    
    Facts:  
     ra:involvedIn  RA170560,
     ra:insuredBy  MAIF,
     ra:carries  Alice,
     ra:carries  Laurie,
     ra:isOwnedBy  DanielD,
     ra:drivenBy  Laurie,
     ra:speedUnit  "kmh",
     ra:speed  "-20",
     ra:vehicleColor  "green metal",
     ra:isOnRoadType  "street one way",
     ra:parked  "false",
     ra:relatedDamage  "back paint gone on right side",
     ra:vehicleBrand  "Fiat",
     ra:vehicleProblem  "rear mirro broken",
     ra:vehicleID  "876 GH 71",
     ra:vehicleCategory  "car"
    
    
Individual: DanielD

    Types: 
        ra:Man
    
    Facts:  
     ra:insuredBy  MAIF,
     ra:owns  Nala,
     ra:owns  GreenPunto,
     ra:owns  Yaya,
     ra:insuranceID  "2326779P"@fr,
     ra:email  "danield@w3.org"@fr,
     ra:declares  "Laurie can't see a thing"@fr,
     ra:isWitness  "true"@fr,
     ra:insuranceType  "full full full"@en,
     ra:firstName  "Daniel",
     ra:SSN  "160031294"@fr,
     ra:isRemote  "yes"@fr
    
    
Individual: Alice

    Types: 
        ra:Teenager,
        ra:Woman
    
    Facts:  
     isPassengerOf  GreenPunto,
     ra:involvedIn  RA170560,
     ra:carries  Nala,
     ra:relatedInjury  "none",
     ra:isWitness  "yes",
     ra:firstName  "Alice",
     ra:positionInVehicle  "backseat",
     ra:declares  "Laurie! stop !! Ya la voiture de Papa derrière !"@fr,
     ra:passengerProtection  "none"
    
    
Individual: MAIF

    Types: 
        ra:InsuranceCompany
    
    Facts:  
     ra:insures  Laurie,
     ra:insures  DanielD,
     ra:orgAddress  "Le Cannet"
    
    
Individual: Laurie

    Types: 
        ra:Woman
    
    Facts:  
     ra:insuredBy  MAIF,
     ra:involvedIn  RA170560,
     ra:drives  GreenPunto,
     ra:declares  "the read mirror was broken !",
     ra:insuranceID  "2326779P",
     ra:trafficViolation  "wrongway",
     ra:driverProblem  "not looking back",
     ra:SSN  "28806031",
     ra:passengerProtection  "seatbelt",
     ra:firstName  "Laurie"
    
    


Draft Ontology V1

OBSOLETE: written by hand, doesn't parse

## Manchester syntax for OWL2
# issues: - is there a general line comment character, like #, for this sort of files/syntax ?            
#         - should the file extention be .owl or .omn (used by something else)
#         - I need to understand better the literal/class/range/equiv stuff to declare enum vs subclass
#         - also how to model stable instance value vs. current value

Prefix: : <http://example.org/owl/roadaccident#>
Prefix: geo: <http://example.org/otherOntologies/Geographic#>
Prefix: ext: <http://example.org/otherOntologies/External#>

Ontology: <http://example.org/owl/roadaccident>
Annotations: creator DanielD 
Annotations: creationDate "18 July 2012"

Annotations: mainClass RoadAccident
import: UsefulThings # isOn, isMoving, speed, etc
import: NonLivingThing # event, org, document, insurance, etc
import: LivingBeing # person, woman, declares, animal, etc
import: DrugCondition, healthcondition
import: Road, lane, roadtype
import: Vehicle # driver, passenger, licence, etc


Class: RoadAccident
  SubClassOf: Event  
  Annotations:  rdfs:comment "come as an Event with date/location/shortdesc"

ObjectProperty: accidentDetails
  Domain:        RoadAccident
  Range:         ext:Container  
  Annotations:  rdfs:comment "for img, video, recording, scan of police report"

DataProperty: lightCondition
  Domain: RoadAccident
  Range: { daylight, darkness, inbetween, unknown }

DataProperty: weatherCondition
  Domain: RoadAccident
  Range: { wind,rain,snow,ice,mud,flood,earthquake,smoke,normal }

DataProperty: isOnRoadType
  Domain: RoadAccident
  Range: roadType
  Annotations:  rdfs:comment "roadType of Road the accident happens on"

DataProperty: isSerious
  Domain: RoadAccident 
  Range: xsd:bool and involves some Person some injury ("fatal" or "severe")

ObjectProperty: involves
  Domain: RoadAccident
  Range: Thing  
  Annotations:  rdfs:comment "involves Person, Vehicle, Animal, NonLivingThing like a stone on the road, another RoadAccident, etc"


# not on roadaccident but depends on it

DataProperty: involvedIn
  Domain: Thing
  Range: RoadAccident

DataProperty:  relatedDamage   
  Domain: NonLivingThing x and RoadAccident involves x
  Range: xsd:string
  Annotations:  rdfs:comment "apply to non living thing, cars, robot, same as injury for person/animal"

DataProperty:  relatedInjury
  Domain: LivingBeing and involvedIn some RoadAccident
  Range: { fatal, severe, light, none }
  Annotations:  rdfs:comment "use some kind of existing classification"

DataProperty:  relatedInjuryDesc  
  Domain: LivingBeing
  Range: xsd:string
  Annotations:  rdfs:comment "sms size description of injury"

# Health, DrugCondition stuff 
# independent of road accident
# import basic living/nonliving thing

Class: HealthCondition
  SubclassOf: NonLivingThing
  Annotations:  rdfs:comment "could be a subclass of finer grain class such as condition, state, etc"
  Annotations:  rdfs:comment "use None for no health issue"

DataProperty: healthIssue
  Domain: LivingBeing
  Range:  { heartattack, fainted, seasick, trembling, nohand, noleg, veryold }
  
Class: DrugCondition
  SubclassOf: HealthCondition

DataProperty: drugType
  Domain: DrugCondition
  Range: { alcool, med, coke, cannabis, hero, lsd, etc }

DataProperty: drugLevel
  Domain: DrugCondition
  Range: xsd:integer

DataProperty: drugLevelUnit
  Domain: DrugCondition
  Range: { mgPerBloodLiter, percentUnit, etc }

# not on Drugcondition but depends on it

ObjectProperty: hasDrugCondition
  Domain: LivingBeing
  Range: DrugCondition
  Annotations:  rdfs:comment "use None for checked sober, or create an individual DrugCondition"

# definitions for road system related classes
# import basic living/nonliving, could live with just Thing


Class: Road
  SubclassOf: NonLivingThing
  DisjointUnionOf: PavedRoad and UnpavedRoad

Class: Sidewalk
  SubclassOf: NonLivingThing

Class: PavedRoad
  SubclassOf: Road

Class: UnpavedRoad
  SubclassOf: Road

Class: RoadNetwork
  EquivalentTo: all Road

Class: RoadSystem
  EquivalentTo: RoadNetwork and all Sidewalk
  
DisjointClasses: PavedRoad, UnpavedRoad, Sidewalk

Class: Lane
  SubclassOf: NonLivingThing
  Range: isPartOf Road

DataProperty: laneNumber
  Domain: Lane
  Range:  xsd:strictlyPositiveInteger
  Annotations:  rdfs:comment "starting with 1, numbered right to left by default"

DataProperty: laneType
  Domain: Lane
  Range:  { buslane, cyclelane, tramlane, parkinglane, etc }

DataProperty: roadType
  Domain: Road and geo:Location
# not sure this work: a road type per road by default but several road type per location for a given road ?
  Range: { motorway, highway, dirtroad, street, etc }
  Annotations:  rdfs:comment "vocab from http://www.internationaltransportforum.org/Pub/pdf/09GloStat.pdf"

# the vehicle class and its properties should be external, and be reusable by the car retail industry for instance, the car maker, etc.
# import UsefulThings, NonLivingThing, Road
# define vehicle, driver, passenger, etc


Class: Vehicle
  SubClassOf: NonLivingThing
  HasKey: vehicleID

DataProperty: vehicleCategory
   Range: { car, bus, truck, bicycle, motocycle, moped, trailer, unknown, policeunit, firetruck, ambulance, etc }
   Domain: Vehicle

# more Vehicle DataProperty: vehicleColor vehicleBrand vehicleKind, vehicleEnergy, vehiclePlateId, vehicleId, vehiclePassengerCapacity, vehicleLoad, etc.

DataProperty: vehicleProblem 
   Domain: Vehicle
   Range: { tire, deadengine, brake, shock, windshield, engine, etc }


# traffic/road/vehicle oriented role


Class: Driver
  SubclassOf: Thing 
  EquivalentTo: drives Vehicle
  Annotations:  rdfs:comment "have to include robot, animal.. and remote control"

Class: IllegalDriver
  SubclassOf: Driver and hasDriverLicence is None

Class: CommercialDriver
  SubclassOf: Driver
  Equivalent: drives and isInService

ObjectProperty: drivenBy
  Domain:        Vehicle 
  Range:         Driver  
  Annotations:  rdfs:comment "use None for no driver situation"

ObjectProperty: drives
  Domain:        Thing isIn some Vehicle or isRemote
  Range:         Vehicle 

DataProperty: driverProblem: 
   Domain: Driver
   Range: { lostcontrol, notlooking, mistake, phone, sleep, heartattack, etc}


DataProperty: parked
 Domain: Vehicle
 EquivalentTo: not isMoving and isOn some Lane.laneType "parkinglane"
# not sure this work

Class: Pedestrian
  SubclassOf: Thing  
  EquivalentTo: not isIn Thing  and (isOn Road or isOn Sidewalk)
  Annotations:  rdfs:comment "robot can be pedestrian, that is, walk on the sidewalk"

Class: Passenger
  SubclassOf: Thing 
  EquivalentTo: isIn some Vehicle and not isInService 
  Annotations:  rdfs:comment "a regular driver, unpaid, is a passenger; bus staff isn't for instance -- see PDF irtad"

DataProperty: positionInVehicle
  Domain: Passenger
  Range: { backseat, front passenger, truck platform, etc }


DataProperty: passengerProtection
   Domain: Passenger
   Range: { seatbelt, helmet, arceau, airbag, etc } 
   Annotations:  rdfs:comment "use None to say that the passenger didn't have one"


# should also be external, in some gov ont
# needs person, organization/document, nonliving

Class: DriverLicence
  SubclassOf: OfficialDocument
  HasKey: number
  
DataProperty: number
  Domain: DriverLicence
  Range: xsd:string

DataProperty: deliveredDate
  Domain: DriverLicence
  EquivalentTo: makeDate  

DataProperty: validityDate
  Domain: DriverLicence
  Range: xsd:date

DataProperty: category
  Domain: DriverLicence
  Range: "LightVehicle" or "Truck" or "MotorCycle"

DataProperty: deliveredBy
  Domain: DriverLicence
  Range: OfficialAgengy

# depende on DriverLicence

ObjectProperty: hasDriverLicence  
  Domain: Person and not Infant
  Range: DriverLicence   
  Annotations:  rdfs:comment "use None to note that a person doesn't have a driver licence whereas they should"

DataProperty: hasDriverLicenceNumber
  Domain: Person
  Range: number
  Annotations:  rdfs:comment "shortcut to save creating a driverlicence if only the number is needed as key"
# which number type is that ?


# not specific to accident but to driving

DataProperty: trafficViolation
  Domain: Thing isIn RoadSystem
  Range: { redlight, stop, speed, priority, crossingfordidden, etc }   
  Annotations:  rdfs:comment "robot, animal, pedestrian included"

    

# generic stuff below, not involving RoadAccident or Vehicle, etc
# defines nonLivingThing, event, org, etc


Class NonLivingThing
  SubclassOf: Thing

DataProperty: makeDate  
   Domain: NonLivingThing
   Range:  xsd:date

Class: Robot
  SubclassOf: NonLivingThing

# event

Class: Event
  SubclassOf: NonLivingThing

DataProperty: date
  Domain: Event
  Range:  xsd:date
  Annotations:  rdfs:comment "includes time and day"

ObjectProperty: location
  Domain: Event
  Range:  geo:Location  
  Annotations:  rdfs:comment "an external geo object with several attributes: lat/long, address, nearby, etc"

DataProperty: shortDescription
  Domain: Event
  Range:  xsd:string  
  Annotations:  rdfs:comment "sms size limit: what happen there and then"


#  org /insurance info

Class: Organization
  SubclassOf: NonLivingThing
  
DataProperty: orgShortName
  Domain: Organization
  Range: xsd:string

DataProperty: orgFullName
  Domain: Organization
  Range: xsd:string

DataProperty: orgAddress
  Domain: Organization
  Range: xsd:string

Class: InsuranceCompany
  SubclassOf: OfficialAgency
  EquivalentTo: delivers InsuranceCert
  HasKey: orgShortName
  
ObjectProperty: insuredBy
  Domain: Thing
  Range: InsuranceCompany
  InverseOf: insures

ObjectProperty: insures
  Domain: InsuranceCompany
  Range: Thing 
  InverseOf: insuredBy

DataProperty: insuranceID 
  Domain: Thing
  Range: xsd:string

DataProperty: insuranceType
  Domain: Thing
  Range: xsd:string
  Annotations:  rdfs:comment "name of coverage package in the given insurance"



Class: Document
  SubclassOf: NonLivingThing

Class: OfficalDocument
  SubclassOf: Document

Class: OfficialAgency
  SubclassOf: Organization
  EquivalentTo: delivers OfficialDocument

Class: InsuranceCert
  SubclassOf: OfficialDocument
  EquivalentTo: includes InsuranceID

DataProperty: delivers
  Domain: Organization
  Range: Document

# Person, animal, man, etc
# defines LivingBeing

Class LivingBeing
  SubclassOf: Thing

DataProperty: SSN
  Domain: LivingBeing
  Range: xsd:string
  Annotations:  rdfs:comment "every living being can have a social security number, a person HAS one"
DataProperty: firstName
  Domain: LivingBeing
  Range: xsd:string
DataProperty: lastName
  Domain: LivingBeing
  Range: xsd:string  
DataProperty: Name
  Domain: LivingBeing
  Range: xsd:string  
  EquivalentTo: lastName
  Annotations:  rdfs:comment "same as lastName if not present"
DataProperty: birthDate  
   Domain: LivingBeing
   EquivalentTo: makeDate
DataProperty: email
  Domain: LivingBeing
  Range: xsd:email

Class: Person
  Annotations:  rdfs:comment "Represents the set of all people/human with a SSN."
  SubclassOf : LivingBeing
  HasKey: SSN

DataProperty: declares
  Domain: Person
  Range: xsd:string
DataProperty: isWitness
  Domain: Person
  Range: xsd:bool
  Annotations:  rdfs:comment "robot and animal cannot be witness or declares something in my universe"

DataProperty: isInService
  Domain: LivingBeing
  Range: xsd:bool  
  Annotations:  rdfs:comment "someone working at the time of the even. dog can work by themselves"

Class: Woman
  SubClassOf: Person
Class: Man
  SubClassOf: Person

Class: Child
  SubclassOf: Person 
  SubClassOf: ageInYears some integer[<= 19] 
Class: Infant 
  SubclassOf: Child and ageInYears some integer[<= 2] 
Class: Teenager 
  SubclassOf: Child 
  SubClassOf: ageInYears some integer[>12] 
Class: Adult 
  SubclassOf: Person 
  SubClassOf: ageInYears some integer[>= 20]  
Class: Senior
  SubclassOf: Adult
  SubClassOf: ageInYears some integer[>= 60]  

Class: Animal
  SubclassOf : LivingBeing
DataProperty:  animalRace 
  Range: { dog, cat, horse, donkey, deer, boar, etc }
  Annotations:  rdfs:comment "Person are not Animal in my universe"

ObjectProperty: isOwnedBy 
  Domain:        Thing and not Person
  Range:         Person or Organization
  Annotations:  rdfs:comment "a person cannot be owned"

ObjectProperty: owns
  Domain: Person or Organization
  Range: Thing and not Person
  Annotations:  rdfs:comment "only Person and org owns things, several possible"



DisjointClasses: LivingBeing, NonLivingThing
DisjointClasses: Person, Animal
DisjointClasses: Woman, Man
DisjointClasses: Infant, Child, Teenager, Adult

# UsefulThings: ontology of generic verbs on pure things

ObjectProperty: isIn, isOn, isPartOf
  Domain:        Thing
  Range:         Thing 

ObjectProperty: ageInYears
  Domain:        Thing
  Range:         xsd:positiviteInteger 
  Annotations:  rdfs:comment "age at the date of an event" 

DataProperty: speed
   Domain: Thing
   Range:  xsd:integer
   Annotations:  rdfs:comment "use negative for backward direction -- default to kmh"
   Annotations:  rdfs:comment "speed at the time of an event"

DataProperty: speedUnit
  Domain: Thing
  Ranget: { mph, kmh, ms, etc}

DataProperty: isMovingBackward 
  SubclassOf: speed some integer[< 0]  
  Annotations:  rdfs:comment "given a normal/forward direction for move is present"

DataProperty: isMoving
  SubclassOf: xsd:bool
  Range: speed some integer[!= 0]  
  Annotations:  rdfs:comment "speed = 0 means isMoving is false"

ObjectProperty: riddenBy
  Domain:        Thing
  Range:         Thing  

ObjectProperty: rides
  Domain:        isIn or isOn some Thing
  Range:         Thing 

ObjectProperty: carriedBy
  EquivalentTo: riddenBy
ObjectProperty: carries
  EquivalentTo: rides

ObjectProperty: includes
  Domain: Thing
  Range: Thing

DataProperty: isRemote
  Domaine: Thing
  Range: xsd:bool  Annotations:  rdfs:comment "something is qualified of remote only if it's involved without being local"

# examples of instances

Individual RA170560 
 Types: RoadAccident
 Facts: shortDescription "Laurie hit the yaris on the left side while she was going backward the punto with Alice and Nala in it; destroyed her trashcan while backing"
 Facts: involves Danield
 Facts: involves YayaDiesel
 Facts: involves Laurie
 Facts: involves GreenPunto
 Facts: involves Alice
 Facts: involves Nala
 Facts: involves TrashCan
 Facts: date "Tue, 17 Jul 2012 15:51:33 +0000"
 Facts: lightCondition "daylight"
 Facts: weatherCondition "normal"
 Facts: isOn some PavedRoad
 Facts: isOnRoadType "street"
 Facts: location LOC_InFrontOfAppartLaurie
 Facts: accidentDetails RA_170570Details
 Facts: isSerious False

Individual LOC_InFrontOfLaurieAppart
 Types: geo:Location
 Facts: geo:address "11 Rue Grimaldi, 06130, Grasse, France"
 Facts: geo:lat="51.47026" and geo:long="-2.59466"
 
Individual RA_170570Details
 Types: ext:Container
 Facts: ext:ContainerURL "http://.."

Individual DanielD 
 Types: Man
 Types: Owner
 Facts: firstName Daniel
 Facts: lastName Dardailler
 Facts: owns YayaDiesel
 Facts: owns GreenPunto
 Facts: owns Nala
 Facts: ssn "1600584"
 Facts: email "danield@w3.org"
 Facts: insuranceID "2326779P"
 Facts: isInsuredBy MAIF
  Types: Pedestrian
  Facts: isRemote and isOn Sidewalk
  Facts: ageInYears "52"
  Facts: involvedIn RA170560
  Facts: declares "You'll hear your Mom!"

Individual MAIF
 Types: InsuranceCompany
 Facts: orgShortName "MAIF"
 Facts: orgAddress "17 Avene Jean Jaurès, 06299 Cagnes-sur-Mer"
 Facts: insures YayaDiesel
 Facts: insures GreenPunto
 Facts: insures DanielD
 Facts: insures Laurie
# insures all ? in this context only insures all in RA17..

Individual VETSUP
 Types: InsuranceCompany
 Facts: orgShortName "VetSup"
 Facts: orgAddress "13333 Salon de Provence"
 Facts: insures Nala


Individual Laurie
 Types: Woman
 Facts: insuredBy MAIF
 Facts: insuranceID "2326779P"
 Facts: SSN "2880000"
 Facts: firstName "Laurie"
 Facts: lastName "Dardailler"
 Facts: hasDriverLicenceNumber "ab098098"
  Types: Driver
  Facts: Drives GreenPunto
  Facts: trafficViolation "wrongway"
  Facts: driverProblem "notlooking"
  Facts: hasDrugCondition None
  Facts: passengerProtection "seatbelt"
  Facts: involvedIn RA170560 


Individual Alice
 Types: Teenager
 Types: Woman
 Facts: SSN "2910000"
 Facts: firstName "Alice"
 Facts: lastName "Dardailler"
  Types: Passenger
  Facts: isIn GreenPunto
  Facts: relatedInjury "none"
  Facts: positionInVehicle "backseat"  
  Facts: passengerProtection None
  Facts: involvedIn RA170560 


Individual YayaDiesel
 Types: Vehicle
 Facts: vehiclePlateID "170 DD 52"
 Facts: vehicleCategory "car"
 Facts: vehicleBrand "Toyota"
 Facts: vehicleKind "Yaris"
 Facts: isOwnedBy DanielD
 Facts: vehicleColor "lightgrey"
 Facts: insuredBy MAIF
 Facts: insuranceID "2326779P"
# should the following be in a separate object, since it relates to one accident and not to the car itself ?
  Facts: parked true
  Facts: carries None
  Facts: drivenBy None
  Facts: speed 0
  Facts: relatedDamage "left back door bumped and crushed"
  Facts: involvedIn RA170560 

 
Individual GreenPunto
 Types: Vehicle
 Facts: vehicleCarID "fiat666777"
 Facts: vehicleCategory "car"
 Facts: vehicleBrand "Fiat"
 Facts: vehicleKind "Punto"
 Facts: vehicleColor "applegreen"
 Facts: insuredBy MAIF
 Facts: insuranceID "2326779P"
 Facts: isOwnedBy DanielD
 Facts: vehicleProblem "rearmirrorbroken"
#  should the following be in a separate object, since it relates to one accident and not to the car itself ?
  Facts: isMovingBackward True
  Facts: carries Laurie and Alice and Nala
  Facts: drivenBy Laurie  // so Laurie isInVehicle too
  Facts: speed -20  
  Facts: speedUnit "kmh"
  Facts: relatedDamage "right bumper scratched"
  Facts: involvedIn RA170560 

   
Individual Nala
 Types: Animal
 Facts: animalRace "cat"
 Facts: Name "Nala"
 Facts: birthDate "17 June 1995" 
 Facts: insuredBy VETSUP
 Facts: isOwnedBy DanielD
# specific to the accident
  Types: Passenger
  Facts: isIn GreenPunto
  Facts: relatedInjury "light"
  Facts: relatedInjuryDesc "Nala broke a nail and vomitted on her fur"
  Facts: ageInYears "17"
  Facts: healthCondition "veryold"
  Facts: isOn Alice
  Facts: involvedIn RA170560 


Individual TrashCan
 Types: NonLivingThing
 Facts: isOwnedBy Laurie
  Facts: isMoving False
  Facts: isOn Road and isAt LO_InFrontofLaurieAppart
  Facts: relatedDamage "destroyed"
  Facts: makeDate "1/1/2000"

Original design

RoadAccident 
  // main Class being created, a traffic or road accident, involving people, vehicle, animal, having causes, effects, etc
  // there is a precise definition for each country, see the PDF below from international transport form=

 "has" GeoLocation      // external ontology: gps, address, nearby, etc
 "has" Date/time        // external type)
 "has" ShortDescription // string
 "has" LongDescription  // external : container for text + mediafile (img, video, etc)
 "has" CauseContext (1-N) + %  
                      // used to record all sort of context, not just the primary cause, use 0% to denote informational context
                      // I'd like a kind of switch type: causecontext is any of the following things, and there can be many context/cause, each associated with a % weight

   TrafficViolation + Person // enum: redlight, stop, priority, speed, etc.
   VehicleDamage + Vehicle // enum: tire, deadengine, brake, shock, windshield, engine, etc
   DriverPb: + Person // enum: lostcontrol, testing, mistake, phone, sleep, heartattack, etc
   ThingPb // e.g. a big rock on the road
   RoadAccident // another accident as cause of this one  
   TypeofRoad // See below for an international classification 
   LightCondition // enum: daylight/darkness/inbetween/unknown
   WeatherCondition // enum: wind,rain/snow/ice/mud/flood/earthquake/smoke/etc
                    // Note that timing + location could in theory give light and condition but it seems better to record data at the source, so adding some redundance is good

 "involves" Person(0-N) // external Person: lastname, firstname, gender, age, address, nationalid, haircolor, height, weight, etc.

    Person "has" ext:Insurance (name, address, id)
    Person "has" ext:DriverLicence (number, date, validity, bywhom, category)
    Person "has" ext:TrafficRole: pedestrian, jogger, wheelchair, sitting // note that driver and passenger roles are covered by "drives" and
"isIn"
    Person "drives" Vehicle, Thing (e.g. plane), Animal (horse)
    Person "declares" LongDescription // witness
    Person "owns": Vehicle(0-N), Animal(0-N), Thing(0-N)
    Person "isAtFault" Percent% // this could be reified by another person with a different opinion. can anything be ?
    Person "has" ext:BodyInjury (death, severe, light, desc, etc)
    Person "has" seatBelt, helmet, etc
    Person "hasPosition" e.g. backseat, front passenger, truck platform, etc
    Person "hasCondition" enum: sober, alcohol, etc. with %level

    RESTRICTED: lastname, address, nationalid, insuranceInfo (id), owns(out)

// for privacy reasons, we need to restrict public access to some values, which should only be accessible to parties involved, how does one describe that while still reusing an existing external ontology ?

// it's also important to restrict access to what the Person owns in this road accident, and not give access to other properties not involved here (but available in the external person dataset being accessed)

// there is also the case of restricting access for privacy to data which would lead to identification of the person through "joint" queries: e.g. "there is only one male 60yo leaving on this st and the accident happened "on the way home", etc.


  "involves" Vehicle(0-N) // external Vehicle: type:car, bus, truck, bicycle, motocycle, unknown, etc., color, brand, age, plateid, carid, etc.)

// plateid can give color/brand/age, but I find it better to also include them here, if available at the source, since color may have changed and the plateid dataset is not public

     Vehicle "has" ext:VehicleDamage  (see description in international accident classification)
     Vehicle "hasMileage" unit + distance (e.g. 120000 km)
     Vehicle "had" ext:VehicleDamage // a damage can be the cause of an accident (brake dead) or the result (shock impact) or an information that the vehicle was already damaged ("had")



   "involves" Animal(s) // external Animal: race, size, name, gender, age, id, color, size, etc.

// I feel a need for a specific Animal class here, vs using a more general LivingThing, driven by the application field (accidents typically involves people, vehicle, animal, and other things on the road that shouldnt be there)


        Animal "has" ext:BodyInjury (death, severe, light, desc, ambulance, etc)


    "involves" Thing(s)

// e.g. falling rock, tree, bridge, pole, river, plane, boat, train, washing machine, windsurf, etc Ambulance, PoliceUnit, could be folded here
// things moving or not, cause or effect of the accident
// is there an external ontology for such a generic family of physical things ? it's basically anything you can imagine that can be involved in a road accident (from the eiffel tower falling on Paris to a mobile phone that you want to avoid)
// a cause should link the accident to the thing, maybe best is to use fr ee text as fallback ?

      Thing "has" Damage (string ? thing is anything, so damage..)



Additional Properties on "any" thing (Person, Vehicle, Thing, Animal)

// these statement may be reified by several Person who disagree

   Any "isIn" Vehicle, Thing
   Any "has" ext:Location // at impact, can be different from accident location, a few meters away
   Any "has" ext:Direction (other Location) // need initial and final
   Any "has" ext:Speed (value:int + unit: kmh, mph, ms) // need more than one speed, eg. initial speed, speed at impact
   Any "isDoing" ext:TrafficAction (uturn, turning right, left, passing, parking, reverse, etc)
   Any "hasAim" enum:(wayhome, work, shopping, kid, fun, afterparty, etc)


References


DD, danield@w3.org
$Id: rao.html,v 1.92 2014/01/23 17:58:44 danield Exp $