1 57 58 package com.sun.org.apache.xerces.internal.impl.xs; 59 60 import com.sun.org.apache.xerces.internal.xs.ShortList; 61 import com.sun.org.apache.xerces.internal.xs.StringList; 62 import com.sun.org.apache.xerces.internal.xs.XSAttributeDeclaration; 63 import com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition; 64 import com.sun.org.apache.xerces.internal.xs.XSTypeDefinition; 65 import com.sun.org.apache.xerces.internal.impl.xs.util.StringListImpl; 66 import com.sun.org.apache.xerces.internal.xs.AttributePSVI; 67 import com.sun.org.apache.xerces.internal.xs.XSConstants; 68 69 76 public class AttributePSVImpl implements AttributePSVI { 77 78 79 protected XSAttributeDeclaration fDeclaration = null; 80 81 82 protected XSTypeDefinition fTypeDecl = null; 83 84 86 protected boolean fSpecified = false; 87 88 89 protected String fNormalizedValue = null; 90 91 92 protected Object fActualValue = null; 93 94 95 protected short fActualValueType = XSConstants.UNAVAILABLE_DT; 96 97 98 protected ShortList fItemValueTypes = null; 99 100 101 protected XSSimpleTypeDefinition fMemberType = null; 102 103 104 protected short fValidationAttempted = AttributePSVI.VALIDATION_NONE; 105 106 107 protected short fValidity = AttributePSVI.VALIDITY_NOTKNOWN; 108 109 110 protected String [] fErrorCodes = null; 111 112 113 protected String fValidationContext = null; 114 115 119 125 public String getSchemaDefault() { 126 return fDeclaration == null ? null : fDeclaration.getConstraintValue(); 127 } 128 129 136 public String getSchemaNormalizedValue() { 137 return fNormalizedValue; 138 } 139 140 145 public boolean getIsSchemaSpecified() { 146 return fSpecified; 147 } 148 149 150 156 public short getValidationAttempted() { 157 return fValidationAttempted; 158 } 159 160 167 public short getValidity() { 168 return fValidity; 169 } 170 171 177 public StringList getErrorCodes() { 178 if (fErrorCodes == null) 179 return null; 180 return new StringListImpl(fErrorCodes, fErrorCodes.length); 181 } 182 183 public String getValidationContext() { 185 return fValidationContext; 186 } 187 188 193 public XSTypeDefinition getTypeDefinition() { 194 return fTypeDecl; 195 } 196 197 206 public XSSimpleTypeDefinition getMemberTypeDefinition() { 207 return fMemberType; 208 } 209 210 216 public XSAttributeDeclaration getAttributeDeclaration() { 217 return fDeclaration; 218 } 219 220 223 public Object getActualNormalizedValue() { 224 return this.fActualValue; 225 } 226 227 230 public short getActualNormalizedValueType() { 231 return this.fActualValueType; 232 } 233 234 237 public ShortList getItemValueTypes() { 238 return this.fItemValueTypes; 239 } 240 241 244 public void reset() { 245 fNormalizedValue = null; 246 fActualValue = null; 247 fActualValueType = XSConstants.UNAVAILABLE_DT; 248 fItemValueTypes = null; 249 fDeclaration = null; 250 fTypeDecl = null; 251 fSpecified = false; 252 fMemberType = null; 253 fValidationAttempted = AttributePSVI.VALIDATION_NONE; 254 fValidity = AttributePSVI.VALIDITY_NOTKNOWN; 255 fErrorCodes = null; 256 fValidationContext = null; 257 } 258 } 259 | Popular Tags |