KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > velocity > anakia > AnakiaJDOMFactory


1 package org.apache.velocity.anakia;
2
3 /*
4  * Copyright 2001,2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 import org.jdom.Element;
20 import org.jdom.Namespace;
21 import org.jdom.input.DefaultJDOMFactory;
22
23 /**
24  * A customized JDOMFactory for Anakia that produces {@link AnakiaElement}
25  * instances instead of ordinary JDOM {@link Element} instances.
26  *
27  * @author <a HREF="mailto:szegedia@freemail.hu">Attila Szegedi</a>
28  * @version $Id: AnakiaJDOMFactory.java,v 1.2.8.1 2004/03/03 23:22:04 geirm Exp $
29  */

30 public class AnakiaJDOMFactory extends DefaultJDOMFactory
31 {
32     public AnakiaJDOMFactory()
33     {
34     }
35
36     public Element element(String JavaDoc name, Namespace namespace)
37     {
38         return new AnakiaElement(name, namespace);
39     }
40
41     public Element element(String JavaDoc name)
42     {
43         return new AnakiaElement(name);
44     }
45
46     public Element element(String JavaDoc name, String JavaDoc uri)
47     {
48         return new AnakiaElement(name, uri);
49     }
50
51     public Element element(String JavaDoc name, String JavaDoc prefix, String JavaDoc uri)
52     {
53         return new AnakiaElement(name, prefix, uri);
54     }
55 }
56
Popular Tags