[tracker] New location ontology
- From: Ivan Frade <ifrade src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker] New location ontology
- Date: Fri, 12 Jun 2009 06:40:46 -0400 (EDT)
commit 6e6f52d0a8ba3a75950e0610ff7d57f8ba313f95
Author: Ivan Frade <ivan frade nokia com>
Date: Wed May 27 14:16:11 2009 +0300
New location ontology
Very first draft (dont use cardinal points)
data/ontologies/40-mlo.description | 10 ++++
data/ontologies/40-mlo.ontology | 101 ++++++++++++++++++++++++++++++++++++
utils/services/ttl_html.c | 6 ++-
3 files changed, 116 insertions(+), 1 deletions(-)
---
diff --git a/data/ontologies/40-mlo.description b/data/ontologies/40-mlo.description
new file mode 100644
index 0000000..48e89e4
--- /dev/null
+++ b/data/ontologies/40-mlo.description
@@ -0,0 +1,10 @@
+ prefix dsc: <http://www.tracker-project.org/temp/dsc#> .
+
+<virtual-ontology-uri:40-mlo.ontology> a dsc:Ontology ;
+ dsc:title "Maemo Location Ontology (MLO)" ;
+ dsc:author "Ivan Frade <ivan frade nokia com>" ;
+ dsc:editor "Ivan Frade <ivan frade nokia com>" ;
+ dsc:contributor "Example of contributor" ;
+
+ dsc:baseUrl "http://www.tracker-project.org/temp/mlo#" ;
+ dsc:relativePath "./40-mlo.ontology" .
diff --git a/data/ontologies/40-mlo.ontology b/data/ontologies/40-mlo.ontology
new file mode 100644
index 0000000..78bea37
--- /dev/null
+++ b/data/ontologies/40-mlo.ontology
@@ -0,0 +1,101 @@
+ 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 mlo: <http://www.tracker-project.org/temp/mlo#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+
+mlo: a tracker:Namespace ;
+ tracker:prefix "mlo" .
+
+mlo:GeoPoint a rdfs:Class ;
+ rdfs:label "Point on the earth" ;
+ rdfs:comment "The inherited properties from InformationElement can be used to add details." ;
+ rdfs:subClassOf nie:InformationElement .
+
+# Should this be a subclass of nao:Tag?
+mlo:PointOfInterest a rdfs:Class ;
+ rdfs:label "Annotation for a point (FIXME subclass of nao:Tag?)" ;
+ rdfs:subClassOf nie:InformationElement ;
+ rdfs:comment "Use the nie title, description, ... properties".
+
+mlo:LocationBoundingBox a rdfs:Class ;
+ rdfs:label "Box containing a relevant location (places that cannot be described in one concrete point)" ;
+ rdfs:subClassOf nie:InformationElement .
+
+mlo:Route a rdfs:Class ;
+ rdfs:label "Bounding box with an specific use-case" ;
+ rdfs:subClassOf mlo:LocationBoundingBox .
+
+#Properties of GeoPoint
+mlo:latitude a rdf:Property ;
+ rdfs:label "Latitude";
+ rdfs:comment "Positive values for the north hemisphere, negative for the south" ;
+ rdfs:domain mlo:GeoPoint ;
+ rdfs:range xsd:double .
+
+mlo:longitude a rdf:Property ;
+ rdfs:label "Longitude" ;
+ rdfs:comment "Positive to one side of the Greenwich meridian, negative to the the other" ;
+ rdfs:domain mlo:GeoPoint ;
+ rdfs:range xsd:double .
+
+mlo:altitude a rdf:Property ;
+ rdfs:label "Altitude" ;
+ rdfs:comment "Altitude above mean sea level";
+ rdfs:domain mlo:GeoPoint ;
+ rdfs:range xsd:integer .
+
+mlo:timestamp a rdf:Property ;
+ rdfs:label "Timestamp" ;
+ rdfs:comment "Timestamp when the geopoint is referenced. Create subproperties for certain use cases" ;
+ rdfs:domain mlo:GeoPoint ;
+ rdfs:range xsd:dateTime .
+
+# Properties of LocationBoundingBox
+mlo:boxSouthWestCorner a rdf:Property ;
+ rdfs:label "South-west corner of the bounding box" ;
+ rdfs:domain mlo:LocationBoundingBox ;
+ rdfs:range mlo:GeoPoint.
+
+mlo:boxEastLimit a rdf:Property ;
+ rdfs:label "Length of the box in the East direction" ;
+ rdfs:domain mlo:LocationBoundingBox ;
+ rdfs:range mlo:GeoPoint.
+
+mlo:boxVerticalLimit a rdf:Property ;
+ rdfs:label "Length of the box in the Up direction (height)" ;
+ rdfs:domain mlo:LocationBoundingBox ;
+ rdfs:range mlo:GeoPoint.
+
+mlo:boxNorthLimit a rdf:Property ;
+ rdfs:label "Length of the box in the North direction" ;
+ rdfs:domain mlo:LocationBoundingBox ;
+ rdfs:range mlo:GeoPoint.
+
+# Properties of Rouce
+mlo:startTime a rdf:Property ;
+ rdfs:label "Time when the first point in the route was saved" ;
+ rdfs:domain mlo:Route ;
+ rdfs:range xsd:dateTime .
+
+mlo:endTime a rdf:Property ;
+ rdfs:label "Time when the last point in the route was saved" ;
+ rdfs:domain mlo:Route ;
+ rdfs:range xsd:dateTime .
+
+mlo:routeDetails a rdf:Property ;
+ rdfs:label "Pointer to a file containing route details (e.g. KML file)." ;
+ rdfs:comment "FIXME Domain can be resource if we handle map-files correctly in the ontology";
+ rdfs:domain mlo:Route ;
+ rdfs:range xsd:string .
+
+
+# FIXME Domain rdfs:Resource?? to link files and not only content?
+mlo:location a rdf:Property ;
+ rdfs:label "Property linking something to a location" ;
+ rdfs:comment "This can be subclassed to add semantics" ;
+ rdfs:domain nie:InformationElement ;
+ rdfs:range mlo:GeoPoint .
diff --git a/utils/services/ttl_html.c b/utils/services/ttl_html.c
index b8120b2..bb13636 100644
--- a/utils/services/ttl_html.c
+++ b/utils/services/ttl_html.c
@@ -12,6 +12,7 @@ Namespace NAMESPACES [] = {
{"dc", "http://purl.org/dc/elements/1.1/"},
{"fts", "http://www.tracker-project.org/ontologies/fts#"},
{"mto", "http://www.tracker-project.org/temp/mto#"},
+ {"mlo", "http://www.tracker-project.org/temp/mlo#"},
{"nao", "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#"},
{"ncal", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#"},
{"nco", "http://www.semanticdesktop.org/ontologies/2007/03/22/nco#"},
@@ -64,7 +65,10 @@ qname_to_shortname (const gchar *qname)
for (i = 0; NAMESPACES[i].namespace != NULL; i++) {
if (g_str_has_prefix (qname, NAMESPACES[i].uri)) {
pieces = g_strsplit (qname, "#", 2);
- g_assert (g_strv_length (pieces) == 2);
+ if (g_strv_length (pieces) != 2) {
+ g_warning ("Unable to get the shortname for %s", qname);
+ break;
+ }
name = g_strdup_printf ("%s:%s",
NAMESPACES[i].namespace,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]