1 17 package org.apache.ws.jaxme.xs.types; 18 19 import org.apache.ws.jaxme.xs.XSAtomicType; 20 import org.apache.ws.jaxme.xs.XSEnumeration; 21 import org.apache.ws.jaxme.xs.XSComplexType; 22 import org.apache.ws.jaxme.xs.XSListType; 23 import org.apache.ws.jaxme.xs.XSObject; 24 import org.apache.ws.jaxme.xs.XSObjectFactory; 25 import org.apache.ws.jaxme.xs.XSSimpleType; 26 import org.apache.ws.jaxme.xs.XSUnionType; 27 28 29 32 public abstract class AbstractSimpleType extends AbstractBuiltinType implements XSSimpleType { 33 public boolean isSimple() { return true; } 34 public boolean isAtomic() { return false; } 35 public boolean isList() { return false; } 36 public boolean isUnion() { return false; } 37 public XSSimpleType getSimpleType() { return this; } 38 public String [][] getPattern() { return null; } 39 public XSEnumeration[] getEnumerations() { return new XSEnumeration[0]; } 40 public XSObject getParentObject() { 41 throw new IllegalStateException ("The " + getName() + 42 " type is declared outside of any schema and doesn't have a parent."); 43 } 44 public boolean isTopLevelObject() { return true; } 45 46 public XSComplexType getComplexType() { 47 throw new IllegalStateException ("This is a complex type."); 48 } 49 50 public XSAtomicType getAtomicType() { 51 throw new IllegalStateException ("The type " + getName() + " is not atomic."); 52 } 53 54 public XSListType getListType() { 55 throw new IllegalStateException ("The global type " + getName() + " is no list type."); 56 } 57 58 public XSUnionType getUnionType() { 59 throw new IllegalStateException ("The global type " + getName() + " is no union type."); 60 } 61 62 public XSObjectFactory getXSObjectFactory() { 63 throw new IllegalStateException ("The global type " + getName() + " does not have an object factory."); 64 } 65 } 66 | Popular Tags |