1 16 17 package org.apache.xerces.impl.xs; 18 19 import org.apache.xerces.xs.ShortList; 20 import org.apache.xerces.xs.StringList; 21 import org.apache.xerces.xs.XSAttributeDeclaration; 22 import org.apache.xerces.xs.XSSimpleTypeDefinition; 23 import org.apache.xerces.xs.XSTypeDefinition; 24 import org.apache.xerces.impl.xs.util.StringListImpl; 25 import org.apache.xerces.xs.AttributePSVI; 26 import org.apache.xerces.xs.XSConstants; 27 28 37 public class AttributePSVImpl implements AttributePSVI { 38 39 40 protected XSAttributeDeclaration fDeclaration = null; 41 42 43 protected XSTypeDefinition fTypeDecl = null; 44 45 47 protected boolean fSpecified = false; 48 49 50 protected String fNormalizedValue = null; 51 52 53 protected Object fActualValue = null; 54 55 56 protected short fActualValueType = XSConstants.UNAVAILABLE_DT; 57 58 59 protected ShortList fItemValueTypes = null; 60 61 62 protected XSSimpleTypeDefinition fMemberType = null; 63 64 65 protected short fValidationAttempted = AttributePSVI.VALIDATION_NONE; 66 67 68 protected short fValidity = AttributePSVI.VALIDITY_NOTKNOWN; 69 70 71 protected String [] fErrorCodes = null; 72 73 74 protected String fValidationContext = null; 75 76 80 86 public String getSchemaDefault() { 87 return fDeclaration == null ? null : fDeclaration.getConstraintValue(); 88 } 89 90 97 public String getSchemaNormalizedValue() { 98 return fNormalizedValue; 99 } 100 101 106 public boolean getIsSchemaSpecified() { 107 return fSpecified; 108 } 109 110 111 117 public short getValidationAttempted() { 118 return fValidationAttempted; 119 } 120 121 128 public short getValidity() { 129 return fValidity; 130 } 131 132 138 public StringList getErrorCodes() { 139 if (fErrorCodes == null) 140 return null; 141 return new StringListImpl(fErrorCodes, fErrorCodes.length); 142 } 143 144 public String getValidationContext() { 146 return fValidationContext; 147 } 148 149 154 public XSTypeDefinition getTypeDefinition() { 155 return fTypeDecl; 156 } 157 158 167 public XSSimpleTypeDefinition getMemberTypeDefinition() { 168 return fMemberType; 169 } 170 171 177 public XSAttributeDeclaration getAttributeDeclaration() { 178 return fDeclaration; 179 } 180 181 184 public Object getActualNormalizedValue() { 185 return this.fActualValue; 186 } 187 188 191 public short getActualNormalizedValueType() { 192 return this.fActualValueType; 193 } 194 195 198 public ShortList getItemValueTypes() { 199 return this.fItemValueTypes; 200 } 201 202 205 public void reset() { 206 fNormalizedValue = null; 207 fActualValue = null; 208 fActualValueType = XSConstants.UNAVAILABLE_DT; 209 fItemValueTypes = null; 210 fDeclaration = null; 211 fTypeDecl = null; 212 fSpecified = false; 213 fMemberType = null; 214 fValidationAttempted = AttributePSVI.VALIDATION_NONE; 215 fValidity = AttributePSVI.VALIDITY_NOTKNOWN; 216 fErrorCodes = null; 217 fValidationContext = null; 218 } 219 } 220 | Popular Tags |