KickJava   Java API By Example, From Geeks To Geeks.

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


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: O3NamespaceCache.java,v 1.1 2003/11/02 18:10:03 per_nyfelt Exp $
8

9 package org.ozoneDB.xml.dom4j.o3impl;
10
11 import org.dom4j.Namespace;
12 import org.ozoneDB.OzoneInterface;
13
14 import java.io.Serializable JavaDoc;
15
16 /**
17  * Ozone wrapper for the DOM4J O3NamespaceCache
18  *
19  * @author Per Nyfelt
20  */

21 public class O3NamespaceCache extends NamespaceCacheImpl implements Serializable JavaDoc {
22
23     final static long serialVersionUID = 1L;
24
25     private transient OzoneInterface db;
26
27     public O3NamespaceCache(OzoneInterface db) {
28         setDatabase(db);
29     }
30
31     public void setDatabase(OzoneInterface db) {
32         this.db = db;
33     }
34
35     /** A factory method to create {@link org.dom4j.tree.AbstractNamespace} instances
36      * @return a newly created {@link org.dom4j.tree.AbstractNamespace} instance.
37      */

38     protected Namespace createNamespace(String JavaDoc prefix, String JavaDoc uri) {
39         //return documentFactory.createNamespace(prefix, uri);
40
return O3Namespace.create(db, prefix, uri);
41     }
42 }
43
Popular Tags