[tracker/rss-enclosures] functional-tests: Add first ontology-changes support testing
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] functional-tests: Add first ontology-changes support testing
- Date: Wed, 24 Nov 2010 02:00:39 +0000 (UTC)
commit b24af456e3a95ffd01764f0aa07590f0cf7bc4fc
Author: Ivan Frade <ivan frade nokia com>
Date: Thu Oct 14 11:37:30 2010 +0300
functional-tests: Add first ontology-changes support testing
configure.ac | 4 +
tests/functional-tests/17-ontology-changes.py | 202 ++++++++++++++++++++
tests/functional-tests/Makefile.am | 3 +-
tests/functional-tests/test-ontologies/Makefile.am | 3 +
.../test-ontologies/basic/10-xsd.ontology | 16 ++
.../test-ontologies/basic/11-rdf.ontology | 136 +++++++++++++
.../test-ontologies/basic/12-nrl.ontology | 18 ++
.../test-ontologies/basic/20-dc.ontology | 19 ++
.../test-ontologies/basic/31-nao.ontology | 23 +++
.../test-ontologies/basic/90-tracker.ontology | 27 +++
.../test-ontologies/basic/91-test.ontology | 64 ++++++
.../test-ontologies/basic/Makefile.am | 14 ++
.../property-range-int-to-string/10-xsd.ontology | 16 ++
.../property-range-int-to-string/11-rdf.ontology | 136 +++++++++++++
.../property-range-int-to-string/12-nrl.ontology | 18 ++
.../property-range-int-to-string/20-dc.ontology | 19 ++
.../property-range-int-to-string/31-nao.ontology | 23 +++
.../90-tracker.ontology | 27 +++
.../property-range-int-to-string/91-test.ontology | 70 +++++++
.../property-range-int-to-string/Makefile.am | 14 ++
.../property-range-string-to-date/10-xsd.ontology | 16 ++
.../property-range-string-to-date/11-rdf.ontology | 136 +++++++++++++
.../property-range-string-to-date/12-nrl.ontology | 18 ++
.../property-range-string-to-date/20-dc.ontology | 19 ++
.../property-range-string-to-date/31-nao.ontology | 23 +++
.../90-tracker.ontology | 27 +++
.../property-range-string-to-date/91-test.ontology | 66 +++++++
.../property-range-string-to-date/Makefile.am | 14 ++
28 files changed, 1170 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5d981f5..cb827d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1949,6 +1949,10 @@ AC_CONFIG_FILES([
tests/functional-tests/test-configurations/Makefile
tests/functional-tests/test-configurations/miner-basic-ops/Makefile
tests/functional-tests/test-configurations/writeback/Makefile
+ tests/functional-tests/test-ontologies/Makefile
+ tests/functional-tests/test-ontologies/basic/Makefile
+ tests/functional-tests/test-ontologies/property-range-int-to-string/Makefile
+ tests/functional-tests/test-ontologies/property-range-string-to-date/Makefile
tests/functional-tests/ttl/Makefile
tests/Makefile
tests/tracker-miner-fs/Makefile
diff --git a/tests/functional-tests/17-ontology-changes.py b/tests/functional-tests/17-ontology-changes.py
new file mode 100755
index 0000000..3f45c88
--- /dev/null
+++ b/tests/functional-tests/17-ontology-changes.py
@@ -0,0 +1,202 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2010, Nokia <ivan frade nokia com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+
+"""
+Stand-alone tests cases for the store, booting it with different ontology
+changes and checking if the data is still there.
+"""
+import time
+
+import os
+from common.utils import configuration as cfg
+import unittest2 as ut
+#import unittest as ut
+from common.utils.system import TrackerSystemAbstraction as TrackerSystemAbstraction
+from common.utils.system import UnableToBootException as UnableToBootException
+from common.utils.helpers import StoreHelper as StoreHelper
+from common.utils.expectedFailure import expectedFailureBug
+
+
+RDFS_RANGE = "http://www.w3.org/2000/01/rdf-schema#range"
+XSD_DATETIME = "http://www.w3.org/2001/XMLSchema#dateTime"
+XSD_STRING = "http://www.w3.org/2001/XMLSchema#string"
+XSD_INTEGER = "http://www.w3.org/2001/XMLSchema#integer"
+
+class OntologyChangeTestTemplate (ut.TestCase):
+
+ def tearDown (self):
+ print "*******"
+
+ def get_ontology_dir (self, param):
+ local = os.path.join (os.getcwd (), "test-ontologies", param)
+ if (os.path.exists (local)):
+ # Use local directory if available
+ return local
+ else:
+ return os.path.join (cfg.DATADIR, "tracker-tests",
+ "test-ontologies", param)
+
+ def setUp (self):
+ self.system = TrackerSystemAbstraction ()
+
+ def tearDown (self):
+ self.system.tracker_store_testing_stop ()
+
+ def template_test_ontology_change (self):
+
+ self.set_ontology_dirs ()
+
+ basic_ontologies = self.get_ontology_dir (self.FIRST_ONTOLOGY_DIR)
+ self.system.tracker_store_testing_start (ontodir=basic_ontologies)
+ self.tracker = StoreHelper ()
+ self.tracker.wait () #Safe guard. Returns when the store is ready
+
+ self.insert_data ()
+
+ try:
+ # Boot the second set of ontologies
+ modified_ontologies = self.get_ontology_dir (self.SECOND_ONTOLOGY_DIR)
+ self.system.tracker_store_restart_with_new_ontologies (modified_ontologies)
+ except UnableToBootException, e:
+ self.fail (str(self.__class__) + " " + str(e))
+
+ self.validate_status ()
+
+ def set_ontology_dirs (self):
+ """
+ Implement this method in the subclass setting values for:
+ self.FIRST_ONTOLOGY_DIR and
+ self.SECOND_ONTOLOGY_DIR
+ """
+ raise Exception ("Subclasses must implement 'set_ontology_dir'")
+
+ def insert_data (self):
+ """
+ Put in the store some data with the FIRST ontology
+ """
+ raise Exception ("Subclasses must implement 'insert_data'")
+
+ def validate_status (self):
+ """
+ This is called after restarting the store with the SECOND ontology
+ Check that the inserted data was handled correctly and the ontology
+ is up to date
+ """
+ raise Exception ("Subclasses must implement 'validate_status'")
+
+
+class PropertyRangeStringToDate (OntologyChangeTestTemplate):
+
+ @expectedFailureBug ("New journal is gonna work it out")
+ def test_property_range_string_to_date (self):
+ self.template_test_ontology_change ()
+
+ def set_ontology_dirs (self):
+ self.FIRST_ONTOLOGY_DIR = "basic"
+ self.SECOND_ONTOLOGY_DIR = "property-range-string-to-date"
+
+ def insert_data (self):
+ self.instance = "test://ontology-change/property-range/string-to-date"
+ self.tracker.update ("INSERT { <%s> a test:A ; test:a_string '2010-10-12T13:30:00Z' }"
+ % (self.instance))
+
+ def validate_status (self):
+ print "validating"
+ # Query the ontology itself
+ result = self.tracker.query ("SELECT ?o WHERE { test:a_string rdfs:range ?o }")
+ self.assertEquals (result[0][0], XSD_DATETIME)
+
+ # Check the value is there
+ result = self.tracker.query ("SELECT ?o WHERE { <%s> test:a_string ?o . }" % (self.instance))
+ self.assertEquals (result[0][0], "2010-10-12T13:30:00Z")
+
+
+class PropertyRangeDateToString (OntologyChangeTestTemplate):
+
+ @expectedFailureBug ("New journal is gonna work it out")
+ def test_property_range_date_to_string (self):
+ self.template_test_ontology_change ()
+
+ def set_ontology_dirs (self):
+ self.FIRST_ONTOLOGY_DIR = "property-range-string-to-date"
+ self.SECOND_ONTOLOGY_DIR = "basic"
+
+ def insert_data (self):
+ self.instance = "test://ontology-change/property-range/date-to-string"
+ self.tracker.update ("INSERT { <%s> a test:classA ; test:propertyString '2010-10-12T13:30:00Z' }"
+ % (self.instance))
+
+ def validate_status (self):
+ # Query the ontology itself
+ result = self.tracker.query ("SELECT ?o WHERE { test:propertyString rdfs:range ?o }")
+ self.assertEquals (result[0][0], XSD_STRING)
+
+ # Check the value is there
+ result = self.tracker.query ("SELECT ?o WHERE { <%s> test:propertyString ?o . }" % (self.instance))
+ self.assertEquals (result[0][0], "2010-10-12T13:30:00Z")
+
+class PropertyRangeIntToString (OntologyChangeTestTemplate):
+
+ def test_property_range_int_to_str (self):
+ self.template_test_ontology_change ()
+
+ def set_ontology_dirs (self):
+ self.FIRST_ONTOLOGY_DIR = "basic"
+ self.SECOND_ONTOLOGY_DIR = "property-range-int-to-string"
+
+ def insert_data (self):
+ self.instance = "test://ontology-change/property-range/int-to-string"
+ self.tracker.update ("INSERT { <%s> a test:A; test:a_int 12. }" % (self.instance))
+
+ def validate_status (self):
+ result = self.tracker.query ("SELECT ?o WHERE { test:a_int rdfs:range ?o. }")
+ self.assertEquals (str(result[0][0]), XSD_STRING)
+
+ # Check the value is there
+ result = self.tracker.query ("SELECT ?o WHERE { <%s> test:a_int ?o .}" % (self.instance))
+ self.assertEquals (result[0][0], "12")
+
+class PropertyRangeStringToInt (OntologyChangeTestTemplate):
+
+ def test_property_range_str_to_int (self):
+ self.template_test_ontology_change ()
+
+ def set_ontology_dirs (self):
+ self.FIRST_ONTOLOGY_DIR = "property-range-int-to-string"
+ self.SECOND_ONTOLOGY_DIR = "basic"
+
+ def insert_data (self):
+ self.instance = "test://ontology-change/property-range/string-to-int"
+ self.tracker.update ("INSERT { <%s> a test:A; test:a_int '12'. }" % (self.instance))
+
+ def validate_status (self):
+ result = self.tracker.query ("SELECT ?o WHERE { test:a_int rdfs:range ?o. }")
+ self.assertEquals (str(result[0][0]), XSD_INTEGER)
+
+ # Check the value is there
+ result = self.tracker.query ("SELECT ?o WHERE { <%s> test:a_int ?o .}" % (self.instance))
+ self.assertEquals (result[0][0], "12")
+
+
+
+if __name__ == "__main__":
+ ut.main ()
+
+
diff --git a/tests/functional-tests/Makefile.am b/tests/functional-tests/Makefile.am
index 666da7d..4d0269b 100644
--- a/tests/functional-tests/Makefile.am
+++ b/tests/functional-tests/Makefile.am
@@ -1,6 +1,6 @@
include $(top_srcdir)/Makefile.decl
-SUBDIRS=common test-configurations test-extraction-data test-writeback-data ttl unittest2
+SUBDIRS=common test-configurations test-extraction-data test-writeback-data ttl unittest2 test-ontologies
INCLUDES = \
-I$(top_srcdir)/src/libtracker-sparql \
@@ -44,6 +44,7 @@ standard_tests += \
14-signals.py \
15-statistics.py \
16-collation.py \
+ 17-ontology-changes.py \
200-backup-restore.py \
300-miner-basic-ops.py
if HAVE_TRACKER_FTS
diff --git a/tests/functional-tests/test-ontologies/Makefile.am b/tests/functional-tests/test-ontologies/Makefile.am
new file mode 100644
index 0000000..09d99c8
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/Makefile.am
@@ -0,0 +1,3 @@
+include $(top_srcdir)/Makefile.decl
+
+SUBDIRS = basic property-range-int-to-string property-range-string-to-date
diff --git a/tests/functional-tests/test-ontologies/basic/10-xsd.ontology b/tests/functional-tests/test-ontologies/basic/10-xsd.ontology
new file mode 100644
index 0000000..c22c5fd
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/basic/10-xsd.ontology
@@ -0,0 +1,16 @@
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+
+xsd: a tracker:Namespace, tracker:Ontology ;
+ tracker:prefix "xsd" ;
+ nao:lastModified "2010-02-16T11:00:00Z" .
+
+xsd:string a rdfs:Class .
+xsd:boolean a rdfs:Class .
+xsd:integer a rdfs:Class .
+xsd:double a rdfs:Class .
+xsd:date a rdfs:Class .
+xsd:dateTime a rdfs:Class .
+
diff --git a/tests/functional-tests/test-ontologies/basic/11-rdf.ontology b/tests/functional-tests/test-ontologies/basic/11-rdf.ontology
new file mode 100644
index 0000000..7a485a9
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/basic/11-rdf.ontology
@@ -0,0 +1,136 @@
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+
+rdf: a tracker:Namespace, tracker:Ontology ;
+ tracker:prefix "rdf" ;
+ nao:lastModified "2010-06-29T13:00:00Z" .
+
+rdfs: a tracker:Namespace ;
+ tracker:prefix "rdfs" .
+
+rdfs:Resource a rdfs:Class ;
+ rdfs:label "All Resources" ;
+ rdfs:comment "All resources" .
+
+rdfs:Class a rdfs:Class ;
+ rdfs:label "Class" ;
+ rdfs:subClassOf rdfs:Resource .
+
+rdf:Property a rdfs:Class ;
+ rdfs:label "Property" ;
+ rdfs:subClassOf rdfs:Resource .
+
+rdfs:Literal a rdfs:Class ;
+ rdfs:label "Literal" ;
+ rdfs:subClassOf rdfs:Resource .
+
+rdf:type a rdf:Property ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range rdfs:Class .
+
+rdfs:subClassOf a rdf:Property ;
+ rdfs:domain rdfs:Class ;
+ rdfs:range rdfs:Class .
+
+rdfs:subPropertyOf a rdf:Property ;
+ rdfs:domain rdf:Property ;
+ rdfs:range rdf:Property .
+
+rdfs:comment a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:string .
+
+rdfs:label a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:string .
+
+rdfs:domain a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range rdfs:Resource .
+
+rdfs:range a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range rdfs:Class .
+
+tracker: a tracker:Namespace ;
+ tracker:prefix "tracker" .
+
+tracker:Namespace a rdfs:Class ;
+ rdfs:label "Namespace" ;
+ rdfs:subClassOf rdfs:Resource .
+
+tracker:Ontology a rdfs:Class ;
+ rdfs:label "Ontology" ;
+ rdfs:subClassOf rdfs:Resource .
+
+tracker:prefix a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain tracker:Namespace ;
+ rdfs:range xsd:string .
+
+tracker:domainIndex a rdf:Property ;
+ rdfs:domain rdfs:Class ;
+ rdfs:range rdf:Property .
+
+tracker:indexed a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
+tracker:secondaryIndex a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range rdf:Property .
+
+tracker:fulltextIndexed a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
+tracker:fulltextNoLimit a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
+tracker:transient a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
+tracker:isAnnotation a rdf:Property ;
+ rdfs:comment "The property is never embedded on physical files" ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
+tracker:weight a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:integer .
+
+tracker:defaultValue a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:string .
+
+tracker:added a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:dateTime ;
+ tracker:isAnnotation true .
+
+# implicitly updated modification time
+tracker:modified a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:integer ;
+ tracker:isAnnotation true .
+
diff --git a/tests/functional-tests/test-ontologies/basic/12-nrl.ontology b/tests/functional-tests/test-ontologies/basic/12-nrl.ontology
new file mode 100644
index 0000000..381e0c3
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/basic/12-nrl.ontology
@@ -0,0 +1,18 @@
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+
+nrl: a tracker:Namespace, tracker:Ontology ;
+ tracker:prefix "nrl" ;
+ nao:lastModified "2010-02-16T11:00:00Z" .
+
+nrl:InverseFunctionalProperty a rdfs:Class .
+
+nrl:maxCardinality a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:integer .
+
diff --git a/tests/functional-tests/test-ontologies/basic/20-dc.ontology b/tests/functional-tests/test-ontologies/basic/20-dc.ontology
new file mode 100644
index 0000000..3567110
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/basic/20-dc.ontology
@@ -0,0 +1,19 @@
+ prefix dc: <http://purl.org/dc/elements/1.1/> .
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+
+dc: a tracker:Namespace, tracker:Ontology ;
+ tracker:prefix "dc" ;
+ nao:lastModified "2010-03-23T16:00:00Z" .
+
+dc:date a rdf:Property ;
+ rdfs:label "Date" ;
+ rdfs:comment "A point or period of time associated with an event in the lifecycle of the resource." ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:dateTime .
+
+
diff --git a/tests/functional-tests/test-ontologies/basic/31-nao.ontology b/tests/functional-tests/test-ontologies/basic/31-nao.ontology
new file mode 100644
index 0000000..8303bc1
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/basic/31-nao.ontology
@@ -0,0 +1,23 @@
+ prefix dc: <http://purl.org/dc/elements/1.1/> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+ prefix nie: <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#> .
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+
+nao: a tracker:Namespace, tracker:Ontology ;
+ tracker:prefix "nao" ;
+ nao:lastModified "2010-03-23T16:00:00Z" .
+
+nao:lastModified a rdf:Property ;
+ rdfs:label "lastModified" ;
+ rdfs:comment "last modification date" ;
+ rdfs:subPropertyOf dc:date ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:dateTime .
+
+
diff --git a/tests/functional-tests/test-ontologies/basic/90-tracker.ontology b/tests/functional-tests/test-ontologies/basic/90-tracker.ontology
new file mode 100644
index 0000000..eef0cd4
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/basic/90-tracker.ontology
@@ -0,0 +1,27 @@
+ prefix fts: <http://www.tracker-project.org/ontologies/fts#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+ prefix nie: <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#> .
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+tracker: a tracker:Ontology ;
+ nao:lastModified "2010-04-05T11:00:00Z" .
+
+#tracker:indexed a rdf:Property ;
+# nrl:maxCardinality 1 ;
+# rdfs:domain rdf:Property ;
+# rdfs:range xsd:boolean .
+
+tracker:notify a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Class ;
+ rdfs:range xsd:boolean .
+
+tracker:writeback a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
diff --git a/tests/functional-tests/test-ontologies/basic/91-test.ontology b/tests/functional-tests/test-ontologies/basic/91-test.ontology
new file mode 100644
index 0000000..d365b91
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/basic/91-test.ontology
@@ -0,0 +1,64 @@
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix test: <http://example.org/ns#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+
+#
+# Note: If you modify this ontology remember to replicate the changes in the other
+# 91 ontologies
+#
+#
+# A (with props for string and int, string n-cardinality, )
+# / \
+# B C
+#
+test: a tracker:Namespace, tracker:Ontology ;
+ nao:lastModified "2010-03-23T11:00:04Z" ;
+ tracker:prefix "test" .
+
+test:A a rdfs:Class .
+
+test:a_string a rdf:Property ;
+ rdfs:comment "Property to test the conversions from string" ;
+ rdfs:domain test:A ;
+ rdfs:range xsd:string ;
+ nrl:maxCardinality 1 .
+
+test:a_datetime a rdf:Property ;
+ rdfs:comment "Property to test the changes string/date" ;
+ rdfs:domain test:A ;
+ rdfs:range xsd:dateTime ;
+ nrl:maxCardinality 1 .
+
+test:a_int a rdf:Property ;
+ rdfs:comment "Property to test the changes string/int" ;
+ rdfs:domain test:A ;
+ rdfs:range xsd:integer ;
+ nrl:maxCardinality 1 .
+
+test:a_n_cardinality a rdf:Property ;
+ rdfs:comment "Property to test the cardinality changes" ;
+ rdfs:domain test:A ;
+ rdfs:range xsd:string .
+# Max cardinality N because is not specified
+
+test:a_superprop a rdf:Property ;
+ rdfs:comment "To use as superproperty and test the superproperty changes in the subprop." ;
+ rdfs:domain test:A ;
+ rdfs:range xsd:string .
+
+
+test:B a rdfs:Class ;
+ rdfs:subClassOf test:A .
+
+test:C a rdfs:Class ;
+ rdfs:subClassOf test:A .
+
+test:c_subprop a rdf:Property ;
+ rdfs:comment "To test changes in the superproperty" ;
+ rdfs:subPropertyOf test:a_superprop ;
+ rdfs:domain test:C ;
+ rdfs:range xsd:string .
diff --git a/tests/functional-tests/test-ontologies/basic/Makefile.am b/tests/functional-tests/test-ontologies/basic/Makefile.am
new file mode 100644
index 0000000..8034079
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/basic/Makefile.am
@@ -0,0 +1,14 @@
+include $(top_srcdir)/Makefile.decl
+
+basicontodir = $(datadir)/tracker-tests/test-ontologies/basic
+
+basiconto_DATA = \
+ 10-xsd.ontology \
+ 11-rdf.ontology \
+ 12-nrl.ontology \
+ 20-dc.ontology \
+ 31-nao.ontology \
+ 90-tracker.ontology \
+ 91-test.ontology
+
+EXTRA_DIST = $(basiconto_DATA)
\ No newline at end of file
diff --git a/tests/functional-tests/test-ontologies/property-range-int-to-string/10-xsd.ontology b/tests/functional-tests/test-ontologies/property-range-int-to-string/10-xsd.ontology
new file mode 100644
index 0000000..c22c5fd
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-int-to-string/10-xsd.ontology
@@ -0,0 +1,16 @@
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+
+xsd: a tracker:Namespace, tracker:Ontology ;
+ tracker:prefix "xsd" ;
+ nao:lastModified "2010-02-16T11:00:00Z" .
+
+xsd:string a rdfs:Class .
+xsd:boolean a rdfs:Class .
+xsd:integer a rdfs:Class .
+xsd:double a rdfs:Class .
+xsd:date a rdfs:Class .
+xsd:dateTime a rdfs:Class .
+
diff --git a/tests/functional-tests/test-ontologies/property-range-int-to-string/11-rdf.ontology b/tests/functional-tests/test-ontologies/property-range-int-to-string/11-rdf.ontology
new file mode 100644
index 0000000..7a485a9
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-int-to-string/11-rdf.ontology
@@ -0,0 +1,136 @@
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+
+rdf: a tracker:Namespace, tracker:Ontology ;
+ tracker:prefix "rdf" ;
+ nao:lastModified "2010-06-29T13:00:00Z" .
+
+rdfs: a tracker:Namespace ;
+ tracker:prefix "rdfs" .
+
+rdfs:Resource a rdfs:Class ;
+ rdfs:label "All Resources" ;
+ rdfs:comment "All resources" .
+
+rdfs:Class a rdfs:Class ;
+ rdfs:label "Class" ;
+ rdfs:subClassOf rdfs:Resource .
+
+rdf:Property a rdfs:Class ;
+ rdfs:label "Property" ;
+ rdfs:subClassOf rdfs:Resource .
+
+rdfs:Literal a rdfs:Class ;
+ rdfs:label "Literal" ;
+ rdfs:subClassOf rdfs:Resource .
+
+rdf:type a rdf:Property ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range rdfs:Class .
+
+rdfs:subClassOf a rdf:Property ;
+ rdfs:domain rdfs:Class ;
+ rdfs:range rdfs:Class .
+
+rdfs:subPropertyOf a rdf:Property ;
+ rdfs:domain rdf:Property ;
+ rdfs:range rdf:Property .
+
+rdfs:comment a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:string .
+
+rdfs:label a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:string .
+
+rdfs:domain a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range rdfs:Resource .
+
+rdfs:range a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range rdfs:Class .
+
+tracker: a tracker:Namespace ;
+ tracker:prefix "tracker" .
+
+tracker:Namespace a rdfs:Class ;
+ rdfs:label "Namespace" ;
+ rdfs:subClassOf rdfs:Resource .
+
+tracker:Ontology a rdfs:Class ;
+ rdfs:label "Ontology" ;
+ rdfs:subClassOf rdfs:Resource .
+
+tracker:prefix a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain tracker:Namespace ;
+ rdfs:range xsd:string .
+
+tracker:domainIndex a rdf:Property ;
+ rdfs:domain rdfs:Class ;
+ rdfs:range rdf:Property .
+
+tracker:indexed a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
+tracker:secondaryIndex a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range rdf:Property .
+
+tracker:fulltextIndexed a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
+tracker:fulltextNoLimit a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
+tracker:transient a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
+tracker:isAnnotation a rdf:Property ;
+ rdfs:comment "The property is never embedded on physical files" ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
+tracker:weight a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:integer .
+
+tracker:defaultValue a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:string .
+
+tracker:added a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:dateTime ;
+ tracker:isAnnotation true .
+
+# implicitly updated modification time
+tracker:modified a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:integer ;
+ tracker:isAnnotation true .
+
diff --git a/tests/functional-tests/test-ontologies/property-range-int-to-string/12-nrl.ontology b/tests/functional-tests/test-ontologies/property-range-int-to-string/12-nrl.ontology
new file mode 100644
index 0000000..381e0c3
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-int-to-string/12-nrl.ontology
@@ -0,0 +1,18 @@
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+
+nrl: a tracker:Namespace, tracker:Ontology ;
+ tracker:prefix "nrl" ;
+ nao:lastModified "2010-02-16T11:00:00Z" .
+
+nrl:InverseFunctionalProperty a rdfs:Class .
+
+nrl:maxCardinality a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:integer .
+
diff --git a/tests/functional-tests/test-ontologies/property-range-int-to-string/20-dc.ontology b/tests/functional-tests/test-ontologies/property-range-int-to-string/20-dc.ontology
new file mode 100644
index 0000000..3567110
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-int-to-string/20-dc.ontology
@@ -0,0 +1,19 @@
+ prefix dc: <http://purl.org/dc/elements/1.1/> .
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+
+dc: a tracker:Namespace, tracker:Ontology ;
+ tracker:prefix "dc" ;
+ nao:lastModified "2010-03-23T16:00:00Z" .
+
+dc:date a rdf:Property ;
+ rdfs:label "Date" ;
+ rdfs:comment "A point or period of time associated with an event in the lifecycle of the resource." ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:dateTime .
+
+
diff --git a/tests/functional-tests/test-ontologies/property-range-int-to-string/31-nao.ontology b/tests/functional-tests/test-ontologies/property-range-int-to-string/31-nao.ontology
new file mode 100644
index 0000000..8303bc1
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-int-to-string/31-nao.ontology
@@ -0,0 +1,23 @@
+ prefix dc: <http://purl.org/dc/elements/1.1/> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+ prefix nie: <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#> .
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+
+nao: a tracker:Namespace, tracker:Ontology ;
+ tracker:prefix "nao" ;
+ nao:lastModified "2010-03-23T16:00:00Z" .
+
+nao:lastModified a rdf:Property ;
+ rdfs:label "lastModified" ;
+ rdfs:comment "last modification date" ;
+ rdfs:subPropertyOf dc:date ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:dateTime .
+
+
diff --git a/tests/functional-tests/test-ontologies/property-range-int-to-string/90-tracker.ontology b/tests/functional-tests/test-ontologies/property-range-int-to-string/90-tracker.ontology
new file mode 100644
index 0000000..eef0cd4
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-int-to-string/90-tracker.ontology
@@ -0,0 +1,27 @@
+ prefix fts: <http://www.tracker-project.org/ontologies/fts#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+ prefix nie: <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#> .
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+tracker: a tracker:Ontology ;
+ nao:lastModified "2010-04-05T11:00:00Z" .
+
+#tracker:indexed a rdf:Property ;
+# nrl:maxCardinality 1 ;
+# rdfs:domain rdf:Property ;
+# rdfs:range xsd:boolean .
+
+tracker:notify a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Class ;
+ rdfs:range xsd:boolean .
+
+tracker:writeback a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
diff --git a/tests/functional-tests/test-ontologies/property-range-int-to-string/91-test.ontology b/tests/functional-tests/test-ontologies/property-range-int-to-string/91-test.ontology
new file mode 100644
index 0000000..51caed8
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-int-to-string/91-test.ontology
@@ -0,0 +1,70 @@
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix test: <http://example.org/ns#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+
+#
+# Note: If you modify this ontology remember to replicate the changes in the other
+# 91 ontologies
+#
+#
+# A (with props for string and int, string n-cardinality, )
+# / \
+# B C
+#
+test: a tracker:Namespace, tracker:Ontology ;
+ nao:lastModified "2010-03-24T11:00:04Z" ;
+ tracker:prefix "test" .
+
+test:A a rdfs:Class .
+
+test:a_string a rdf:Property ;
+ rdfs:comment "Property to test the conversions from string" ;
+ rdfs:domain test:A ;
+ rdfs:range xsd:string ;
+ nrl:maxCardinality 1 .
+
+test:a_datetime a rdf:Property ;
+ rdfs:comment "Property to test the changes string/date" ;
+ rdfs:domain test:A ;
+ rdfs:range xsd:dateTime ;
+ nrl:maxCardinality 1 .
+
+
+# ***** TEST CHANGE *********
+
+test:a_int a rdf:Property ;
+ rdfs:comment "This property is integer in basic here is string" ;
+ rdfs:domain test:A ;
+ rdfs:range xsd:string ;
+ nrl:maxCardinality 1 .
+
+# ****************************
+
+
+test:a_n_cardinality a rdf:Property ;
+ rdfs:comment "Property to test the cardinality changes" ;
+ rdfs:domain test:A ;
+ rdfs:range xsd:string .
+# Max cardinality N because is not specified
+
+test:a_superprop a rdf:Property ;
+ rdfs:comment "To use as superproperty and test the superproperty changes in the subprop." ;
+ rdfs:domain test:A ;
+ rdfs:range xsd:string .
+
+
+test:B a rdfs:Class ;
+ rdfs:subClassOf test:A .
+
+test:C a rdfs:Class ;
+ rdfs:subClassOf test:A .
+
+test:c_subprop a rdf:Property ;
+ rdfs:comment "To test changes in the superproperty" ;
+ rdfs:subPropertyOf test:a_superprop ;
+ rdfs:domain test:C ;
+ rdfs:range xsd:string .
diff --git a/tests/functional-tests/test-ontologies/property-range-int-to-string/Makefile.am b/tests/functional-tests/test-ontologies/property-range-int-to-string/Makefile.am
new file mode 100644
index 0000000..7608e09
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-int-to-string/Makefile.am
@@ -0,0 +1,14 @@
+include $(top_srcdir)/Makefile.decl
+
+intontodir = $(datadir)/tracker-tests/test-ontologies/property-range-int-to-string
+
+intonto_DATA = \
+ 10-xsd.ontology \
+ 11-rdf.ontology \
+ 12-nrl.ontology \
+ 20-dc.ontology \
+ 31-nao.ontology \
+ 90-tracker.ontology \
+ 91-test.ontology
+
+EXTRA_DIST = $(intonto_DATA)
\ No newline at end of file
diff --git a/tests/functional-tests/test-ontologies/property-range-string-to-date/10-xsd.ontology b/tests/functional-tests/test-ontologies/property-range-string-to-date/10-xsd.ontology
new file mode 100644
index 0000000..c22c5fd
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-string-to-date/10-xsd.ontology
@@ -0,0 +1,16 @@
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+
+xsd: a tracker:Namespace, tracker:Ontology ;
+ tracker:prefix "xsd" ;
+ nao:lastModified "2010-02-16T11:00:00Z" .
+
+xsd:string a rdfs:Class .
+xsd:boolean a rdfs:Class .
+xsd:integer a rdfs:Class .
+xsd:double a rdfs:Class .
+xsd:date a rdfs:Class .
+xsd:dateTime a rdfs:Class .
+
diff --git a/tests/functional-tests/test-ontologies/property-range-string-to-date/11-rdf.ontology b/tests/functional-tests/test-ontologies/property-range-string-to-date/11-rdf.ontology
new file mode 100644
index 0000000..7a485a9
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-string-to-date/11-rdf.ontology
@@ -0,0 +1,136 @@
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+
+rdf: a tracker:Namespace, tracker:Ontology ;
+ tracker:prefix "rdf" ;
+ nao:lastModified "2010-06-29T13:00:00Z" .
+
+rdfs: a tracker:Namespace ;
+ tracker:prefix "rdfs" .
+
+rdfs:Resource a rdfs:Class ;
+ rdfs:label "All Resources" ;
+ rdfs:comment "All resources" .
+
+rdfs:Class a rdfs:Class ;
+ rdfs:label "Class" ;
+ rdfs:subClassOf rdfs:Resource .
+
+rdf:Property a rdfs:Class ;
+ rdfs:label "Property" ;
+ rdfs:subClassOf rdfs:Resource .
+
+rdfs:Literal a rdfs:Class ;
+ rdfs:label "Literal" ;
+ rdfs:subClassOf rdfs:Resource .
+
+rdf:type a rdf:Property ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range rdfs:Class .
+
+rdfs:subClassOf a rdf:Property ;
+ rdfs:domain rdfs:Class ;
+ rdfs:range rdfs:Class .
+
+rdfs:subPropertyOf a rdf:Property ;
+ rdfs:domain rdf:Property ;
+ rdfs:range rdf:Property .
+
+rdfs:comment a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:string .
+
+rdfs:label a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:string .
+
+rdfs:domain a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range rdfs:Resource .
+
+rdfs:range a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range rdfs:Class .
+
+tracker: a tracker:Namespace ;
+ tracker:prefix "tracker" .
+
+tracker:Namespace a rdfs:Class ;
+ rdfs:label "Namespace" ;
+ rdfs:subClassOf rdfs:Resource .
+
+tracker:Ontology a rdfs:Class ;
+ rdfs:label "Ontology" ;
+ rdfs:subClassOf rdfs:Resource .
+
+tracker:prefix a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain tracker:Namespace ;
+ rdfs:range xsd:string .
+
+tracker:domainIndex a rdf:Property ;
+ rdfs:domain rdfs:Class ;
+ rdfs:range rdf:Property .
+
+tracker:indexed a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
+tracker:secondaryIndex a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range rdf:Property .
+
+tracker:fulltextIndexed a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
+tracker:fulltextNoLimit a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
+tracker:transient a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
+tracker:isAnnotation a rdf:Property ;
+ rdfs:comment "The property is never embedded on physical files" ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
+tracker:weight a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:integer .
+
+tracker:defaultValue a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:string .
+
+tracker:added a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:dateTime ;
+ tracker:isAnnotation true .
+
+# implicitly updated modification time
+tracker:modified a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:integer ;
+ tracker:isAnnotation true .
+
diff --git a/tests/functional-tests/test-ontologies/property-range-string-to-date/12-nrl.ontology b/tests/functional-tests/test-ontologies/property-range-string-to-date/12-nrl.ontology
new file mode 100644
index 0000000..381e0c3
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-string-to-date/12-nrl.ontology
@@ -0,0 +1,18 @@
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+
+nrl: a tracker:Namespace, tracker:Ontology ;
+ tracker:prefix "nrl" ;
+ nao:lastModified "2010-02-16T11:00:00Z" .
+
+nrl:InverseFunctionalProperty a rdfs:Class .
+
+nrl:maxCardinality a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:integer .
+
diff --git a/tests/functional-tests/test-ontologies/property-range-string-to-date/20-dc.ontology b/tests/functional-tests/test-ontologies/property-range-string-to-date/20-dc.ontology
new file mode 100644
index 0000000..3567110
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-string-to-date/20-dc.ontology
@@ -0,0 +1,19 @@
+ prefix dc: <http://purl.org/dc/elements/1.1/> .
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+
+dc: a tracker:Namespace, tracker:Ontology ;
+ tracker:prefix "dc" ;
+ nao:lastModified "2010-03-23T16:00:00Z" .
+
+dc:date a rdf:Property ;
+ rdfs:label "Date" ;
+ rdfs:comment "A point or period of time associated with an event in the lifecycle of the resource." ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:dateTime .
+
+
diff --git a/tests/functional-tests/test-ontologies/property-range-string-to-date/31-nao.ontology b/tests/functional-tests/test-ontologies/property-range-string-to-date/31-nao.ontology
new file mode 100644
index 0000000..8303bc1
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-string-to-date/31-nao.ontology
@@ -0,0 +1,23 @@
+ prefix dc: <http://purl.org/dc/elements/1.1/> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+ prefix nie: <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#> .
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+
+nao: a tracker:Namespace, tracker:Ontology ;
+ tracker:prefix "nao" ;
+ nao:lastModified "2010-03-23T16:00:00Z" .
+
+nao:lastModified a rdf:Property ;
+ rdfs:label "lastModified" ;
+ rdfs:comment "last modification date" ;
+ rdfs:subPropertyOf dc:date ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Resource ;
+ rdfs:range xsd:dateTime .
+
+
diff --git a/tests/functional-tests/test-ontologies/property-range-string-to-date/90-tracker.ontology b/tests/functional-tests/test-ontologies/property-range-string-to-date/90-tracker.ontology
new file mode 100644
index 0000000..eef0cd4
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-string-to-date/90-tracker.ontology
@@ -0,0 +1,27 @@
+ prefix fts: <http://www.tracker-project.org/ontologies/fts#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+ prefix nie: <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#> .
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+tracker: a tracker:Ontology ;
+ nao:lastModified "2010-04-05T11:00:00Z" .
+
+#tracker:indexed a rdf:Property ;
+# nrl:maxCardinality 1 ;
+# rdfs:domain rdf:Property ;
+# rdfs:range xsd:boolean .
+
+tracker:notify a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdfs:Class ;
+ rdfs:range xsd:boolean .
+
+tracker:writeback a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain rdf:Property ;
+ rdfs:range xsd:boolean .
+
diff --git a/tests/functional-tests/test-ontologies/property-range-string-to-date/91-test.ontology b/tests/functional-tests/test-ontologies/property-range-string-to-date/91-test.ontology
new file mode 100644
index 0000000..ca3bad8
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-string-to-date/91-test.ontology
@@ -0,0 +1,66 @@
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix test: <http://example.org/ns#> .
+ prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+
+#
+# Note: If you modify this ontology remember to replicate the changes in the other
+# 91 ontologies
+#
+#
+# A (with props for string and int, string n-cardinality, )
+# / \
+# B C
+#
+test: a tracker:Namespace, tracker:Ontology ;
+ nao:lastModified "2010-03-24T11:00:04Z" ;
+ tracker:prefix "test" .
+
+test:A a rdfs:Class .
+
+# ****** TEST CHANGE *****
+test:a_string a rdf:Property ;
+ rdfs:comment "This is string in the original ontology, now date" ;
+ rdfs:domain test:A ;
+ rdfs:range xsd:dateTime ;
+ nrl:maxCardinality 1 .
+# *************************
+
+test:a_datetime a rdf:Property ;
+ rdfs:comment "Property to test the changes string/date" ;
+ rdfs:domain test:A ;
+ rdfs:range xsd:dateTime ;
+ nrl:maxCardinality 1 .
+
+test:a_int a rdf:Property ;
+ rdfs:comment "Property to test the changes string/int" ;
+ rdfs:domain test:A ;
+ rdfs:range xsd:integer ;
+ nrl:maxCardinality 1 .
+
+test:a_n_cardinality a rdf:Property ;
+ rdfs:comment "Property to test the cardinality changes" ;
+ rdfs:domain test:A ;
+ rdfs:range xsd:string .
+# Max cardinality N because is not specified
+
+test:a_superprop a rdf:Property ;
+ rdfs:comment "To use as superproperty and test the superproperty changes in the subprop." ;
+ rdfs:domain test:A ;
+ rdfs:range xsd:string .
+
+
+test:B a rdfs:Class ;
+ rdfs:subClassOf test:A .
+
+test:C a rdfs:Class ;
+ rdfs:subClassOf test:A .
+
+test:c_subprop a rdf:Property ;
+ rdfs:comment "To test changes in the superproperty" ;
+ rdfs:subPropertyOf test:a_superprop ;
+ rdfs:domain test:C ;
+ rdfs:range xsd:string .
diff --git a/tests/functional-tests/test-ontologies/property-range-string-to-date/Makefile.am b/tests/functional-tests/test-ontologies/property-range-string-to-date/Makefile.am
new file mode 100644
index 0000000..5ab6b65
--- /dev/null
+++ b/tests/functional-tests/test-ontologies/property-range-string-to-date/Makefile.am
@@ -0,0 +1,14 @@
+include $(top_srcdir)/Makefile.decl
+
+dateontodir = $(datadir)/tracker-tests/test-ontologies/property-range-string-to-date
+
+dateonto_DATA = \
+ 10-xsd.ontology \
+ 11-rdf.ontology \
+ 12-nrl.ontology \
+ 20-dc.ontology \
+ 31-nao.ontology \
+ 90-tracker.ontology \
+ 91-test.ontology
+
+EXTRA_DIST = $(dateonto_DATA)
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]