1 16 package org.apache.axis.types; 17 18 import org.apache.axis.Constants; 19 import org.apache.axis.description.AttributeDesc; 20 import org.apache.axis.description.ElementDesc; 21 import org.apache.axis.description.FieldDesc; 22 import org.apache.axis.description.TypeDesc; 23 24 30 31 public class Notation implements java.io.Serializable { 32 NCName name; 33 URI publicURI; 34 URI systemURI; 35 36 public Notation() { 37 } 38 39 public Notation(NCName name, URI publicURI, URI systemURI) { 40 this.name = name; 41 this.publicURI = publicURI; 42 this.systemURI = systemURI; 43 } 44 45 public NCName getName() { 46 return name; 47 } 48 49 public void setName(NCName name) { 50 this.name = name; 51 } 52 53 public URI getPublic() { 54 return publicURI; 55 } 56 57 public void setPublic(URI publicURI) { 58 this.publicURI = publicURI; 59 } 60 61 public URI getSystem() { 62 return systemURI; 63 } 64 65 public void setSystem(URI systemURI) { 66 this.systemURI = systemURI; 67 } 68 69 public boolean equals(Object obj) { 70 if (obj == null || !(obj instanceof Notation)) 71 return false; 72 Notation other = (Notation) obj; 73 if (name == null) { 74 if (other.getName() != null) { 75 return false; 76 } 77 } else if (!name.equals(other.getName())) { 78 return false; 79 } 80 if (publicURI == null) { 81 if (other.getPublic() != null) { 82 return false; 83 } 84 } else if (!publicURI.equals(other.getPublic())) { 85 return false; 86 } 87 if (systemURI == null) { 88 if (other.getSystem() != null) { 89 return false; 90 } 91 } else if (!systemURI.equals(other.getSystem())) { 92 return false; 93 } 94 return true; 95 } 96 97 105 public int hashCode() { 106 int hash = 0; 107 if (null != name) { 108 hash += name.hashCode(); 109 } 110 if (null != publicURI) { 111 hash += publicURI.hashCode(); 112 } 113 if (null != systemURI) { 114 hash += systemURI.hashCode(); 115 } 116 return hash; 117 } 118 119 120 private static TypeDesc typeDesc; 122 123 static { 124 typeDesc = new TypeDesc(Notation.class); 125 FieldDesc field; 126 127 field = new AttributeDesc(); 129 field.setFieldName("name"); 130 field.setXmlName(Constants.XSD_NCNAME); 131 typeDesc.addFieldDesc(field); 132 133 field = new AttributeDesc(); 135 field.setFieldName("public"); 136 field.setXmlName(Constants.XSD_ANYURI); 137 typeDesc.addFieldDesc(field); 138 139 ElementDesc element = null; 141 element = new ElementDesc(); 142 element.setFieldName("system"); 143 element.setXmlName(Constants.XSD_ANYURI); 144 element.setNillable(true); 147 typeDesc.addFieldDesc(field); 148 } 149 150 public static TypeDesc getTypeDesc() { 151 return typeDesc; 152 } 153 } 154 | Popular Tags |