1 57 58 package org.enhydra.apache.xerces.validators.common; 59 60 import java.util.Vector ; 61 62 import org.enhydra.apache.xerces.utils.QName; 63 import org.enhydra.apache.xerces.validators.datatype.DatatypeValidator; 64 65 68 public class XMLElementDecl { 69 70 74 public static final int TYPE_EMPTY = 0; 75 public static final int TYPE_ANY = 1; 76 public static final int TYPE_MIXED_SIMPLE=2; public static final int TYPE_MIXED_COMPLEX=3; public static final int TYPE_CHILDREN = 4; 79 public static final int TYPE_SIMPLE = 5; 80 81 85 87 public final QName name = new QName(); 88 89 public int type; 90 91 93 public boolean list; 94 95 public DatatypeValidator datatypeValidator; 96 97 99 public int contentSpecIndex; 100 101 public int enclosingScope; 103 104 106 public final Vector unique = new Vector (); 107 108 public final Vector key = new Vector (); 109 110 public final Vector keyRef = new Vector (); 111 112 116 public XMLElementDecl() { 117 clear(); 118 } 119 120 public XMLElementDecl(XMLElementDecl elementDecl) { 121 setValues(elementDecl); 122 } 123 124 128 public void clear() { 129 name.clear(); 130 type = - 1; 131 list = false; 132 datatypeValidator = null; 133 contentSpecIndex = -1; 134 enclosingScope = -1; 135 unique.removeAllElements(); 136 key.removeAllElements(); 137 keyRef.removeAllElements(); 138 } 139 140 public void setValues(XMLElementDecl elementDecl) { 141 name.setValues(elementDecl.name); 142 type = elementDecl.type; 143 list = elementDecl.list; 144 datatypeValidator = elementDecl.datatypeValidator; 145 contentSpecIndex = elementDecl.contentSpecIndex; 146 enclosingScope = elementDecl.enclosingScope; 147 } 148 149 153 public int hashCode() { 154 return super.hashCode(); 156 } 157 158 public boolean equals(Object object) { 159 return super.equals(object); 161 } 162 163 } | Popular Tags |