KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > language > markup > NamedLogicsheet


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

16 package org.apache.cocoon.components.language.markup;
17
18 import org.apache.avalon.framework.service.ServiceManager;
19 import org.apache.cocoon.ProcessingException;
20 import org.apache.excalibur.source.SourceException;
21 import org.apache.excalibur.source.SourceResolver;
22 import org.xml.sax.SAXException JavaDoc;
23
24 import java.io.IOException JavaDoc;
25
26 /**
27  * An extension to <code>Logicsheet</code> that is associated with a namespace.
28  * Named logicsheets are implicitly declared (and automagically applied) when
29  * the markup language document's root element declares the same logichseet's
30  * namespace
31  *
32  * @author <a HREF="mailto:ricardo@apache.org">Ricardo Rocha</a>
33  * @author <a HREF="mailto:ovidiu@cup.hp.com">Ovidiu Predescu</a>
34  * @version CVS $Id: NamedLogicsheet.java 226515 2005-07-30 13:41:43Z anathaniel $
35  */

36 public class NamedLogicsheet extends Logicsheet {
37
38     /**
39      * The namespace uri
40      */

41     protected String JavaDoc uri;
42
43     /**
44      * The namespace prefix
45      */

46     private String JavaDoc prefix;
47
48     public NamedLogicsheet(String JavaDoc systemId, ServiceManager manager,
49                            SourceResolver resolver, LogicsheetFilter filter)
50         throws IOException JavaDoc, ProcessingException, SourceException, SAXException JavaDoc
51     {
52         super(systemId, manager, resolver, filter);
53     }
54
55     /**
56      * Set the logichseet's namespace prefix
57      *
58      * @param prefix The namespace prefix
59      */

60     public void setPrefix(String JavaDoc prefix) {
61         this.prefix = prefix;
62     }
63
64     /**
65      * Return the logicsheet's namespace prefix
66      *
67      * @return The logicsheet's namespace prefix
68      */

69     public String JavaDoc getPrefix() {
70         return this.prefix;
71     }
72
73     /**
74      * Set the logichseet's uri
75      *
76      * @param uri The logicsheet's uri
77      */

78     public void setURI(String JavaDoc uri) {
79         this.uri = uri;
80     }
81
82     /**
83      * Return the logicsheet's namespace prefix
84      *
85      * @return The logicsheet's namespace prefix
86      */

87     public String JavaDoc getURI() {
88         return this.uri;
89     }
90 }
91
Popular Tags