1 22 23 package org.xquark.schema; 24 41 public class AttributeDeclaration extends Declaration implements SchemaConstants { 42 private static final String RCSRevision = "$Revision: 1.1 $"; 43 private static final String RCSName = "$Name: $"; 44 45 private int use = OPTIONAL; 48 49 57 public AttributeDeclaration(Schema schema, String name, SchemaScope scope) { 58 super(schema, name, scope); 59 } 60 61 public void accept(SchemaVisitor visitor) throws SchemaException { 62 visitor.visit(this); 63 } 64 65 public int getUse() { return this.use; } 66 67 public String getUseString() { 68 switch( use ) { 69 case OPTIONAL: return OPTIONAL_VALUE; 70 case PROHIBITED: return PROHIBITED_VALUE; 71 case REQUIRED: return REQUIRED_VALUE; 72 } 73 return OPTIONAL_VALUE; 74 } 75 76 public void setUse(int use) { 77 this.use = use; 78 } 79 80 } 81 82 83 | Popular Tags |