KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > om > impl > llom > OMNamespaceImpl


1 /*
2  * Copyright 2004,2005 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.axis2.om.impl.llom;
17
18 import org.apache.axis2.om.OMNamespace;
19
20 /**
21  * Class OMNamespaceImpl
22  */

23 public class OMNamespaceImpl implements OMNamespace {
24     /**
25      * Field prefix
26      */

27     private String JavaDoc prefix;
28
29     /**
30      * Field uri
31      */

32     private String JavaDoc uri;
33
34     // private String value;
35

36     /**
37      * @param uri
38      * @param prefix
39      */

40     public OMNamespaceImpl(String JavaDoc uri, String JavaDoc prefix) {
41         this.uri = uri;
42         this.prefix = prefix;
43     }
44
45     /**
46      * Method equals
47      *
48      * @param uri
49      * @param prefix
50      * @return
51      */

52     public boolean equals(String JavaDoc uri, String JavaDoc prefix) {
53         return (((prefix == null) && (this.prefix == null)) || ((prefix != null) && prefix.equals(
54                                                                                    this.prefix))) && uri.equals(uri);
55     }
56
57     /**
58      * Method getPrefix
59      *
60      * @return
61      */

62     public String JavaDoc getPrefix() {
63         return prefix;
64     }
65
66     /**
67      * Method getName
68      *
69      * @return
70      */

71     public String JavaDoc getName() {
72         return uri;
73     }
74 }
75
Popular Tags