1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
/*
* Copyright (C) 2009, 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.
*/
#ifndef TRACKER_ONTOLOGY_MODEL_H
#define TRACKER_ONTOLOGY_MODEL_H
#include <glib.h>
G_BEGIN_DECLS
typedef struct _TrackerOntologyModel TrackerOntologyModel;
typedef struct {
gchar *classname;
gchar *shortname;
gchar *basename;
gchar *specification;
GList *superclasses;
GList *subclasses;
GList *in_domain_of;
GList *in_range_of;
gchar *description;
GList *instances;
gboolean notify;
gboolean deprecated;
} TrackerOntologyClass;
typedef struct {
gchar *propertyname;
gchar *shortname;
gchar *basename;
gchar *specification;
GList *domain;
GList *range;
GList *superproperties;
GList *subproperties;
gchar *max_cardinality;
gchar *description;
gboolean deprecated;
gboolean fulltextIndexed;
gchar *weight;
} TrackerOntologyProperty;
typedef struct {
gchar *title;
gchar *description;
GList *authors;
GList *editors;
GList *contributors;
gchar *gitlog;
gchar *upstream;
gchar *copyright;
gchar *baseUrl;
gchar *localPrefix;
gchar *relativePath;
} TrackerOntologyDescription;
TrackerOntologyModel * tracker_ontology_model_new (GFile *ontology_location,
GFile *description_location,
GError **error);
void tracker_ontology_model_free (TrackerOntologyModel *model);
GStrv tracker_ontology_model_get_prefixes (TrackerOntologyModel *model);
TrackerOntologyDescription * tracker_ontology_model_get_description (TrackerOntologyModel *model,
const gchar *prefix);
GList * tracker_ontology_model_list_classes (TrackerOntologyModel *model,
const gchar *prefix);
GList * tracker_ontology_model_list_properties (TrackerOntologyModel *model,
const gchar *prefix);
TrackerOntologyClass * tracker_ontology_model_get_class (TrackerOntologyModel *model,
const gchar *class_name);
TrackerOntologyProperty * tracker_ontology_model_get_property (TrackerOntologyModel *model,
const gchar *prop_name);
G_END_DECLS
#endif /* TRACKER_ONTOLOGY_MODEL_H */
|