@prefix : <#> .

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl:  <http://www.w3.org/2002/07/owl#> .
@prefix tags: <http://www.holygoat.co.uk/owl/redwood/0.1/tags#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix sioc: <http://rdfs.org/sioc/ns#> .

######################################################################
#                    Our RDF Vocabulary                              #
######################################################################

: a owl:Ontology;
  dc:title "Tags to Concepts ontology"@en ;
  rdfs:label "An ontology for semantic tagging."@en ;
  dc:description "An ontology that describes links between tags and concepts, as used in the popular del.icio.us and Flickr systems."@en ;
  dct:issued "2010-09-26" ;
  dc:creator "Pierre Andrews" ;
  foaf:maker <http://www.disi.unitn.it/~andrews> .

#an extension of the tags ontology to describe composed tags with meaning
:ComposedTag a owl:Class ;
			 rdfs:subClassOf tags:Tag;
			 rdfs:label "Composed Tag"@en ;
			 rdfs:comment "A composed tag with more than one concept in it. E.g. 'java_island'"@en .

#a Token is a clean representation of a tag or part of a tag.
:Token a owl:Class;
	   rdfs:label "token"@en ;
	   rdfs:comment "A token representation of a tag. Corresponds to the cleaned up tag. E.g. 'blogs'->'blog'. A tag in itself is often hard to link to a meaning, however, its cleaned version can be easily linked to a synset in wordnet, etc."@en .

#a property of a Tag to link to its tokens.
:hasTokens a owl:Property;
		   rdfs:domain tags:Tag;
		   rdfs:range :Token ;
		   rdfs:label "list of tokens of a tag"@en ;
		   rdfs:comment "a list of tokens that make up a composed tag, or a single token that is the cleaned up version of a tag."@en .

#a property of a Token to store its position in a splitted tag.
:position a owl:Property;
		  rdfs:domain :Token;
		  rdfs:range xsd:unsignedInt ;
		  rdfs:label "position of the token"@en ;
		  rdfs:comment "a Token is part of Tag and therefore makes up a complex skos:Concept (as 'java'+'island' is not exactly the same concept as 'java island'), it is thus important to know the position of the token in the composed tag. The position is relative to the other tags so it doesn't have to start from 0, even if it would be better to keep it like this. If the token is the only component of the Tag, then the position is not mandatory."@en .

:partOfTag a owl:Property;
		   rdfs:domain :Token;
		   rdfs:range tags:Tag;
		   rdfs:label "to which Tag does this Token belong?"@en;
		   rdfs:comment "a Token is part of Tag and therefore makes up a complex skos:Concept (as 'java'+'island' is not exactly the same concept as 'java island'), it is thus important to know to which tag this particular token belongs if it has a commontag:means of its own."@en .

#to attach a Concept collection to a Person, and Agent, a UserAccount, etc.
:vocabulary a owl:Property;
			rdfs:domain sioc:UserAccount, foaf:Agent;
			rdfs:range skos:Collection;
			rdfs:label "vocabulary"@en;
			rdfs:comment "the set of tags that is used by a particular agent. For example, all the concept that are used to tag someones bookmarks on delicious"@en .

:meaningOfToken a owl:Property;
			    rdfs:domain skos:Concept;
			  	rdfs:range :Token;
				rdfs:label "Meaning of a Token"@en;
				rdfs:comment "A tags:Tag is made of one or more :Token that have a commontag:means link to a skos:Concept, this is the symetric link from the skos:Concept to the particular :Token."@en.
