source: branches/ant-install-branch/gsdl3/src/java/org/greenstone/gsdl3/collection/ServiceCluster.java@ 9798

Last change on this file since 9798 was 9798, checked in by kjdon, 19 years ago

for all the converter.getDOM calls, now check for null document before using it - hopefully avoid lots of the exceptions that get printed to the screen if something goes wrong

  • Property svn:keywords set to Author Date Id Revision
File size: 22.3 KB
Line 
1/*
2 * ServiceCluster.java
3 * Copyright (C) 2002 New Zealand Digital Library, http://www.nzdl.org
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19// leave the package name as is for now - should be changed to something better
20// cluster? groups?
21package org.greenstone.gsdl3.collection;
22
23
24import org.greenstone.gsdl3.util.*;
25import org.greenstone.gsdl3.core.*;
26import org.greenstone.gsdl3.service.*;
27
28// java XML classes we're using
29import org.w3c.dom.Document;
30import org.w3c.dom.Node;
31import org.w3c.dom.Element;
32import org.w3c.dom.NodeList;
33
34import java.io.File;
35import java.util.HashMap;
36
37/* ServiceCluster - a groups of services that are related in some way
38 * Implements ModuleInterface. Contains a list of services provided by the cluster, along with metadata about the cluster itself.
39 * a collection is a special type of cluster
40 * @author <a href="mailto:[email protected]">Katherine Don</a>
41 * @version $Revision: 9798 $
42 * @see ModuleInterface
43 */
44public class ServiceCluster
45 implements ModuleInterface {
46
47 protected static final String CONFIG_ENCODING = "utf-8";
48
49 protected static final String DEFAULT_LANG = "en"; // hack for now, should be read from the coll cfg file? or site cfg file for cluster
50
51 /** base directory for the site that this cluster belongs to*/
52 protected String site_home = null;
53 /** http address of the site that this cluster belongs to */
54 protected String site_http_address = null;
55 /** The name of the cluster - for a collection, this is the collection name*/
56 protected String cluster_name = null;
57
58 /** a reference to the message router */
59 protected MessageRouter router = null;
60 /** The map of services.
61 *
62 * Maps Services to ServiceRack objects
63 * @see ServiceRack
64 *
65 */
66 protected HashMap service_map=null;
67 /** maps pseudo service names to real service names - needed if we have two services with the same name for one collection */
68 protected HashMap service_name_map=null;
69
70 /** XML converter for String to DOM and vice versa */
71 protected XMLConverter converter=null;
72
73 /** container doc for description elements */
74 protected Document doc = null;
75 /** list of services */
76 protected Element service_list = null;
77 /** list of metadata - all metadata, regardless of language goes in here */
78 protected Element metadata_list = null;
79 /** language specific stuff */
80 //protected Element lang_specific_metadata_list = null;
81 protected Element display_item_list = null;
82 /** the element that will have any descriptions passed back in */
83 protected Element description = null;
84
85 public void setSiteHome(String home) {
86 this.site_home = home;
87 }
88
89 public void setSiteAddress(String address) {
90 this.site_http_address = address;
91 }
92
93 public void setClusterName(String name) {
94 this.cluster_name = name;
95 this.description.setAttribute(GSXML.NAME_ATT, name);
96 }
97
98 public void setMessageRouter(MessageRouter m) {
99 this.router = m;
100 }
101
102 public ServiceCluster() {
103 this.service_map = new HashMap();
104 this.service_name_map = new HashMap();
105 this.converter = new XMLConverter();
106 this.doc = this.converter.newDOM();
107 this.description = this.doc.createElement(GSXML.CLUSTER_ELEM);
108 this.display_item_list = this.doc.createElement(GSXML.DISPLAY_TEXT_ELEM+GSXML.LIST_MODIFIER);
109 this.metadata_list = this.doc.createElement(GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER);
110 }
111
112 /**
113 * Configures the cluster.
114 *
115 * gsdlHome and clusterName must be set before configure is called.
116 *
117 * reads the site configuration file, and configures itself
118 * this calls configure(Element) with the XML element node from the config
119 * file.
120 * configure(Element) should be used if the config file has already been
121 * parsed. This method will work with any subclass.
122 *
123 * @return true if configure successful, false otherwise.
124 */
125 public boolean configure() {
126
127 if (this.site_home == null || this.cluster_name== null) {
128 System.err.println("ServiceCluster: site_home and cluster_name must be set before configure called!");
129 return false;
130 }
131 System.out.println("configuring service cluster");
132 // read the site configuration file
133 File config_file = new File(GSFile.siteConfigFile(this.site_home));
134
135 if (!config_file.exists()) {
136 System.err.println("ServiceCluster: couldn't configure cluster: "+this.cluster_name +", "+config_file+" does not exist");
137 return false;
138 }
139
140 Document doc = this.converter.getDOM(config_file, CONFIG_ENCODING);
141 if (doc == null) {
142 System.err.println("ServiceCluster: couldn't parse config file "+config_file.getPath());
143 return false;
144 }
145
146 // get the appropriate service cluster element
147 Element cluster_list = (Element)GSXML.getChildByTagName(doc.getDocumentElement(), GSXML.CLUSTER_ELEM+GSXML.LIST_MODIFIER);
148 Element sc = GSXML.getNamedElement(cluster_list, GSXML.CLUSTER_ELEM,
149 GSXML.NAME_ATT, this.cluster_name);
150
151 return this.configure(sc);
152 }
153
154
155 public boolean configure(Element service_cluster_info) {
156
157 // get the metadata - for now just add it to the list
158 Element meta_list = (Element) GSXML.getChildByTagName(service_cluster_info, GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER);
159 if (meta_list !=null) {
160 if (!addMetadata(meta_list)) {
161
162 System.err.println("ServiceCluster: couldn't configure the metadata");
163 }
164 }
165
166 // get the display info
167 Element display_list = (Element) GSXML.getChildByTagName(service_cluster_info, GSXML.DISPLAY_TEXT_ELEM+GSXML.LIST_MODIFIER);
168 if (display_list !=null) {
169 if (!addDisplayItems(display_list)) {
170
171 System.err.println("ServiceCluster: couldn't configure the display items");
172 }
173 }
174
175
176 // do the service racks
177 Element service_rack_list = (Element)GSXML.getChildByTagName(service_cluster_info, GSXML.SERVICE_CLASS_ELEM+GSXML.LIST_MODIFIER);
178 if (service_rack_list == null) {
179 // is this an error? could you ever have a service cluster
180 // without service racks???
181 System.err.println("ServiceCluster: cluster has no service racks!!");
182 } else {
183
184 if (!configureServiceRack(service_rack_list, null)) {
185 System.err.println("ServiceCluster: couldn't configure the service racks!!");
186 return false;
187 }
188 }
189
190 return true;
191 }
192
193 /** adds metadata from a metadataList into the metadata_list xml
194 */
195 protected boolean addMetadata(Element metadata_list) {
196 if (metadata_list == null) return false;
197 NodeList metanodes = metadata_list.getElementsByTagName(GSXML.METADATA_ELEM);
198 if (metanodes.getLength()>0) {
199 for(int k=0; k<metanodes.getLength(); k++) {
200 this.metadata_list.appendChild(this.doc.importNode(metanodes.item(k), true));
201 }
202 }
203
204 return true;
205 }
206
207 protected boolean addDisplayItems(Element display_list) {
208
209 if (display_list==null) return false;
210 NodeList displaynodes = display_list.getElementsByTagName(GSXML.DISPLAY_TEXT_ELEM);
211 if (displaynodes.getLength()>0) {
212 for(int k=0; k<displaynodes.getLength(); k++) {
213 Element d = (Element) displaynodes.item(k);
214 String lang = d.getAttribute(GSXML.LANG_ATT);
215 if (lang==null||lang.equals("")) {
216 //set the lang to teh default
217 d.setAttribute(GSXML.LANG_ATT, DEFAULT_LANG);
218 }
219 String name = d.getAttribute(GSXML.NAME_ATT);
220 Element this_item = GSXML.getNamedElement(this.display_item_list, GSXML.DISPLAY_TEXT_ELEM, GSXML.NAME_ATT, name);
221 if (this_item==null) {
222 this_item = this.doc.createElement(GSXML.DISPLAY_TEXT_ELEM);
223 this_item.setAttribute(GSXML.NAME_ATT, name);
224 this.display_item_list.appendChild(this_item);
225 }
226
227 this_item.appendChild(this.doc.importNode(d, true));
228
229
230 }
231 }
232
233 return true;
234 }
235
236 /** creates and configures all the services - extra_info is some more xml
237that is passed to teh service - eg used for coll config files for Collection
238 */
239 protected boolean configureServiceRack(Element service_rack_list,
240 Element extra_info) {
241
242 // empty the service map in case this is a reconfigure
243 service_map.clear();
244 this.service_list = this.doc.createElement(GSXML.SERVICE_ELEM+GSXML.LIST_MODIFIER);
245
246 // create all the services
247 NodeList nodes = service_rack_list.getElementsByTagName(GSXML.SERVICE_CLASS_ELEM);
248 if (nodes.getLength()==0) {
249 System.err.println("ServiceCluster configuration error: cluster "+this.cluster_name+" has no service modules!");
250 return false;
251 }
252
253 for(int i=0; i<nodes.getLength(); i++) {
254
255 // the xml request to send to the serviceRack to query what
256 // services it provides
257 Element message = this.doc.createElement(GSXML.MESSAGE_ELEM);
258 Element request = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_DESCRIBE, "", "", "");
259 message.appendChild(request);
260
261 Element n = (Element)nodes.item(i);
262 String servicetype = n.getAttribute(GSXML.NAME_ATT);
263
264 try {
265 ServiceRack s = (ServiceRack)Class.forName("org.greenstone.gsdl3.service."+servicetype).newInstance();
266
267 s.setSiteHome(this.site_home);
268 s.setSiteAddress(this.site_http_address);
269 s.setClusterName(this.cluster_name);
270 s.setMessageRouter(this.router);
271 // pass the xml node to the service for configuration
272 if (s.configure(n, extra_info)) {
273
274 // find out the supported service types for this service module
275 Node types = s.process(message);
276 NodeList typenodes = ((Element)types).getElementsByTagName(GSXML.SERVICE_ELEM);
277
278 for (int j=0; j<typenodes.getLength();j++) {
279 String service = ((Element) typenodes.item(j)).getAttribute(GSXML.NAME_ATT);
280 if (service_map.get(service)!=null) {
281 char extra = '0';
282 String new_service = service+extra;
283
284 while (service_map.get(new_service)!=null) {
285 extra++;
286 new_service = service+extra;
287 }
288 this.service_name_map.put(new_service, service);
289 service=new_service;
290 ((Element) typenodes.item(j)).setAttribute(GSXML.NAME_ATT, service);
291 }
292 this.service_map.put(service, s);
293 // also add info to the ServiceInfo XML element
294 this.service_list.appendChild(this.doc.importNode(typenodes.item(j), true));
295 }
296 }
297 } catch (Exception e) {
298 System.err.println("ServiceCluster Error: configure exception: couldn't create service module:org.greenstone.gsdl3.service."+servicetype+"\n"+e.getMessage() + e.getClass() );
299 e.printStackTrace();
300 //return false;
301 }
302
303 }
304 return true;
305
306
307 }
308
309
310 /**
311 * Process an XML document - uses Strings
312 * just calls process(Node).
313 *
314 * @param in the Document to process - a string
315 * @return the resultant document as a string - contains any error messages
316 * @see String
317 */
318 public String process(String in) {
319
320 Document doc = this.converter.getDOM(in);
321 Element e = doc.getDocumentElement();
322
323 Element res = process(e);
324 return this.converter.getString(res);
325
326 }
327
328 /** process XML as Node
329 *
330 */
331 public Element process(Element message) {
332
333 NodeList requests = message.getElementsByTagName(GSXML.REQUEST_ELEM);
334 Document mess_doc = message.getOwnerDocument();
335 Element mainResult = this.doc.createElement(GSXML.MESSAGE_ELEM);
336 if (requests.getLength()==0) {
337 System.err.println("ServiceCluster.process: no requests for cluster:"+this.cluster_name);
338 // no requests
339 return mainResult; // for now
340 }
341 for (int i=0; i<requests.getLength(); i++) {
342 Element request = (Element)requests.item(i);
343 String to = request.getAttribute(GSXML.TO_ATT);
344
345 // the cluster name should be first, check, then remove
346 String clustername = GSPath.getFirstLink(to);
347 if (!clustername.equals(this.cluster_name)){
348 System.err.println("ServiceCluster Error: cluster name wrong! was "+clustername+" should have been "+this.cluster_name);
349 continue; // ignore this request
350 }
351 to = GSPath.removeFirstLink(to);
352 request.setAttribute(GSXML.TO_ATT, to);
353
354 if (to.equals("")) { // this command is for me
355 Element response = processMessage(request);
356 mainResult.appendChild(response);
357
358 } else { // the request is for one of my services
359 String service = GSPath.getFirstLink(to);
360
361 if (!this.service_map.containsKey(service)) {
362 System.err.println("ServiceCluster Error: non-existant service, "+service+", specified!");
363 continue;
364 }
365 String real_service = service;
366 if (this.service_name_map.containsKey(service)) {
367 real_service = (String)this.service_name_map.get(service);
368 // need to change the to att in the request - give the real service name
369 to = request.getAttribute(GSXML.TO_ATT);
370 String old_to = to;
371 to = GSPath.replaceFirstLink(to, real_service);
372 request.setAttribute(GSXML.TO_ATT, to);
373 }
374 // have to pass the request to the service
375 Element single_message = mess_doc.createElement(GSXML.MESSAGE_ELEM);
376 single_message.appendChild(request);
377 Element response_message = ((ModuleInterface)this.service_map.get(service)).process(single_message);
378 if (response_message != null) {
379 Element response = (Element) GSXML.getChildByTagName(response_message, GSXML.RESPONSE_ELEM);
380 String from = response.getAttribute(GSXML.FROM_ATT);
381 if (!real_service.equals(service)) {
382 // replace the real service name with the pseudo service name
383 from = GSPath.replaceFirstLink(from, service);
384 // also need to do it in the service itself
385 // shoudl this be done here??
386 Element service_elem = (Element) GSXML.getChildByTagName(response, GSXML.SERVICE_ELEM);
387 if (service_elem!= null) {
388 service_elem.setAttribute(GSXML.NAME_ATT, service);
389 }
390 }
391 from = GSPath.prependLink(from, this.cluster_name);
392 response.setAttribute(GSXML.FROM_ATT, from);
393 mainResult.appendChild(this.doc.importNode(response, true));
394 }
395
396 } // else
397
398
399 } // for each request
400 return mainResult;
401 }
402
403 /** handles requests made to the ServiceCluster itself
404 *
405 * @param req - the request Element- <request>
406 * @return the result Element - should be <response>
407 */
408 protected Element processMessage(Element request) {
409
410 Element response = this.doc.createElement(GSXML.RESPONSE_ELEM);
411 response.setAttribute(GSXML.FROM_ATT, this.cluster_name);
412 String type = request.getAttribute(GSXML.TYPE_ATT);
413 String lang = request.getAttribute(GSXML.LANG_ATT);
414 response.setAttribute(GSXML.TYPE_ATT, type);
415
416 if (type.equals(GSXML.REQUEST_TYPE_DESCRIBE)) {
417 // create the collection element
418 Element description = (Element)this.description.cloneNode(false);
419 response.appendChild(description);
420 // check the param list
421 Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
422 if (param_list == null) {
423 addAllDisplayInfo(description, lang);
424 description.appendChild(this.service_list);
425 description.appendChild(this.metadata_list);
426 return response;
427 }
428
429 // go through the param list and see what components are wanted
430 NodeList params = param_list.getElementsByTagName(GSXML.PARAM_ELEM);
431 for (int i=0; i<params.getLength(); i++) {
432
433 Element param = (Element)params.item(i);
434 // Identify the structure information desired
435 if (param.getAttribute(GSXML.NAME_ATT).equals(GSXML.SUBSET_PARAM)) {
436 String info = param.getAttribute(GSXML.VALUE_ATT);
437 if (info.equals(GSXML.SERVICE_ELEM+GSXML.LIST_MODIFIER)) {
438 description.appendChild(this.service_list);
439 } else if (info.equals(GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER)) {
440 description.appendChild(metadata_list);
441 } else if (info.equals(GSXML.DISPLAY_TEXT_ELEM+GSXML.LIST_MODIFIER)) {
442 addAllDisplayInfo(description, lang);
443
444 }
445 }
446 }
447 return response;
448 }
449
450 if (type.equals(GSXML.REQUEST_TYPE_SYSTEM)) {
451 response = processSystemRequest(request);
452 } else { // unknown type
453 System.err.println("ServiceCluster Error: cant handle request of type "+ type);
454
455 }
456 return response;
457 }
458
459 protected Element processSystemRequest(Element request) {
460
461 Element response = this.doc.createElement(GSXML.RESPONSE_ELEM);
462 response.setAttribute(GSXML.FROM_ATT, this.cluster_name);
463 response.setAttribute(GSXML.TYPE_ATT, GSXML.REQUEST_TYPE_SYSTEM);
464
465 // a list of system requests - should put any error messages
466 // or success messages into response
467 NodeList commands = request.getElementsByTagName(GSXML.SYSTEM_ELEM);
468 String message=null;
469 for (int i=0; i<commands.getLength(); i++) {
470 // all the commands should be Elements
471 Element elem = (Element)commands.item(i);
472 String action = elem.getAttribute(GSXML.TYPE_ATT);
473 if (action.equals(GSXML.SYSTEM_TYPE_CONFIGURE)) {
474 String subset = elem.getAttribute(GSXML.SYSTEM_SUBSET_ATT);
475 if (subset.equals("")) {
476 // need to reconfigure the service cluster
477
478 if (this.configure()) {
479 Element s = GSXML.createTextElement(this.doc, GSXML.STATUS_ELEM, this.cluster_name + " reconfigured");
480 response.appendChild(s);
481
482 } else {
483 Element s = GSXML.createTextElement(this.doc, GSXML.STATUS_ELEM, this.cluster_name + " could not be reconfigured");
484 response.appendChild(s);
485 }
486 } else if (this.configureSubset(subset)) {
487 Element s = GSXML.createTextElement(this.doc, GSXML.STATUS_ELEM, this.cluster_name + " "+subset+" reconfigured");
488 response.appendChild(s);
489 } else {
490 Element s = GSXML.createTextElement(this.doc, GSXML.STATUS_ELEM, this.cluster_name + " "+subset + " could not be reconfigured");
491 response.appendChild(s);
492 }
493 continue;
494 } // configure action
495
496 String module_name = elem.getAttribute(GSXML.SYSTEM_MODULE_NAME_ATT);
497 String module_type = elem.getAttribute(GSXML.SYSTEM_MODULE_TYPE_ATT);
498 if (action.equals(GSXML.SYSTEM_TYPE_ACTIVATE)) {
499 Element s = GSXML.createTextElement(this.doc, GSXML.STATUS_ELEM, "activate action not yet implemented - does it even make sense in this context??");
500 response.appendChild(s);
501 } else if (action.equals(GSXML.SYSTEM_TYPE_DEACTIVATE)) {
502 if (module_type.equals(GSXML.SERVICE_ELEM)) {
503 // deactivate the service
504 // remove from service_map
505 this.service_map.remove(module_name);
506 Element service_elem = GSXML.getNamedElement(this.service_list, GSXML.SERVICE_ELEM, GSXML.NAME_ATT, module_name);
507 service_list.removeChild(service_elem);
508 message = module_type+": "+module_name+" deactivated";
509 } else {
510 message = "can't deactivate "+module_type+" type modules!";}
511 Element s = GSXML.createTextElement(this.doc, GSXML.STATUS_ELEM, message);
512 response.appendChild(s);
513 } else {
514 System.err.println("ServiceCluster: cant process system request, action "+action);
515 continue;
516 }
517 } // for each command
518 return response;
519 }
520
521 /**
522 * do a configure on only part of the collection
523 */
524 protected boolean configureSubset(String subset) {
525
526 File configFile = new File(GSFile.siteConfigFile(this.site_home));
527 if (!configFile.exists() ) {
528 System.err.println("ServiceCluster: site config file: "+configFile.getPath()+" not found!");
529 // wont be able to do any of the requests
530 return false;
531
532 }
533
534 Document site_config_doc = this.converter.getDOM(configFile);
535 if (site_config_doc == null) {
536 System.err.println("ServiceCluster: could not read in site config file: "+configFile.getPath());
537 return false;
538 }
539
540 Element site_config_elem = site_config_doc.getDocumentElement();
541 Element cluster_config_elem = GSXML.getNamedElement((Element)GSXML.getChildByTagName(site_config_elem, GSXML.CLUSTER_ELEM+GSXML.LIST_MODIFIER), GSXML.CLUSTER_ELEM, GSXML.NAME_ATT, this.cluster_name);
542 if (cluster_config_elem == null) {
543 System.err.println("ServiceCluster: site config file: "+configFile.getPath()+" has no element for cluster "+this.cluster_name);
544 // wont be able to do any of teh requests
545 return false;
546
547 }
548 if (subset.equals(GSXML.SERVICE_ELEM+GSXML.LIST_MODIFIER)) {
549 Element service_rack_list = (Element)GSXML.getChildByTagName(cluster_config_elem, GSXML.SERVICE_CLASS_ELEM+GSXML.LIST_MODIFIER);
550
551 return configureServiceRack(service_rack_list, null);
552 } else if (subset.equals(GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER)) {
553 this.metadata_list = this.doc.createElement(GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER);
554 Element metadata_list = (Element)GSXML.getChildByTagName(cluster_config_elem, GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER);
555 return addMetadata(metadata_list);
556 } else {
557 System.err.println("ServiceCluster: cant process system request, configure "+subset);
558 return false;
559 }
560
561 }
562
563
564 protected boolean addAllDisplayInfo(Element description, String lang) {
565
566 NodeList items = this.display_item_list.getChildNodes();
567 for (int i=0; i<items.getLength(); i++) { // for each key
568 Element m = (Element) items.item(i);
569 // find the child with the correct language
570 Element new_m = GSXML.getNamedElement(m, GSXML.DISPLAY_TEXT_ELEM, GSXML.LANG_ATT, lang);
571 if (new_m==null && lang != DEFAULT_LANG) {
572 // use the default lang
573 new_m = GSXML.getNamedElement(m, GSXML.DISPLAY_TEXT_ELEM, GSXML.LANG_ATT, DEFAULT_LANG);
574 }
575 if (new_m==null) {
576 // just get the first one
577 new_m = (Element)GSXML.getChildByTagName(m, GSXML.DISPLAY_TEXT_ELEM);
578 }
579 description.appendChild(new_m.cloneNode(true));
580 }
581 return true;
582
583 }
584
585
586 protected Element getDisplayTextElement(String key, String lang) {
587
588 Element this_item = GSXML.getNamedElement(this.display_item_list, GSXML.DISPLAY_TEXT_ELEM, GSXML.NAME_ATT, key);
589 if (this_item == null) {
590 return null;
591 }
592
593 Element this_lang = GSXML.getNamedElement(this_item, GSXML.DISPLAY_TEXT_ELEM, GSXML.LANG_ATT, lang);
594 if (this_lang == null && lang != DEFAULT_LANG) {
595 // try the default
596 this_lang = GSXML.getNamedElement(this_item, GSXML.DISPLAY_TEXT_ELEM, GSXML.LANG_ATT, DEFAULT_LANG);
597 }
598 if (this_lang == null) {
599 // just return the first one
600 return (Element)this_item.getFirstChild().cloneNode(true);
601 }
602 return (Element)this_lang.cloneNode(true);
603
604 }
605}
606
607
608
609
610
611
Note: See TracBrowser for help on using the repository browser.