annotate xul/content/rdfds.js @ 248:6b1d5d9f9aa0

servlet version 1.19b5 - filename and dpi in request - filename and dpi in dlInfo-*
author robcast
date Wed, 25 Aug 2004 01:06:30 +0200
parents 49cb8a445126
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
199
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
2 * The contents of this file are subject to the Mozilla Public
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
3 * License Version 1.1 (the "License"); you may not use this file
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
4 * except in compliance with the License. You may obtain a copy of
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
5 * the License at http://www.mozilla.org/MPL/
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
6 *
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
7 * Software distributed under the License is distributed on an "AS
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
8 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
9 * implied. See the License for the specific language governing
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
10 * rights and limitations under the License.
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
11 *
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
12 * The Original Code is rdfds
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
13 *
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
14 * The Initial Developer of the Original Code is Neil Deakin
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
15 * Portions created by Neil Deakin are Copyright (C) 2002 Neil Deakin.
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
16 * All Rights Reserved.
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
17 *
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
18 * Contributor(s):
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
19 */
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
20
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
21 /* This is a library for easier access to RDF datasources and resources.
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
22 * It contains four objects, RDFDataSource, RDFNode, RDFLiteral. and
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
23 * RDFEnumerator.
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
24 *
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
25 * An RDF DataSource is a graph of nodes and literals. The constructor
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
26 * for RDFDataSource takes one argument, a URI of an RDF file to use.
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
27 * If the URI exists, the contents of the RDF file are loaded. If it
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
28 * does not exist, resources can be added to it and then written using
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
29 * this save method. If the URL argument is null, a blank datasource
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
30 * is created.
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
31 *
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
32 * This library is designed for convenience not for efficiency.
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
33 *
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
34 * The API is documented at:
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
35 * http://www.xulplanet.com/tutorials/xultu/rdfds/
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
36 *
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
37 * Example:
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
38 *
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
39 * var ds=new RDFDataSource("file:///main/mozilla/mimtest.rdf");
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
40 * var node=ds.getNode("urn:xpimaker:packlist");
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
41 * var child=ds.getNode("urn:xpimaker:packlist:appinfo");
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
42 * child=node.addChild(child);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
43 * child.addTarget("http://www.xulplanet.com/rdf/xpimaker#appname","Find Files");
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
44 * ds.save();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
45 *
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
46 */
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
47
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
48 var RDFService = "@mozilla.org/rdf/rdf-service;1";
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
49 RDFService = Components.classes[RDFService].getService();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
50 RDFService = RDFService.QueryInterface(Components.interfaces.nsIRDFService);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
51
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
52 var RDFContainerUtilsService = "@mozilla.org/rdf/container-utils;1";
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
53 RDFContainerUtilsService = Components.classes[RDFContainerUtilsService].getService();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
54 RDFContainerUtilsService = RDFContainerUtilsService.QueryInterface(Components.interfaces.nsIRDFContainerUtils);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
55
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
56 /* RDFLoadObserver
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
57 * this object is necessary to listen to RDF files being loaded. The Init
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
58 * function should be called to initialize the callback when the RDF file is
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
59 * loaded.
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
60 */
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
61 function RDFLoadObserver(){}
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
62
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
63 RDFLoadObserver.prototype =
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
64 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
65 callback: null,
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
66 callbackDataSource: null,
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
67
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
68 Init: function(c,cDS){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
69 this.callback=c;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
70 this.callbackDataSource=cDS;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
71 },
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
72
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
73 QueryInterface: function(iid){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
74 if (iid.equals(Components.interfaces.nsIRDFXMLSinkObserver)) return this;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
75 else throw Components.results.NS_ERROR_NO_INTERFACE;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
76 },
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
77
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
78 onBeginLoad : function(sink){},
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
79 onInterrupt : function(sink){},
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
80 onResume : function(sink){},
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
81 onError : function(sink,status,msg){},
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
82
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
83 onEndLoad : function(sink){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
84 if (this.callback!=null) this.callback(this.callbackDataSource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
85 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
86 };
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
87
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
88 function RDFDataSource(uri,callbackFn)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
89 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
90 if (uri==null) this.datasource=null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
91 else this.load(uri,callbackFn);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
92 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
93
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
94 RDFDataSource.prototype.load=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
95 function(uri,callbackFn)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
96 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
97 if (uri.indexOf(":") == -1){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
98 var docurl=document.location.href;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
99 if (document.location.pathname == null) uri=docurl+"/"+uri;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
100 else uri=docurl.substring(0,docurl.lastIndexOf("/")+1)+uri;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
101 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
102
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
103 if (callbackFn == null){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
104 this.datasource=RDFService.GetDataSourceBlocking(uri);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
105 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
106 else {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
107 this.datasource=RDFService.GetDataSource(uri);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
108 var ds;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
109 try {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
110 var ds=this.datasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
111 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
112 catch (ex){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
113 callbackFn(this);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
114 return;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
115 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
116 if (ds.loaded){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
117 callbackFn(this);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
118 return;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
119 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
120
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
121 var packObserver=new RDFLoadObserver();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
122 packObserver.Init(callbackFn,this);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
123
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
124 var rawsource=this.datasource;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
125 rawsource=rawsource.QueryInterface(Components.interfaces.nsIRDFXMLSink);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
126 rawsource.addXMLSinkObserver(packObserver);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
127 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
128 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
129
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
130 RDFDataSource.prototype.Init=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
131 function (dsource)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
132 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
133 this.datasource=dsource;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
134 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
135
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
136 RDFDataSource.prototype.parseFromString=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
137 function (str,baseUri)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
138 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
139 if (this.datasource==null) this.makeemptyds();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
140 var ios=Components.classes["@mozilla.org/network/io-service;1"]
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
141 .getService(Components.interfaces.nsIIOService);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
142 baseUri=ios.newURI(baseUri,null,null);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
143 var xmlParser=Components.classes["@mozilla.org/rdf/xml-parser;1"]
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
144 .createInstance(Components.interfaces.nsIRDFXMLParser);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
145 xmlParser.parseString(this.datasource,baseUri,str);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
146 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
147
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
148 RDFDataSource.prototype.serializeToString=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
149 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
150 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
151 var outputStream = {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
152 data: "",
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
153 close : function(){},
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
154 flush : function(){},
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
155 write : function (buffer,count){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
156 this.data += buffer;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
157 return count;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
158 },
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
159 writeFrom : function (stream,count){},
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
160 isNonBlocking: false
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
161 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
162 this.serializeToStream(outputStream);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
163 return outputStream.data;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
164 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
165
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
166 RDFDataSource.prototype.serializeToStream=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
167 function (outputStream)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
168 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
169 var ser=Components.classes["@mozilla.org/rdf/xml-serializer;1"]
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
170 .createInstance(Components.interfaces.nsIRDFXMLSerializer);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
171 ser.init(this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
172 ser.QueryInterface(Components.interfaces.nsIRDFXMLSource).Serialize(outputStream);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
173 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
174
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
175 RDFDataSource.prototype.makeemptyds=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
176 function (uri)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
177 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
178 this.datasource=Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"]
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
179 .createInstance(Components.interfaces.nsIRDFDataSource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
180 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
181
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
182 RDFDataSource.prototype.getAllResources=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
183 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
184 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
185 if (this.datasource==null) return null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
186 return new RDFEnumerator(this.datasource.GetAllResources(),this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
187 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
188
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
189 RDFDataSource.prototype.getRawDataSource=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
190 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
191 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
192 if (this.datasource==null) this.makeemptyds();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
193 return this.datasource;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
194 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
195
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
196 RDFDataSource.prototype.getNode=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
197 function (uri)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
198 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
199 if (this.datasource==null) this.makeemptyds();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
200 var node=new RDFNode(uri,this);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
201 return node;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
202 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
203
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
204 RDFDataSource.prototype.getAnonymousNode=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
205 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
206 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
207 if (this.datasource==null) this.makeemptyds();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
208
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
209 var anon=RDFService.GetAnonymousResource();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
210 var node=new RDFNode();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
211 node.Init(anon,this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
212 return node;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
213 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
214
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
215 RDFDataSource.prototype.getLiteral=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
216 function (uri)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
217 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
218 if (this.datasource==null) this.makeemptyds();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
219
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
220 return new RDFLiteral(uri,this);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
221 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
222
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
223 RDFDataSource.prototype.refresh=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
224 function (sync)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
225 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
226 try {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
227 var ds=this.datasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
228 ds.Refresh(sync);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
229 return true;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
230 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
231 catch (ex){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
232 return false;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
233 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
234 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
235
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
236 RDFDataSource.prototype.save=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
237 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
238 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
239 try {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
240 var ds=this.datasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
241 ds.Flush();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
242 return true;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
243 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
244 catch (ex){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
245 return false;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
246 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
247 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
248
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
249 RDFDataSource.prototype.copyAllToDataSource=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
250 function (dsource2)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
251 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
252 if (this.datasource==null) this.makeemptyds();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
253 if (dsource2.datasource==null) dsource2.makeemptyds();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
254
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
255 var dsource1=this.datasource;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
256 dsource2=dsource2.datasource;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
257
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
258 var sourcelist=dsource1.GetAllResources();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
259 while(sourcelist.hasMoreElements()){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
260 var source=sourcelist.getNext();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
261 var props=dsource1.ArcLabelsOut(source);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
262 while(props.hasMoreElements()){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
263 var prop=props.getNext();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
264 prop=prop.QueryInterface(Components.interfaces.nsIRDFResource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
265 var target=dsource1.GetTarget(source,prop,true);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
266 if (target!=null) dsource2.Assert(source,prop,target,true);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
267 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
268 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
269 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
270
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
271 RDFDataSource.prototype.deleteRecursive=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
272 function (val)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
273 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
274 var node;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
275 var dsource=this.datasource;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
276
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
277 if (dsource==null) return;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
278
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
279 if (typeof val == "string") node=RDFService.GetResource(val);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
280 else node=val.source;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
281
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
282 this.deleteRecursiveH(dsource,node); // remove descendants
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
283
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
284 // remove the node itself
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
285 var props=dsource.ArcLabelsIn(node);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
286 while(props.hasMoreElements()){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
287 var prop=props.getNext();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
288 var source=dsource.GetSource(prop,node,true);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
289 dsource.Unassert(source,prop,node);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
290 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
291 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
292
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
293 RDFDataSource.prototype.deleteRecursiveH=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
294 function (dsource,node)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
295 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
296 var props=dsource.ArcLabelsOut(node);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
297 while(props.hasMoreElements()){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
298 var prop=props.getNext();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
299 var target=dsource.GetTarget(node,prop,true);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
300 try {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
301 target=target.QueryInterface(Components.interfaces.nsIRDFResource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
302 this.deleteRecursiveH(dsource,target);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
303 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
304 catch (e){}
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
305 dsource.Unassert(node,prop,target)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
306 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
307 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
308
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
309 function RDFNode(uri,dsource)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
310 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
311 if (uri==null) this.source=null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
312 else this.source=RDFService.GetResource(uri);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
313
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
314 if (dsource==null) this.datasource=null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
315 else this.datasource=dsource.datasource;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
316
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
317 this.container=null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
318 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
319
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
320 RDFNode.prototype.Init=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
321 function (source,dsource)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
322 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
323 this.source=source;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
324 this.datasource=dsource;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
325 this.container=null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
326 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
327
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
328 RDFNode.prototype.getValue=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
329 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
330 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
331 return this.source.Value;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
332 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
333
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
334 RDFNode.prototype.rlify=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
335 function (val)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
336 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
337 var res=null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
338
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
339 if (val!=null){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
340 try {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
341 val=val.QueryInterface(Components.interfaces.nsIRDFResource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
342 res=new RDFNode();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
343 res.Init(val,this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
344 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
345 catch (ex){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
346 try {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
347 val=val.QueryInterface(Components.interfaces.nsIRDFLiteral);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
348 res=new RDFLiteral();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
349 res.Init(val,this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
350 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
351 catch (ex2){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
352 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
353 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
354 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
355 return res;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
356 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
357
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
358 RDFNode.prototype.makeres=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
359 function (val)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
360 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
361 if (typeof val == "string") return RDFService.GetResource(val);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
362 else return val.source;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
363 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
364
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
365 RDFNode.prototype.makelit=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
366 function (val)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
367 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
368 if (typeof val == "string") return RDFService.GetLiteral(val);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
369 else return val.source;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
370 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
371
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
372 RDFNode.prototype.makecontain=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
373 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
374 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
375 if (this.container!=null) return true;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
376
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
377 var RDFContainer = '@mozilla.org/rdf/container;1';
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
378 RDFContainer = Components.classes[RDFContainer].createInstance();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
379 RDFContainer = RDFContainer.QueryInterface(Components.interfaces.nsIRDFContainer);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
380
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
381 try {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
382 RDFContainer.Init(this.datasource,this.source);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
383 this.container=RDFContainer;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
384 return true;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
385 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
386 catch (ex){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
387 return false;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
388 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
389 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
390
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
391 RDFNode.prototype.addTarget=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
392 function (prop,target)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
393 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
394 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
395 target=this.makelit(target);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
396 this.datasource.Assert(this.source,prop,target,true);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
397 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
398
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
399 RDFNode.prototype.addTargetOnce=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
400 function (prop,target)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
401 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
402 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
403 target=this.makelit(target);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
404
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
405 var oldtarget=this.datasource.GetTarget(this.source,prop,true);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
406 if (oldtarget!=null){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
407 this.datasource.Change(this.source,prop,oldtarget,target);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
408 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
409 else {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
410 this.datasource.Assert(this.source,prop,target,true);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
411 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
412 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
413
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
414 RDFNode.prototype.modifyTarget=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
415 function (prop,oldtarget,newtarget)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
416 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
417 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
418 oldtarget=this.makelit(oldtarget);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
419 newtarget=this.makelit(newtarget);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
420 this.datasource.Change(this.source,prop,oldtarget,newtarget);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
421 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
422
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
423 RDFNode.prototype.modifySource=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
424 function (prop,oldsource,newsource)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
425 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
426 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
427 oldsource=this.makeres(oldsource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
428 newsource=this.makeres(newsource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
429 this.datasource.Move(oldsource,newsource,prop,this.source);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
430 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
431
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
432 RDFNode.prototype.targetExists=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
433 function (prop,target)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
434 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
435 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
436 target=this.makelit(target);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
437 return this.datasource.HasAssertion(this.source,prop,target,true);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
438 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
439
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
440 RDFNode.prototype.removeTarget=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
441 function (prop,target)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
442 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
443 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
444 target=this.makelit(target);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
445 this.datasource.Unassert(this.source,prop,target);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
446 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
447
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
448 RDFNode.prototype.getProperties=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
449 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
450 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
451 return new RDFEnumerator(this.datasource.ArcLabelsOut(this.source),this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
452 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
453
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
454 RDFNode.prototype.getInProperties=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
455 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
456 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
457 return new RDFEnumerator(this.datasource.ArcLabelsIn(this.source),this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
458 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
459
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
460 RDFNode.prototype.propertyExists=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
461 function (prop)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
462 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
463 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
464 return this.datasource.hasArcOut(this.source,prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
465 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
466
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
467 RDFNode.prototype.inPropertyExists=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
468 function (prop)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
469 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
470 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
471 return this.datasource.hasArcIn(this.source,prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
472 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
473
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
474 RDFNode.prototype.getTarget=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
475 function (prop)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
476 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
477 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
478 return this.rlify(this.datasource.GetTarget(this.source,prop,true));
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
479 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
480
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
481 RDFNode.prototype.getSource=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
482 function (prop)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
483 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
484 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
485 var src=this.datasource.GetSource(prop,this.source,true);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
486 if (src==null) return null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
487 var res=new RDFNode();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
488 res.Init(src,this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
489 return res;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
490 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
491
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
492 RDFNode.prototype.getTargets=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
493 function (prop)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
494 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
495 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
496 return new RDFEnumerator(
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
497 this.datasource.GetTargets(this.source,prop,true),this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
498 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
499
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
500 RDFNode.prototype.getSources=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
501 function (prop)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
502 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
503 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
504 return new RDFEnumerator(
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
505 this.datasource.GetSources(prop,this.source,true),this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
506 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
507
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
508 RDFNode.prototype.makeBag=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
509 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
510 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
511 this.container=RDFContainerUtilsService.MakeBag(this.datasource,this.source);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
512 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
513
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
514 RDFNode.prototype.makeSeq=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
515 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
516 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
517 this.container=RDFContainerUtilsService.MakeSeq(this.datasource,this.source);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
518 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
519
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
520 RDFNode.prototype.makeAlt=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
521 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
522 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
523 this.container=RDFContainerUtilsService.MakeAlt(this.datasource,this.source);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
524 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
525
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
526 RDFNode.prototype.isBag=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
527 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
528 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
529 return RDFContainerUtilsService.isBag(this.datasource,this.source);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
530 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
531
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
532 RDFNode.prototype.isSeq=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
533 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
534 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
535 return RDFContainerUtilsService.isSeq(this.datasource,this.source);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
536 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
537
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
538 RDFNode.prototype.isAlt=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
539 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
540 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
541 return RDFContainerUtilsService.isAlt(dsource,this.source);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
542 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
543
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
544 RDFNode.prototype.isContainer=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
545 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
546 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
547 return RDFContainerUtilsService.IsContainer(this.datasource,this.source);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
548 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
549
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
550 RDFNode.prototype.getChildCount=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
551 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
552 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
553 if (this.makecontain()){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
554 return this.container.GetCount();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
555 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
556 return -1;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
557 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
558
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
559 RDFNode.prototype.getChildren=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
560 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
561 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
562 if (this.makecontain()){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
563 return new RDFEnumerator(this.container.GetElements(),this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
564 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
565 else return null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
566 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
567
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
568 RDFNode.prototype.addChild=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
569 function (child,exists)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
570 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
571 if (this.makecontain()){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
572 var childres=null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
573 if (typeof child == "string"){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
574 childres=RDFService.GetResource(child);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
575 child=new RDFNode();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
576 child.Init(childres,this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
577 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
578 else childres=child.source;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
579
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
580 if (!exists && this.container.IndexOf(childres)>=0) return child;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
581
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
582 this.container.AppendElement(childres);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
583 return child;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
584 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
585 else return null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
586 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
587
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
588 RDFNode.prototype.addChildAt=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
589 function (child,idx)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
590 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
591 if (this.makecontain()){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
592 var childres=null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
593 if (typeof child == "string"){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
594 childres=RDFService.GetResource(child);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
595 child=new RDFNode();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
596 child.Init(childres,this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
597 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
598 else childres=child.source;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
599 this.container.InsertElementAt(childres,idx,true);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
600 return child;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
601 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
602 else return null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
603 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
604
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
605 RDFNode.prototype.removeChild=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
606 function (child)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
607 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
608 if (this.makecontain()){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
609 var childres=null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
610 if (typeof child == "string"){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
611 childres=RDFService.GetResource(child);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
612 child=new RDFNode();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
613 child.Init(childres,this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
614 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
615 else childres=child.source;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
616 this.container.RemoveElement(childres,true);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
617 return child;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
618 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
619 else return null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
620 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
621
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
622 RDFNode.prototype.removeChildAt=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
623 function (idx)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
624 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
625 if (this.makecontain()){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
626 var childres=this.container.RemoveElementAt(idx,true);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
627 return this.rlify(childres);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
628 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
629 else return null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
630 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
631
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
632 RDFNode.prototype.getChildIndex=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
633 function (child)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
634 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
635 if (this.makecontain()){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
636 return this.container.IndexOf(child.source);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
637 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
638 else return -1;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
639 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
640
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
641 RDFNode.prototype.type="Node";
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
642
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
643
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
644 function RDFLiteral(val,dsource)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
645 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
646 if (val==null) this.source=null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
647 else this.source=RDFService.GetLiteral(val);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
648
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
649 if (dsource==null) this.datasource=null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
650 else this.datasource=dsource.datasource;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
651 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
652
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
653 RDFLiteral.prototype.Init=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
654 function (source,dsource)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
655 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
656 this.source=source;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
657 this.datasource=dsource;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
658 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
659
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
660 RDFLiteral.prototype.getValue=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
661 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
662 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
663 return this.source.Value;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
664 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
665
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
666 RDFLiteral.prototype.makeres=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
667 function (val)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
668 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
669 if (typeof val == "string") return RDFService.GetResource(val);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
670 else return val.source;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
671 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
672
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
673 RDFLiteral.prototype.makelit=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
674 function (val)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
675 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
676 if (typeof val == "string") return RDFService.GetLiteral(val);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
677 else return val.source;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
678 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
679
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
680 RDFLiteral.prototype.modifySource=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
681 function (prop,oldsource,newsource)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
682 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
683 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
684 oldsource=this.makeres(oldsource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
685 newsource=this.makeres(newsource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
686 this.datasource.Move(oldsource,newsource,prop,this.source);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
687 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
688
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
689 RDFLiteral.prototype.getInProperties=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
690 function (prop)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
691 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
692 return new RDFEnumerator(this.datasource.ArcLabelsIn(this.source),this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
693 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
694
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
695 RDFLiteral.prototype.inPropertyExists=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
696 function (prop)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
697 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
698 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
699 return this.datasource.hasArcIn(this.source,prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
700 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
701
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
702 RDFLiteral.prototype.getSource=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
703 function (prop)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
704 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
705 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
706 var src=this.datasource.GetSource(prop,this.source,true);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
707 if (src==null) return null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
708 var res=new RDFNode();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
709 res.Init(src,this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
710 return res;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
711 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
712
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
713 RDFLiteral.prototype.getSources=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
714 function (prop)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
715 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
716 prop=this.makeres(prop);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
717 return new RDFEnumerator(
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
718 this.datasource.GetSources(prop,this.source,true),this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
719 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
720
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
721 RDFLiteral.prototype.type="Literal";
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
722
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
723
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
724 function RDFEnumerator(enumeration,dsource)
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
725 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
726 this.enumeration=enumeration;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
727 this.datasource=dsource;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
728 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
729
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
730 RDFEnumerator.prototype.hasMoreElements=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
731 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
732 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
733 return this.enumeration.hasMoreElements();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
734 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
735
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
736 RDFEnumerator.prototype.getNext=
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
737 function ()
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
738 {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
739 var res=null;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
740 var val=this.enumeration.getNext();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
741
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
742 if (val!=null){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
743 try {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
744 val=val.QueryInterface(Components.interfaces.nsIRDFResource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
745 res=new RDFNode();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
746 res.Init(val,this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
747 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
748 catch (ex){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
749 try {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
750 val=val.QueryInterface(Components.interfaces.nsIRDFLiteral);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
751 res=new RDFLiteral();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
752 res.Init(val,this.datasource);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
753 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
754 catch (ex2){
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
755 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
756 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
757 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
758 return res;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
759 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
760