1 16 17 package org.apache.ws.jaxme.xs.types; 18 19 import org.apache.ws.jaxme.xs.XSAttributable; 20 import org.apache.ws.jaxme.xs.XSComplexType; 21 import org.apache.ws.jaxme.xs.XSObject; 22 import org.apache.ws.jaxme.xs.XSParser; 23 import org.apache.ws.jaxme.xs.XSParticle; 24 import org.apache.ws.jaxme.xs.XSSimpleContentType; 25 import org.apache.ws.jaxme.xs.XSSimpleType; 26 import org.apache.ws.jaxme.xs.XSType; 27 import org.apache.ws.jaxme.xs.xml.XsComplexContentType; 28 import org.apache.ws.jaxme.xs.xml.XsQName; 29 import org.xml.sax.SAXException ; 30 31 32 36 public class XSAnyType extends AbstractBuiltinType 37 implements XSComplexType { 38 private static final XsQName qName = new XsQName(XSParser.XML_SCHEMA_URI, "anyType", null); 39 private static final XSAttributable[] attributes = new XSAttributable[0]; 40 private static final XSAnyType theInstance = new XSAnyType(); 41 42 private XSAnyType() { 43 } 44 45 public static final XSAnyType getInstance() { 46 return theInstance; 47 } 48 49 public boolean isSimple() { return false; } 50 public XSSimpleType getSimpleType() throws SAXException { 51 throw new IllegalStateException ("The anyType is a complex type."); 52 } 53 public XSComplexType getComplexType() throws SAXException { return this; } 54 public XsQName getName() { return qName; } 55 public boolean isTopLevelObject() { return true; } 56 public XSObject getParentObject() { return null; } 57 public boolean hasSimpleContent() { return false; } 58 public boolean isEmpty() { return false; } 59 public boolean isElementOnly() { return false; } 60 public boolean isMixed() { return true; } 61 public XSParticle getParticle() { return null; } 62 public XSAttributable[] getAttributes() { return attributes; } 63 public boolean isExtension() { return false; } 64 public XSType getExtendedType() { return null; } 65 public boolean isRestriction() { return false; } 66 public XSType getRestrictedType() { return null; } 67 68 public XsComplexContentType getComplexContentType() { 69 throw new IllegalStateException ("The builtin type " + getName() + " does not have an inner instance of XsComplexContentType."); 70 } 71 72 public XSSimpleContentType getSimpleContent() { 73 throw new IllegalStateException ("The builtin type " + getName() + " does not have simple content."); 74 } 75 76 public boolean isBuiltin() { return true; } 77 } 78 | Popular Tags |