[tracker] Ontology doc: Show full text index flag in the documentation
- From: Ivan Frade <ifrade src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Ontology doc: Show full text index flag in the documentation
- Date: Thu, 4 Mar 2010 13:13:08 +0000 (UTC)
commit 6dd2b2af3a2856db0ddde04ec433dd7513fa8141
Author: Ivan Frade <ivan frade nokia com>
Date: Thu Mar 4 13:29:26 2010 +0200
Ontology doc: Show full text index flag in the documentation
Show a message in the property description if it is full-text indexed.
docs/tools/ttl_loader.c | 14 ++++++++++++++
docs/tools/ttl_model.c | 1 +
docs/tools/ttl_model.h | 1 +
docs/tools/ttl_sgml.c | 5 +++++
4 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/docs/tools/ttl_loader.c b/docs/tools/ttl_loader.c
index d490925..59d178d 100644
--- a/docs/tools/ttl_loader.c
+++ b/docs/tools/ttl_loader.c
@@ -19,6 +19,7 @@
/* #define TRACKER_NAMESPACE "http://www.tracker-project.org/ontologies/tracker#Namespace" */
#define TRACKER_NS "http://www.tracker-project.org/ontologies/tracker#"
#define TRACKER_NOTIFY TRACKER_NS "notify"
+#define TRACKER_FTS_INDEXED TRACKER_NS "fulltextIndexed"
#define NAO_DEPRECATED "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated"
@@ -117,6 +118,19 @@ load_in_memory (Ontology *ontology,
def->notify = string_to_boolean (turtle_object);
+ } else if (!g_strcmp0 (turtle_predicate, TRACKER_FTS_INDEXED)) {
+ /*
+ * A tracker:fulltextIndexed TRUE
+ */
+ OntologyProperty *prop;
+
+ prop = g_hash_table_lookup (ontology->properties, turtle_subject);
+ if (!prop) {
+ g_error ("Something wrong");
+ }
+
+ prop->fulltextIndexed = string_to_boolean (turtle_object);
+
} else if (!g_strcmp0 (turtle_predicate, RDFS_COMMENT)) {
OntologyClass *klass;
OntologyProperty *prop;
diff --git a/docs/tools/ttl_model.c b/docs/tools/ttl_model.c
index 3510e2e..10edc5c 100644
--- a/docs/tools/ttl_model.c
+++ b/docs/tools/ttl_model.c
@@ -55,6 +55,7 @@ ttl_model_property_new (const gchar *propname)
prop->max_cardinality = NULL;
prop->description = NULL;
prop->deprecated = FALSE;
+ prop->fulltextIndexed = FALSE ;
return prop;
}
diff --git a/docs/tools/ttl_model.h b/docs/tools/ttl_model.h
index 927af44..9ab609e 100644
--- a/docs/tools/ttl_model.h
+++ b/docs/tools/ttl_model.h
@@ -27,6 +27,7 @@ typedef struct {
gchar *max_cardinality;
gchar *description;
gboolean deprecated;
+ gboolean fulltextIndexed;
} OntologyProperty;
typedef struct {
diff --git a/docs/tools/ttl_sgml.c b/docs/tools/ttl_sgml.c
index 093569c..cee666f 100644
--- a/docs/tools/ttl_sgml.c
+++ b/docs/tools/ttl_sgml.c
@@ -266,6 +266,11 @@ print_ontology_property (gpointer key, gpointer value, gpointer user_data)
print_variablelist_entry (f, "Cardinality", def->max_cardinality);
}
+ if (def->fulltextIndexed) {
+ print_variablelist_entry (f, "Text indexed",
+ "This property is indexed, so it can provide results on text search");
+ }
+
g_fprintf (f, "</variablelist>\n");
if (def->deprecated) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]