KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > dom > DomExtension


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

18 package org.apache.batik.dom;
19
20 /**
21  * This is a Service interface for classes that want to extend the
22  * functionality of the AbstractDocument, to support new tags in the
23  * DOM tree.
24  */

25 public interface DomExtension {
26
27     /**
28      * Return the priority of this Extension. Extensions are
29      * registered from lowest to highest priority. So if for some
30      * reason you need to come before/after another existing extension
31      * make sure your priority is lower/higher than theirs.
32      */

33     public float getPriority();
34
35     /**
36      * This should return the individual or company name responsible
37      * for the this implementation of the extension.
38      */

39     public String JavaDoc getAuthor();
40
41     /**
42      * This should return a contact address (usually an e-mail address).
43      */

44     public String JavaDoc getContactAddress();
45
46     /**
47      * This should return a URL where information can be obtained on
48      * this extension.
49      */

50     public String JavaDoc getURL();
51
52     /**
53      * Human readable description of the extension.
54      * Perhaps that should be a resource for internationalization?
55      * (although I suppose it could be done internally)
56      */

57     public String JavaDoc getDescription();
58
59     /**
60      * This method should update the DOMImplementation with support
61      * for the tags in this extension. In some rare cases it may
62      * be necessary to replace existing tag handlers, although this
63      * is discouraged.
64      *
65      * This is called before the DOMImplementation starts.
66      *
67      * @param di The DOMImplementation instance to be updated
68      */

69     public void registerTags(ExtensibleDOMImplementation di);
70 }
71
Popular Tags