@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://tracker.api.gnome.org/ontology/v3/nrl#> .
@prefix nie: <http://tracker.api.gnome.org/ontology/v3/nie#> .
@prefix nfo: <http://tracker.api.gnome.org/ontology/v3/nfo#> .
@prefix mfo: <http://tracker.api.gnome.org/ontology/v3/mfo#> .

mfo: a nrl:Namespace, nrl:Ontology ;
	nrl:prefix "mfo" ;
	nrl:lastModified "2010-02-16T11:00:00Z" .

mfo:FeedElement a rdfs:Class;
	rdfs:label "Feed element";
	rdfs:comment "Superclass for all elements related with feeds, to provide common configuration options";
	rdfs:subClassOf nie:InformationElement .

mfo:FeedChannel a rdfs:Class ;
	nrl:notify true ;
	rdfs:label "Feed channel" ;
	rdfs:comment "Represents feed channel transfer, typically a download of RSS or ATOM." ;
	rdfs:subClassOf mfo:FeedElement .

mfo:FeedMessage a rdfs:Class ;
	nrl:notify true ;
	rdfs:label "Feed entry" ;
	rdfs:comment "Represents feed entry. May have enclosures attached and certain settings that allow deviation from feed channel's setup" ;
	rdfs:subClassOf mfo:FeedElement .

mfo:Enclosure a rdfs:Class ;
	rdfs:label "Message enclosure" ;
	rdfs:comment "Represents an enclosure of a feed message" ;
	nrl:notify true ;
	rdfs:subClassOf mfo:FeedElement .

mfo:FeedSettings a rdfs:Class ;
	rdfs:label "Resource settings" ;
	rdfs:comment "Represents settings applied to a feed channel or a feed entry. How often it is updated, through which connection type it is delivered, when data expires and so on" ;
	rdfs:subClassOf rdfs:Resource.


# PROPERTIES OF CHANNEL
mfo:image a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain mfo:FeedElement ;
	rdfs:range xsd:string .

# updateTime is used to store a local timestamp of feed message
# remote time is stored using nie:contentLastModified

mfo:updatedTime a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:label "Updated" ;
	rdfs:comment "Captures the updated date and time when the channel is updated" ;
	rdfs:domain mfo:FeedChannel ;
	rdfs:range xsd:dateTime .

mfo:unreadCount a rdf:Property;
	rdfs:label " Unread count";
	rdfs:comment "Unread messages count within a channel";
	rdfs:domain mfo:FeedChannel;
	nrl:maxCardinality 1;
	rdfs:range xsd:integer.

mfo:totalCount a rdf:Property;
	rdfs:label " Total count";
	rdfs:comment "Total messages count within a channel";
	rdfs:domain mfo:FeedChannel;
	nrl:maxCardinality 1;
	rdfs:range xsd:integer.


#PROPERTIES OF MESSAGE
mfo:downloadedTime a rdf:Property ;
	rdfs:label "Downloaded" ;
	rdfs:comment "Captures the time stamp when message was downloaded" ;
	nrl:maxCardinality 1 ;
	rdfs:domain mfo:FeedMessage ;
	rdfs:range xsd:dateTime .

mfo:enclosureList a rdf:Property ;
	rdfs:label "Enclosure List" ;
	rdfs:comment "A list of enclosures" ;
	rdfs:domain mfo:FeedMessage ;
	rdfs:range mfo:Enclosure .

# String? Resource? RemoteDataObject?
mfo:remoteLink a rdf:Property ;
	rdfs:label "Enclosure link" ;
	rdfs:comment "Used to store remote URL of enclosure" ;
	rdfs:domain mfo:Enclosure ;
	nrl:maxCardinality 1 ;
	rdfs:range nfo:RemoteDataObject .

mfo:groupDefault a rdf:Property ;
	rdfs:label "Default in group";
	rdfs:comment "Different enclosures can represent the same resource in different formats/resolutions. This representations are grouped using the nie:identifier property and this property identify the default between them.";
	rdfs:domain mfo:Enclosure ;
	nrl:maxCardinality 1 ;
	rdfs:range xsd:boolean .

mfo:localLink a rdf:Property ;
	rdfs:label "Local link" ;
	rdfs:comment "Downloaded copy of the enclosure" ;
	rdfs:domain mfo:Enclosure ;
	rdfs:range nfo:FileDataObject ;
	nrl:maxCardinality 1 .

mfo:optional a rdf:Property ;
	rdfs:label "Optional";
	rdfs:comment "The enclosure is mandatory to download or only optional" ;
	rdfs:domain mfo:Enclosure;
	rdfs:range xsd:boolean ;
	nrl:maxCardinality 1 .

# Settings available for all Feed Elements
mfo:feedSettings a rdf:Property ;
	rdfs:label "Feed element settings" ;
	rdfs:comment "Settings ";
	nrl:maxCardinality 1 ;
	rdfs:domain mfo:FeedElement ;
	rdfs:range mfo:FeedSettings .

mfo:updateInterval a rdf:Property ;
	rdfs:label "Update Interval" ;
	rdfs:comment "Update interval for a feed channel to get updated or refreshed. Interpreted as minutes" ;
	nrl:maxCardinality 1 ;
	rdfs:domain mfo:FeedSettings ;
	rdfs:range xsd:integer .

mfo:expiryInterval a rdf:Property ;
	rdfs:label "Expiry Interval" ;
	rdfs:comment "Expiry interval for feed channel, it tells time that a message in a channel can live. Interpreted as minutes" ;
	nrl:maxCardinality 1 ;
	rdfs:domain mfo:FeedSettings ;
	rdfs:range xsd:integer .

mfo:downloadPath a rdf:Property ;
	rdfs:label "Download path" ;
	rdfs:comment "Download path for enclosures in a message" ;
	rdfs:domain mfo:FeedSettings ;
	rdfs:range xsd:string;
	nrl:maxCardinality 1 .

mfo:downloadFlag a rdf:Property ;
	rdfs:label "Download" ;
	rdfs:comment "To indicate whether enclosures will be downloaded or not" ;
	rdfs:domain mfo:FeedSettings ;
	rdfs:range xsd:boolean ;
	nrl:maxCardinality 1 .

mfo:maxSize a rdf:Property ;
	rdfs:label "Size" ;
	rdfs:comment "Maximum size of enclosure that can be downloaded. Interpreted as KBs " ;
	rdfs:domain mfo:FeedSettings ;
	rdfs:range xsd:integer ;
	nrl:maxCardinality 1 .

# Feed actions
mfo:Action a rdfs:Class ;
	rdfs:label "Action Requests" ;
	rdfs:comment "class with a restricted set of actions" ;
	rdfs:subClassOf rdfs:Resource .

mfo:action a rdf:Property ;
	rdfs:label "Action" ;
	rdfs:comment "Captures the current action for the channel: Refresh Now" ;
	nrl:maxCardinality 1 ;
	rdfs:domain mfo:FeedChannel ;
	rdfs:range mfo:Action .
	
mfo:refresh-now a mfo:Action .

# Feed types
mfo:FeedType a rdfs:Class ;
	rdfs:label "Feed fomat type " ;
	rdfs:comment "class with a restricted set of feed types" ;
	rdfs:subClassOf rdfs:Resource .

#mfo:flickr a mfo:FeedType .
#mfo:rss-atom a mfo:FeedType .

mfo:name a rdf:Property ;
	rdfs:label "Feed type name or plugin name" ;
	rdfs:comment "Feed format name like rss-atom,flickr,facebook" ;
	nrl:maxCardinality 1 ;
	rdfs:domain mfo:FeedType ;
	rdfs:range xsd:string .

mfo:type a rdf:Property ;
	rdfs:label "Feed formats type" ;
	rdfs:comment " Feeds format type which is mapped to plugin used in engine: flickr,rss-atom " ;
	nrl:maxCardinality 1;
	rdfs:domain mfo:FeedChannel ;
	rdfs:range mfo:FeedType .




