KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xalan > templates > XMLNSDecl


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 /*
17  * $Id: XMLNSDecl.java,v 1.7 2004/02/16 20:32:33 minchau Exp $
18  */

19 package org.apache.xalan.templates;
20
21 /**
22  * Represents an xmlns declaration
23  */

24 public class XMLNSDecl
25         implements java.io.Serializable JavaDoc // 20001009 jkess
26
{
27
28   /**
29    * Constructor XMLNSDecl
30    *
31    * @param prefix non-null reference to prefix, using "" for default namespace.
32    * @param uri non-null reference to namespace URI.
33    * @param isExcluded true if this namespace declaration should normally be excluded.
34    */

35   public XMLNSDecl(String JavaDoc prefix, String JavaDoc uri, boolean isExcluded)
36   {
37
38     m_prefix = prefix;
39     m_uri = uri;
40     m_isExcluded = isExcluded;
41   }
42
43   /** non-null reference to prefix, using "" for default namespace.
44    * @serial */

45   private String JavaDoc m_prefix;
46
47   /**
48    * Return the prefix.
49    * @return The prefix that is associated with this URI, or null
50    * if the XMLNSDecl is declaring the default namespace.
51    */

52   public String JavaDoc getPrefix()
53   {
54     return m_prefix;
55   }
56
57   /** non-null reference to namespace URI.
58    * @serial */

59   private String JavaDoc m_uri;
60
61   /**
62    * Return the URI.
63    * @return The URI that is associated with this declaration.
64    */

65   public String JavaDoc getURI()
66   {
67     return m_uri;
68   }
69
70   /** true if this namespace declaration should normally be excluded.
71    * @serial */

72   private boolean m_isExcluded;
73
74   /**
75    * Tell if this declaration should be excluded from the
76    * result namespace.
77    *
78    * @return true if this namespace declaration should normally be excluded.
79    */

80   public boolean getIsExcluded()
81   {
82     return m_isExcluded;
83   }
84 }
85
Popular Tags