01: /*
02: * Modified by Nabh Information Systems, Inc.
03: * Modifications (c) 2006 Nabh Information Systems, Inc.
04: *
05: * Copyright 2001-2004 The Apache Software Foundation.
06: *
07: * Licensed under the Apache License, Version 2.0 (the "License");
08: * you may not use this file except in compliance with the License.
09: * You may obtain a copy of the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS,
15: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16: * See the License for the specific language governing permissions and
17: * limitations under the License.
18: */
19:
20: package com.nabhinc.util;
21:
22: import java.io.Serializable;
23:
24: /**
25: * this class represents a mapping from namespace to prefix
26: */
27: public class Mapping implements Serializable {
28: /**
29: * Comment for <code>serialVersionUID</code>
30: */
31: private static final long serialVersionUID = 4120848867479861558L;
32: private String namespaceURI;
33: private String prefix;
34:
35: public Mapping(String namespaceURI, String prefix) {
36: setPrefix(prefix);
37: setNamespaceURI(namespaceURI);
38: }
39:
40: public String getNamespaceURI() {
41: return namespaceURI;
42: }
43:
44: public void setNamespaceURI(String namespaceURI) {
45: this .namespaceURI = namespaceURI.intern();
46: }
47:
48: public String getPrefix() {
49: return prefix;
50: }
51:
52: public void setPrefix(String prefix) {
53: this.prefix = prefix.intern();
54: }
55: }
|