1 55 56 package org.jboss.axis.utils; 57 58 public class Mapping 59 { 60 private String namespaceURI; 61 private int namespaceHash; 62 63 private String prefix; 64 private int prefixHash; 65 66 public Mapping(String namespaceURI, String prefix) 67 { 68 setPrefix(prefix); 69 setNamespaceURI(namespaceURI); 70 } 71 72 public String getNamespaceURI() 73 { 74 return namespaceURI; 75 } 76 77 public int getNamespaceHash() 78 { 79 return namespaceHash; 80 } 81 82 public void setNamespaceURI(String namespaceURI) 83 { 84 if (namespaceURI == null) 85 throw new IllegalArgumentException ("Namespace URI cannot be null"); 86 87 this.namespaceURI = namespaceURI; 88 this.namespaceHash = namespaceURI.hashCode(); 89 } 90 91 public String getPrefix() 92 { 93 return prefix; 94 } 95 96 public int getPrefixHash() 97 { 98 return prefixHash; 99 } 100 101 public void setPrefix(String prefix) 102 { 103 this.prefix = prefix; 104 this.prefixHash = prefix.hashCode(); 105 } 106 107 } 108 | Popular Tags |