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.XSElementDeclaration; 22 import org.apache.xerces.xs.XSModel; 23 import org.apache.xerces.xs.XSNotationDeclaration; 24 import org.apache.xerces.xs.XSSimpleTypeDefinition; 25 import org.apache.xerces.xs.XSTypeDefinition; 26 import org.apache.xerces.impl.xs.util.StringListImpl; 27 import org.apache.xerces.xs.ElementPSVI; 28 import org.apache.xerces.xs.XSConstants; 29 30 44 public class ElementPSVImpl implements ElementPSVI { 45 46 47 protected XSElementDeclaration fDeclaration = null; 48 49 50 protected XSTypeDefinition fTypeDecl = null; 51 52 55 protected boolean fNil = false; 56 57 59 protected boolean fSpecified = false; 60 61 62 protected String fNormalizedValue = null; 63 64 65 protected Object fActualValue = null; 66 67 68 protected short fActualValueType = XSConstants.UNAVAILABLE_DT; 69 70 71 protected ShortList fItemValueTypes = null; 72 73 74 protected XSNotationDeclaration fNotation = null; 75 76 77 protected XSSimpleTypeDefinition fMemberType = null; 78 79 80 protected short fValidationAttempted = ElementPSVI.VALIDATION_NONE; 81 82 83 protected short fValidity = ElementPSVI.VALIDITY_NOTKNOWN; 84 85 86 protected String [] fErrorCodes = null; 87 88 89 protected String fValidationContext = null; 90 91 92 protected SchemaGrammar[] fGrammars = null; 93 94 95 protected XSModel fSchemaInformation = null; 96 97 101 107 public String getSchemaDefault() { 108 return fDeclaration == null ? null : fDeclaration.getConstraintValue(); 109 } 110 111 118 public String getSchemaNormalizedValue() { 119 return fNormalizedValue; 120 } 121 122 127 public boolean getIsSchemaSpecified() { 128 return fSpecified; 129 } 130 131 137 public short getValidationAttempted() { 138 return fValidationAttempted; 139 } 140 141 148 public short getValidity() { 149 return fValidity; 150 } 151 152 158 public StringList getErrorCodes() { 159 if (fErrorCodes == null) 160 return null; 161 return new StringListImpl(fErrorCodes, fErrorCodes.length); 162 } 163 164 165 public String getValidationContext() { 167 return fValidationContext; 168 } 169 170 175 public boolean getNil() { 176 return fNil; 177 } 178 179 184 public XSNotationDeclaration getNotation() { 185 return fNotation; 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 XSElementDeclaration getElementDeclaration() { 217 return fDeclaration; 218 } 219 220 226 public synchronized XSModel getSchemaInformation() { 227 if (fSchemaInformation == null && fGrammars != null) { 228 fSchemaInformation = new XSModelImpl(fGrammars); 229 } 230 return fSchemaInformation; 231 } 232 233 236 public Object getActualNormalizedValue() { 237 return this.fActualValue; 238 } 239 240 243 public short getActualNormalizedValueType() { 244 return this.fActualValueType; 245 } 246 247 250 public ShortList getItemValueTypes() { 251 return this.fItemValueTypes; 252 } 253 254 257 public void reset() { 258 fDeclaration = null; 259 fTypeDecl = null; 260 fNil = false; 261 fSpecified = false; 262 fNotation = null; 263 fMemberType = null; 264 fValidationAttempted = ElementPSVI.VALIDATION_NONE; 265 fValidity = ElementPSVI.VALIDITY_NOTKNOWN; 266 fErrorCodes = null; 267 fValidationContext = null; 268 fNormalizedValue = null; 269 fActualValue = null; 270 fActualValueType = XSConstants.UNAVAILABLE_DT; 271 fItemValueTypes = null; 272 } 273 274 } 275 | Popular Tags |