KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tomcat > util > digester > RuleSetBase


1 /* $Id: RuleSetBase.java 467222 2006-10-24 03:17:11Z markt $
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one or more
4  * contributor license agreements. See the NOTICE file distributed with
5  * this work for additional information regarding copyright ownership.
6  * The ASF licenses this file to You under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with
8  * the License. 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
20 package org.apache.tomcat.util.digester;
21
22
23 /**
24  * <p>Convenience base class that implements the {@link RuleSet} interface.
25  * Concrete implementations should list all of their actual rule creation
26  * logic in the <code>addRuleSet()</code> implementation.</p>
27  */

28
29 public abstract class RuleSetBase implements RuleSet {
30
31
32     // ----------------------------------------------------- Instance Variables
33

34
35     /**
36      * The namespace URI that all Rule instances created by this RuleSet
37      * will be associated with.
38      */

39     protected String JavaDoc namespaceURI = null;
40
41
42     // ------------------------------------------------------------- Properties
43

44
45     /**
46      * Return the namespace URI that will be applied to all Rule instances
47      * created from this RuleSet.
48      */

49     public String JavaDoc getNamespaceURI() {
50
51         return (this.namespaceURI);
52
53     }
54
55
56     // --------------------------------------------------------- Public Methods
57

58
59     /**
60      * Add the set of Rule instances defined in this RuleSet to the
61      * specified <code>Digester</code> instance, associating them with
62      * our namespace URI (if any). This method should only be called
63      * by a Digester instance.
64      *
65      * @param digester Digester instance to which the new Rule instances
66      * should be added.
67      */

68     public abstract void addRuleInstances(Digester digester);
69
70
71 }
72
Popular Tags