KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ozoneDB > xml > dom4j > o3impl > O3QNameCache


1 // You can redistribute this software and/or modify it under the terms of
2
// the Ozone Library License version 1 published by ozone-db.org.
3
//
4
// The original code and portions created by SMB are
5
// Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
6
//
7
// $Id: O3QNameCache.java,v 1.1 2003/07/14 12:51:31 per_nyfelt Exp $
8
package org.ozoneDB.xml.dom4j.o3impl;
9
10 import org.dom4j.Namespace;
11 import org.dom4j.QName;
12 import org.ozoneDB.OzoneInterface;
13 import org.ozoneDB.xml.dom4j.OzoneDocumentFactory;
14
15 import java.io.Serializable JavaDoc;
16
17 /**
18  *
19  * @author Per Nyfelt
20  */

21 public class O3QNameCache extends QNameCache implements Serializable JavaDoc {
22
23     final static long serialVersionUID = 1L;
24     protected transient OzoneInterface db;
25
26     public O3QNameCache(OzoneDocumentFactory documentFactory, OzoneInterface db) {
27         super(documentFactory);
28         setDatabase(db);
29         System.out.println(this.getClass() + " O3QNameCache constructor invoked");
30     }
31
32     public void setDatabase(OzoneInterface db) {
33         this.db = db;
34     }
35
36     protected QName createQName(String JavaDoc name) {
37         return O3QName.create(db, name);
38     }
39
40     protected QName createQName(String JavaDoc name, Namespace namespace) {
41         return O3QName.create(db, name, namespace);
42     }
43
44     protected QName createQName(String JavaDoc name, Namespace namespace, String JavaDoc qualifiedName) {
45         return O3QName.create(db, name, namespace, qualifiedName);
46     }
47
48 }
49
Popular Tags