1 17 package org.apache.ws.jaxme.xs.xml; 18 19 import org.xml.sax.SAXException ; 20 21 22 52 public interface XsTAttribute extends XsTAnnotated { 53 public static class Use { 54 private String value; 55 Use(String pValue) { value = pValue; } 56 public String toString() { return value; } 57 public String getValue() { return value; } 58 public static Use valueOf(String pValue) { 59 if ("prohibited".equals(pValue)) { 60 return PROHIBITED; 61 } else if ("optional".equals(pValue)) { 62 return OPTIONAL; 63 } else if ("required".equals(pValue)) { 64 return REQUIRED; 65 } else { 66 throw new IllegalArgumentException ("Invalid value for Use: " + pValue + ", expected 'prohibited', 'optional', or 'use'"); 67 } 68 } 69 } 70 71 public static final Use PROHIBITED = new Use("prohibited"); 72 public static final Use OPTIONAL = new Use("optional"); 73 public static final Use REQUIRED = new Use("required"); 74 75 public XsTLocalSimpleType createSimpleType(); 76 77 public XsTLocalSimpleType getSimpleType(); 78 79 public void setType(XsQName pType); 80 81 public XsQName getType(); 82 83 public void setUse(Use pUse); 84 85 public Use getUse(); 86 87 public void setDefault(String pDefault); 88 89 public String getDefault(); 90 91 public void setFixed(String pFixed); 92 93 public String getFixed(); 94 95 public void setForm(XsFormChoice pForm) throws SAXException ; 96 97 public XsFormChoice getForm(); 98 99 public void setName(XsNCName pName); 100 101 public XsNCName getName(); 102 103 public void setRef(XsQName pRef); 104 105 public XsQName getRef(); 106 107 public boolean isGlobal(); 108 } 109 | Popular Tags |