Hello again 😉
Over the last weeks, I also co-developed the Counter Ontology. This ontology is a generalisation of the Playcount Ontology from Yves Raimond. It includes a general multiple purpose counter concept, which could be uses to associate any concept to a co:Counter instance(s) with the property co:counter or a specific sub property of it.
The second property of co:Counter is co:count, which is a simple xsd:integer based datatype property. That means you could use this concept for things like for example play counter, skip counter or website hit counter.
Furthermore, this ontology includes already a predefined property to associate event (event:Event) specific counter to its related events (co:event_counter, co:event), e.g. a co:ScrobbleEvent to scrobble something. This enables the opportunity to trace back all related events, which are responsible for a specific count. Of course, this is also possible with all other concepts 😉
@prefix bibo: <http://purl.org/ontology/bibo/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix co: <http://purl.org/ontology/co/core#> .
@prefix ex: <http://example.org/> .
ex:WebpageCounter a co:Counter ;
dc:title "Webpage Counter"^^xsd:string ;
dc:creator <http://foaf.me/zazi#me> ;
dc:description "A counter of a specific web page"^^xsd:string ;
co:count 10 .
<https://smiy.wordpress.com/> a bibo:Document ;
co:counter ex:WebpageCounter .
A simple use case of the Counter Ontology is a website hit counter as described in the RDF/Turtle representation above (see also RDF and N3 for downloadable representations of this example). This examples shows, how a co:Counter instance could be used as a counter for a specific webpage (here of the type bibo:Document). Toby Inkster implemented an example of a webpage counter based on the Counter Ontology in PHP, which is available here.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix co: <http://purl.org/ontology/co/core#> .
@prefix mo: <http://purl.org/ontology/mo/> .
@prefix ex: <http://example.org/> .
@prefix event: <http://purl.org/NET/c4dm/event.owl#> .
@prefix time: <http://www.w3.org/2006/time#> .
ex:PlayBackCounter a co:Counter ;
dc:title "Play Back Counter"^^xsd:string ;
dc:creator <http://foaf.me/zazi#me> ;
dc:description "A play back counter of a specific music track"^^xsd:string ;
co:count 2 ;
co:object ex:SexMachine .
ex:SexMachine a mo:Track ;
dc:title "Sex Machine"^^xsd:string ;
dc:creator <http://dbpedia.org/resource/James_Brown> .
ex:SexMachineSE1 a co:ScrobbleEvent ;
event:time [
a time:Instant ;
time:inXSDDateTime "2010-07-15T11:21:52+01:00"^^xsd:dateTime
] ;
event:agent <http://foaf.me/zazi#me> ;
co:event_counter ex:PlayBackCounter .
ex:SexMachineSE2 a co:ScrobbleEvent ;
event:time [
a time:Instant ;
time:inXSDDateTime "2010-07-15T11:27:52+01:00"^^xsd:dateTime
] ;
event:agent <http://foaf.me/zazi#me> ;
co:event_counter ex:PlayBackCounter .
A bit more complex use case is a play back counter of a music track, which is related to all relevant play back events of this music track. This example is described in the RDF/Turtle representation above (see also RDF and N3 for downloadable representations of this example). It shows, how a co:Counter instance could be used as a play back counter for a specific music track (here of the type mo:Track). Each time, when this specific music track was played, a co:ScrobbleEvent instance was created and linked to its playback counter with the property co:event_counter.
As you can see the use cases of the Counter Ontology are diverse. The counter concept is currently also specified in the Play Back Ontology, which defines a pbo:MediaActionCounter concept, where specific media action counter can be derived from, e.g. pbo:PlayBackCounter or pbo:SkipCounter.
I especially would like to thank very much Yves Raimond and Mats Skillingstad to help to establish this multiple purpose counter ontology and Toby Inkster for providing the web counter example. Please feel free to reuse the Counter Ontology also for your own projects (let me know your use cases 😉 ). Comments, suggestions and critics are also very welcome.
Cheers,
Bob
Pingback: The Play Back Ontology | Some More Individual
This could indeed be usefull for a website counter, thanks!