@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
@prefix nie: <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#> .
@prefix nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#> .
@prefix mto: <http://www.tracker-project.org/temp/mto#> .
@prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
@prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .

mto: a tracker:Namespace, tracker:Ontology ;
	tracker:prefix "mto" ;
	nao:lastModified "2010-10-20T07:42:00Z" .

mto:TransferElement a rdfs:Class ;
	rdfs:label "Transfer element" ;
	rdfs:comment "Gives information about the transfer of a single element - typically a file. The properties in this class would need to be changed if it has to handle sync elements as well" ;
	tracker:notify true ;
	rdfs:subClassOf nie:InformationElement .

mto:Transfer a rdfs:Class ;
	rdfs:label "Transfer" ;
	rdfs:comment "Represent a single transfer task, which could have multiple transfer elements" ;
	tracker:notify true ;
	rdfs:subClassOf nie:InformationElement .

mto:UploadTransfer a rdfs:Class ;
	rdfs:label "Upload" ;
	rdfs:comment "Handles transfers of files/data present on the device to some place outside the device. Upload methods include uploading to a website, sending via BlueTooth etc. " ;
	rdfs:subClassOf mto:Transfer .

mto:DownloadTransfer a rdfs:Class ;
	rdfs:label "Download" ;
	rdfs:comment "Handles transfers of files outside the device into the device. This class will only refer to files downloaded from a website or recieved using BlueTooth etc. Files recieved with messages are not considered here. Those would be handled seperately using nmo:Message" ;
	rdfs:subClassOf mto:Transfer .

mto:SyncTransfer a rdfs:Class ;
	rdfs:label "Sync" ;
	rdfs:comment "Handles synchronization between the device and some server (a computer, or a website)" ;
	rdfs:subClassOf mto:Transfer .

# NO Web upload class

mto:source a rdf:Property ;
	rdfs:label "Source" ;
	rdfs:comment "The source for the transfer. If the transfer is an upload, it would be the URI for a file on the device. If the transfer is a (web) download, it will be a URL. Question: Does it make more sense to have two fields: uploadSource and downloadSource?" ;
	nrl:maxCardinality 1 ;
	rdfs:domain mto:TransferElement ;
	rdfs:range rdfs:Resource .

mto:destination a rdf:Property ;
	rdfs:label "Destination" ;
	rdfs:comment "The destination of the transfer. If the transfer is an download, it would be the URI for a file on the device. If the transfer is a (web) upload, it will be a URL, which will be filled once the upload is completed." ;
	nrl:maxCardinality 1 ;
	rdfs:domain mto:TransferElement ;
	rdfs:range rdfs:Resource .

mto:startedTime a rdf:Property ;
	rdfs:label "Started" ;
	rdfs:comment "Captures the date and time when the transfer was started" ;
	nrl:maxCardinality 1 ;
	rdfs:domain mto:TransferElement ;
	rdfs:range xsd:dateTime .

mto:completedTime a rdf:Property ;
	rdfs:label "Completed" ;
	rdfs:comment "Captures the date and time when the transfer ended. It must be set only when the trasfer element is completed succesfully" ;
	nrl:maxCardinality 1 ;
	rdfs:domain mto:TransferElement ;
	rdfs:range xsd:dateTime .

mto:State a rdfs:Class ;
	rdfs:label "State value" ;
	rdfs:subClassOf rdfs:Resource ;
	rdfs:comment "Class with a restricted set of instances to enumarate transfer methods".

mto:state-active a mto:State .
mto:state-paused a mto:State .
mto:state-cancelled a mto:State .
mto:state-done a mto:State .
mto:state-pending a mto:State .
mto:state-error a mto:State .

mto:state a rdf:Property ;
	rdfs:label "State" ;
	rdfs:comment "Captures the current state of the transfer element: Pending (not started), In Progress, Paused, Cancelled, Done" ;
	nrl:maxCardinality 1 ;
	rdfs:domain mto:TransferElement ;
	rdfs:range mto:State .

mto:transferState a rdf:Property ;
	rdfs:label "Transfer state" ;
	rdfs:comment "Captures the state of the transfer. This is derived from the cumulative states of the transfer elements of this transfer. Applications are responsible to keep it up-to-date" ;
	nrl:maxCardinality 1 ;
	rdfs:domain mto:Transfer ;
	rdfs:range mto:State .

mto:TransferMethod a rdfs:Class ;
	rdfs:comment "Class with a restricted set of instances to enumarate transfer methods" ;
	rdfs:subClassOf rdfs:Resource .

mto:transfer-method-bluetooth a mto:TransferMethod .
mto:transfer-method-web a mto:TransferMethod .

mto:method a rdf:Property ;
	rdfs:label "Method" ;
	rdfs:comment "The method of transfer - Bluetooth, Web upload etc" ;
	nrl:maxCardinality 1 ;
	rdfs:domain mto:Transfer ;
	rdfs:range mto:TransferMethod .

mto:created a rdf:Property ;
	rdfs:label "Created" ;
	rdfs:comment "The date and time when the transfer was created" ;
	nrl:maxCardinality 1 ;
	rdfs:domain mto:Transfer ;
	rdfs:range xsd:dateTime .

mto:transferList a rdf:Property ;
	rdfs:label "Transfer List" ;
	rdfs:comment "A list of transfer elements" ;
	rdfs:domain mto:Transfer ;
	rdfs:range mto:TransferElement .

# unknown range - will need to be defined by the Account management guys
# FIXME FIXME FIXME FIXME: At the moment xsd:string so the transfer app guys can start working.
#  Waiting for a holistic accounts solution
#  It could also be a ContactMedium
mto:account a rdf:Property ;
	rdfs:label "Account" ;
	rdfs:comment "A reference to the account to which the web upload is to be done. This should at least contain information about the account and the service which is being used. For instance, Google/YouTube or Google/Picassa" ;
	nrl:maxCardinality 1 ;
	rdfs:domain mto:Transfer ;
	rdfs:range xsd:string .

mto:starter a rdf:Property ;
	rdfs:label "Starter" ;
	rdfs:comment "The application that actually triggered the transfer - e.g. Gallery, Content Manager etc" ;
	nrl:maxCardinality 1 ;
	rdfs:domain mto:Transfer ;
	rdfs:range nfo:Software .

mto:agent a rdf:Property ;
	rdfs:label "Agent" ;
	rdfs:comment "The application processing the transfer - e.g. Upload Engine etc" ;
	nrl:maxCardinality 1 ;
	rdfs:domain mto:Transfer ;
	rdfs:range nfo:Software .

mto:transferCategory a rdf:Property ;
	rdfs:label "Category for the transfer" ;
	rdfs:comment "This can contain category / tag / album / folder in the destination service" ;
	rdfs:domain mto:UploadTransfer ;
	rdfs:range  xsd:string .

# eg. Privacy level available to ALL transfers (or only to uploads?)
mto:transferPrivacyLevel a rdf:Property ;
	rdfs:label "Privacy level" ;
	rdfs:comment "It will contain an string with the privacy level in the service. The exact string and its interpretation is service specific" ;
	rdfs:domain mto:Transfer ;
	rdfs:range  xsd:string .

