1 57 58 package com.sun.org.apache.xerces.internal.impl.xs; 59 60 import com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo; 61 import com.sun.org.apache.xerces.internal.xs.ShortList; 62 import com.sun.org.apache.xerces.internal.xs.XSAttributeDeclaration; 63 import com.sun.org.apache.xerces.internal.xs.XSAttributeUse; 64 import com.sun.org.apache.xerces.internal.xs.XSConstants; 65 import com.sun.org.apache.xerces.internal.xs.XSNamespaceItem; 66 67 74 public class XSAttributeUseImpl implements XSAttributeUse { 75 76 public XSAttributeDecl fAttrDecl = null; 78 public short fUse = SchemaSymbols.USE_OPTIONAL; 80 public short fConstraintType = XSConstants.VC_NONE; 82 public ValidatedInfo fDefault = null; 84 85 public void reset(){ 86 fDefault = null; 87 fAttrDecl = null; 88 fUse = SchemaSymbols.USE_OPTIONAL; 89 fConstraintType = XSConstants.VC_NONE; 90 } 91 92 95 public short getType() { 96 return XSConstants.ATTRIBUTE_USE; 97 } 98 99 103 public String getName() { 104 return null; 105 } 106 107 112 public String getNamespace() { 113 return null; 114 } 115 116 121 public boolean getRequired() { 122 return fUse == SchemaSymbols.USE_REQUIRED; 123 } 124 125 129 public XSAttributeDeclaration getAttrDeclaration() { 130 return fAttrDecl; 131 } 132 133 136 public short getConstraintType() { 137 return fConstraintType; 138 } 139 140 144 public String getConstraintValue() { 145 return getConstraintType() == XSConstants.VC_NONE ? 147 null : 148 fDefault.actualValue.toString(); 149 } 150 151 154 public XSNamespaceItem getNamespaceItem() { 155 return null; 156 } 157 158 public Object getActualVC() { 159 return fDefault.actualValue; 160 } 161 162 public short getActualVCType() { 163 return fDefault.actualValueType; 164 } 165 166 public ShortList getItemValueTypes() { 167 return fDefault.itemValueTypes; 168 } 169 170 } | Popular Tags |