Merge lp:~zeitgeist/zeitgeist/bb-symbol into lp:~zeitgeist/zeitgeist/bluebird

Proposed by Seif Lotfy
Status: Merged
Merge reported by: Siegfried Gevatter
Merged at revision: not available
Proposed branch: lp:~zeitgeist/zeitgeist/bb-symbol
Merge into: lp:~zeitgeist/zeitgeist/bluebird
Diff against target: 77 lines (+62/-0)
2 files modified
src/Makefile.am (+1/-0)
src/ontology.vala (+61/-0)
To merge this branch: bzr merge lp:~zeitgeist/zeitgeist/bb-symbol
Reviewer Review Type Date Requested Status
Zeitgeist Framework Team Pending
Review via email: mp+69837@code.launchpad.net

Description of the change

adding ontology class with a Symbols class

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Makefile.am'
2--- src/Makefile.am 2011-07-28 18:41:01 +0000
3+++ src/Makefile.am 2011-07-29 17:12:35 +0000
4@@ -25,6 +25,7 @@
5 constants.vala \
6 errors.vala \
7 table-lookup.vala \
8+ ontology.vala \
9 $(NULL)
10
11 bluebird_LDADD = \
12
13=== added file 'src/ontology.vala'
14--- src/ontology.vala 1970-01-01 00:00:00 +0000
15+++ src/ontology.vala 2011-07-29 17:12:35 +0000
16@@ -0,0 +1,61 @@
17+/* datamodel.vala
18+ *
19+ * Copyright © 2011 Collabora Ltd.
20+ * By Seif Lotfy <seif@lotfy.com>
21+ *
22+ * This program is free software: you can redistribute it and/or modify
23+ * it under the terms of the GNU Lesser General Public License as published by
24+ * the Free Software Foundation, either version 2.1 of the License, or
25+ * (at your option) any later version.
26+ *
27+ * This program is distributed in the hope that it will be useful,
28+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
29+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30+ * GNU General Public License for more details.
31+ *
32+ * You should have received a copy of the GNU Lesser General Public License
33+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
34+ *
35+ */
36+
37+public class Symbol
38+{
39+ private HashTable<string, Symbol> children;
40+ public HashTable<string, Symbol> allChildren;
41+ public string name { get; private set; }
42+ public string uri { get; private set; }
43+ public string displayName { get; private set; }
44+ public string doc { get; private set; }
45+
46+ public Symbol(string uri, string name, string displayName, string doc){
47+ this.name = name;
48+ this.uri = uri;
49+ this.displayName = displayName;
50+ this.doc = doc;
51+ }
52+
53+ public GenericArray<Symbol> get_parents()
54+ {
55+ return new GenericArray<Symbol>();
56+ }
57+
58+ public GenericArray<Symbol> get_children()
59+ {
60+ return new GenericArray<Symbol>();
61+ }
62+
63+ public GenericArray<Symbol> get_all_children()
64+ {
65+ return new GenericArray<Symbol>();
66+ }
67+
68+ public bool is_a(Symbol symbol)
69+ {
70+ return true;
71+ }
72+
73+ public string to_string()
74+ {
75+ return this.uri;
76+ }
77+}

Subscribers

People subscribed via source and target branches