1 16 17 package org.apache.xerces.dom; 18 19 import java.io.IOException ; 20 import java.io.NotSerializableException ; 21 import java.io.ObjectInputStream ; 22 import java.io.ObjectOutputStream ; 23 24 import org.apache.xerces.xs.AttributePSVI; 25 import org.apache.xerces.xs.*; 26 27 36 public class PSVIAttrNSImpl extends AttrNSImpl implements AttributePSVI { 37 38 39 static final long serialVersionUID = -3241738699421018889L; 40 41 44 public PSVIAttrNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI, 45 String qualifiedName, String localName) { 46 super(ownerDocument, namespaceURI, qualifiedName, localName); 47 } 48 49 52 public PSVIAttrNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI, 53 String qualifiedName) { 54 super(ownerDocument, namespaceURI, qualifiedName); 55 } 56 57 58 protected XSAttributeDeclaration fDeclaration = null; 59 60 61 protected XSTypeDefinition fTypeDecl = null; 62 63 65 protected boolean fSpecified = true; 66 67 68 protected String fNormalizedValue = null; 69 70 71 protected Object fActualValue = null; 72 73 74 protected short fActualValueType = XSConstants.UNAVAILABLE_DT; 75 76 77 protected ShortList fItemValueTypes = null; 78 79 80 protected XSSimpleTypeDefinition fMemberType = null; 81 82 83 protected short fValidationAttempted = AttributePSVI.VALIDATION_NONE; 84 85 86 protected short fValidity = AttributePSVI.VALIDITY_NOTKNOWN; 87 88 89 protected StringList fErrorCodes = null; 90 91 92 protected String fValidationContext = null; 93 94 98 104 public String getSchemaDefault() { 105 return fDeclaration == null ? null : fDeclaration.getConstraintValue(); 106 } 107 108 115 public String getSchemaNormalizedValue() { 116 return fNormalizedValue; 117 } 118 119 124 public boolean getIsSchemaSpecified() { 125 return fSpecified; 126 } 127 128 129 135 public short getValidationAttempted() { 136 return fValidationAttempted; 137 } 138 139 146 public short getValidity() { 147 return fValidity; 148 } 149 150 156 public StringList getErrorCodes() { 157 return fErrorCodes; 158 } 159 160 public String getValidationContext() { 162 return fValidationContext; 163 } 164 165 170 public XSTypeDefinition getTypeDefinition() { 171 return fTypeDecl; 172 } 173 174 183 public XSSimpleTypeDefinition getMemberTypeDefinition() { 184 return fMemberType; 185 } 186 187 193 public XSAttributeDeclaration getAttributeDeclaration() { 194 return fDeclaration; 195 } 196 197 202 public void setPSVI(AttributePSVI attr) { 203 this.fDeclaration = attr.getAttributeDeclaration(); 204 this.fValidationContext = attr.getValidationContext(); 205 this.fValidity = attr.getValidity(); 206 this.fValidationAttempted = attr.getValidationAttempted(); 207 this.fErrorCodes = attr.getErrorCodes(); 208 this.fNormalizedValue = attr.getSchemaNormalizedValue(); 209 this.fActualValue = attr.getActualNormalizedValue(); 210 this.fActualValueType = attr.getActualNormalizedValueType(); 211 this.fItemValueTypes = attr.getItemValueTypes(); 212 this.fTypeDecl = attr.getTypeDefinition(); 213 this.fMemberType = attr.getMemberTypeDefinition(); 214 this.fSpecified = attr.getIsSchemaSpecified(); 215 } 216 217 220 public Object getActualNormalizedValue() { 221 return this.fActualValue; 222 } 223 224 227 public short getActualNormalizedValueType() { 228 return this.fActualValueType; 229 } 230 231 234 public ShortList getItemValueTypes() { 235 return this.fItemValueTypes; 236 } 237 238 241 private void writeObject(ObjectOutputStream out) 242 throws IOException { 243 throw new NotSerializableException (getClass().getName()); 244 } 245 246 private void readObject(ObjectInputStream in) 247 throws IOException , ClassNotFoundException { 248 throw new NotSerializableException (getClass().getName()); 249 } 250 } 251 | Popular Tags |