You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by jo...@apache.org on 2006/11/24 13:15:06 UTC

svn commit: r478855 [5/21] - in /webservices/jaxme/branches/MAVEN/jaxme-xs: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/ws/ src/main/java/org/apache/ws/jaxme/ src/main/java/org/apache/ws/jaxme/...

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSTypeImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSTypeImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSTypeImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSTypeImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,794 @@
+/*
+ * Copyright 2003,2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.impl;
+
+import org.apache.ws.jaxme.xs.XSAnnotation;
+import org.apache.ws.jaxme.xs.XSAttributable;
+import org.apache.ws.jaxme.xs.XSComplexType;
+import org.apache.ws.jaxme.xs.XSGroup;
+import org.apache.ws.jaxme.xs.XSModelGroup;
+import org.apache.ws.jaxme.xs.XSObject;
+import org.apache.ws.jaxme.xs.XSObjectFactory;
+import org.apache.ws.jaxme.xs.XSParticle;
+import org.apache.ws.jaxme.xs.XSSchema;
+import org.apache.ws.jaxme.xs.XSSimpleContentType;
+import org.apache.ws.jaxme.xs.XSSimpleType;
+import org.apache.ws.jaxme.xs.XSType;
+import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
+import org.apache.ws.jaxme.xs.types.XSAnyType;
+import org.apache.ws.jaxme.xs.xml.*;
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ * @author <a href="mailto:iasandcb@tmax.co.kr">Ias</a>
+ */
+public class XSTypeImpl extends XSOpenAttrsImpl implements XSType {
+  public abstract class XSComplexTypeImpl implements XSComplexType {
+    protected final XSType owner;
+    private final XsTComplexType myComplexType;
+    protected XSType extendedType, restrictedType;
+
+    public XSComplexTypeImpl(XSType pOwner, XsTComplexType pType) {
+      owner = pOwner;
+      myComplexType = pType;
+    }
+
+    protected XsTComplexType getXsTComplexType() { return myComplexType; }
+    protected XSType getOwner() { return owner; }
+
+    public boolean isSequence() { return false; }
+    public boolean isChoice() { return false; }
+    public boolean isAll() { return false; }
+    public boolean hasSimpleContent() { return false; }
+    public XSSimpleContentType getSimpleContent() {
+      throw new IllegalStateException("This complex type doesn't have simple content.");
+    }
+    public boolean hasComplexContent() { return false; }
+    public boolean isEmpty() { return XsComplexContentType.EMPTY.equals(getComplexContentType()); }
+    public boolean isElementOnly() { return XsComplexContentType.ELEMENT_ONLY.equals(getComplexContentType()); }
+    public boolean isMixed() { return XsComplexContentType.MIXED.equals(getComplexContentType()); }
+
+    public void validate() throws SAXException {
+    }
+
+
+    public boolean isExtension() { return extendedType != null; }
+    public XSType getExtendedType() {
+      if (extendedType == null) {
+        throw new IllegalStateException("This type is no extension.");
+      }
+      return extendedType;
+    }
+
+    public boolean isRestriction() { return restrictedType != null; }
+    public XSType getRestrictedType() {
+      if (restrictedType == null) {
+        throw new IllegalStateException("This type is no restriction.");
+      }
+      return restrictedType;
+    }
+  }
+
+  public class XSSimpleContentImpl extends XSComplexTypeImpl {
+    private final XsESimpleContent simpleContent;
+    private final XSSimpleContentType simpleContentType;
+    private final XSAttributable[] attributes;
+
+    public boolean isElementOnly() { return false; }
+	public boolean isEmpty() { return false; }
+	public boolean isMixed() { return false; }
+
+	public XSSimpleContentImpl(XSType pOwner, XsTComplexType pType, XsESimpleContent pSimpleContent)
+        throws SAXException {
+      super(pOwner, pType);
+      simpleContent = pSimpleContent;
+      XsTSimpleExtensionType extension = simpleContent.getExtension();
+      if (extension == null) {
+        XsTSimpleRestrictionType restriction = simpleContent.getRestriction();
+        if (restriction == null) {
+          throw new LocSAXException("Invalid 'simpleContent', neither of the 'extension' or 'restriction' child elements are present.",
+                                       simpleContent.getLocator());
+        }
+        XsQName restrictedTypesName = restriction.getBase();
+        if (restrictedTypesName == null) {
+          throw new LocSAXException("Invalid 'restriction': Missing 'base' attribute.", restriction.getLocator());
+        }
+        restrictedType = getXSSchema().getType(restrictedTypesName);
+        if (restrictedType == null) {
+          throw new LocSAXException("Invalid 'restriction': The base type " + restrictedTypesName + " is unknown.",
+                                     restriction.getLocator());
+        }
+        restrictedType.validate();
+        extendedType = null;
+        XSObjectFactory factory = pOwner.getXSSchema().getXSObjectFactory();
+        XSType contentType = factory.newXSType(pOwner, restriction);
+        simpleContentType = factory.newXSSimpleContentType(pOwner, contentType, restriction);
+        attributes = XSAttributeGroupImpl.getAttributes(XSTypeImpl.this, restriction);
+      } else {
+        XsQName extendedTypesName = extension.getBase();
+        if (extendedTypesName == null) {
+          throw new LocSAXException("Invalid 'extension': Missing 'base' attribute.",
+                                       extension.getLocator());
+        }
+        extendedType = getXSSchema().getType(extendedTypesName);
+        if (extendedType == null) {
+          throw new LocSAXException("Invalid 'extension': Unknown 'base' type " + extendedTypesName,
+                                       extension.getLocator());
+        }
+        extendedType.validate();
+        restrictedType = null;
+        XSAttributable[] inheritedAttributes;
+        if (extendedType.isSimple()) {
+          simpleContentType = getOwner().getXSSchema().getXSObjectFactory().newXSSimpleContentType(pOwner,
+                                                                                     extendedType, extension);
+          inheritedAttributes = new XSAttributable[0];
+        } else {
+          XSComplexType myComplexType = extendedType.getComplexType();
+          if (!myComplexType.hasSimpleContent()) {
+            throw new LocSAXException("Invalid 'extension': The base type " + extendedTypesName +
+                                         " is neither a simple type nor a complex type with simple content.",
+                                         extension.getLocator());
+          }
+          simpleContentType = myComplexType.getSimpleContent();
+          inheritedAttributes = myComplexType.getAttributes();
+        }
+        XSAttributable[] myAttributes = XSAttributeGroupImpl.getAttributes(XSTypeImpl.this, extension);
+        attributes = new XSAttributable[inheritedAttributes.length + myAttributes.length];
+        System.arraycopy(inheritedAttributes, 0, attributes, 0, inheritedAttributes.length);
+        System.arraycopy(myAttributes, 0, attributes, inheritedAttributes.length, myAttributes.length);
+      }
+    }
+
+    public boolean hasSimpleContent() { return true; }
+    public XSSimpleContentType getSimpleContent() { return simpleContentType; }
+    public XSAttributable[] getAttributes() { return attributes; }
+    public XSParticle getParticle() {
+      throw new IllegalStateException("This complex type doesn't have a model group particle.");
+    }
+    public XsComplexContentType getComplexContentType() {
+        throw new IllegalStateException("This complex type (" + this.getClass().getName() +
+                                         ") doesn't have complex content.");
+    }
+  }
+
+  public class XSComplexContentImpl extends XSComplexTypeImpl {
+    private final XsEComplexContent complexContent;
+    private final XSParticle complexContentParticle;
+    private final XsComplexContentType complexContentType;
+    private final XSAttributable[] attributes;
+
+    protected XsEComplexContent getComplexContent() {
+      return complexContent;
+    }
+
+    private int getMinOccursByParticle(XsTTypeDefParticle pParticle) throws SAXException {
+        if (pParticle instanceof XsEChoice) {
+            return ((XsEChoice) pParticle).getMinOccurs();
+        } else if (pParticle instanceof XsESequence) {
+            return ((XsESequence) pParticle).getMinOccurs();
+        } else if (pParticle instanceof XsTAll) {
+            return ((XsTAll) pParticle).getMinOccurs();
+        } else if (pParticle instanceof XsTGroupRef) {
+            return ((XsTGroupRef) pParticle).getMinOccurs();
+        } else {
+            throw new IllegalStateException("Unknown TypeDefParticle type: " + pParticle.getClass().getName());
+        }
+    }
+
+    private int getMaxOccursByParticle(XsTTypeDefParticle pParticle) throws SAXException {
+        if (pParticle instanceof XsEChoice) {
+            return ((XsEChoice) pParticle).getMaxOccurs();
+        } else if (pParticle instanceof XsESequence) {
+            return ((XsESequence) pParticle).getMaxOccurs();
+        } else if (pParticle instanceof XsTAll) {
+            return ((XsTAll) pParticle).getMaxOccurs();
+        } else if (pParticle instanceof XsTGroupRef) {
+            return ((XsTGroupRef) pParticle).getMaxOccurs();
+        } else {
+            throw new IllegalStateException("Unknown TypeDefParticle type: " + pParticle.getClass().getName());
+        }
+    }
+
+    protected XSGroup getGroupByParticle(XsTTypeDefParticle pParticle) throws SAXException {
+      XSGroup result;
+      XSType myOwner = getOwner();
+      XSObjectFactory factory = myOwner.getXSSchema().getXSObjectFactory();
+      if (pParticle == null) {
+        return null;
+      } else if (pParticle instanceof XsEChoice) {
+        XsEChoice choice = (XsEChoice) pParticle;
+        result = factory.newXSGroup(myOwner, choice);
+      } else if (pParticle instanceof XsESequence) {
+        XsESequence sequence = (XsESequence) pParticle;
+        result = factory.newXSGroup(myOwner, sequence);
+      } else if (pParticle instanceof XsTAll) {
+        XsTAll all = (XsTAll) pParticle;
+        result = factory.newXSGroup(myOwner, all);
+      } else if (pParticle instanceof XsTGroupRef) {
+        XsTGroupRef groupRef = (XsTGroupRef) pParticle;
+        result = factory.newXSGroup(myOwner, groupRef);
+      } else {
+        throw new IllegalStateException("Unknown TypeDefParticle type: " + pParticle.getClass().getName());
+      }
+      result.validate();
+      return result;
+    }
+
+    protected XsComplexContentType getContentTypeByParticle(XsTTypeDefParticle pParticle, XSGroup pGroup) 
+        throws SAXException {
+      if (pParticle == null) {
+        return XsComplexContentType.EMPTY;
+      } else if (pParticle instanceof XsEChoice) {
+        if (pGroup.getParticles().length == 0) {
+          XsEChoice choice = (XsEChoice) pParticle;
+          if (choice.getMinOccurs() == 0) {
+            return XsComplexContentType.EMPTY;
+          } else {
+            throw new LocSAXException("Invalid choice: Neither child elements, nor 'minOccurs'=0", choice.getLocator());
+          }
+        } else {
+        }
+      } else if (pParticle instanceof XsESequence) {
+        if (pGroup.getParticles().length == 0) {
+          return XsComplexContentType.EMPTY;
+        }
+      } else if (pParticle instanceof XsTAll) {
+        if (pGroup.getParticles().length == 0) {
+          return XsComplexContentType.EMPTY;
+        }
+      } else if (pParticle instanceof XsTGroupRef) {
+      } else {
+        throw new IllegalStateException("Unknown TypeDefParticle type: " + pParticle.getClass().getName());
+      }
+      boolean isMixed;
+      if (complexContent.isMixed() == null) {
+        isMixed = ((XsTComplexType) getXsObject()).isMixed();
+      } else {
+        isMixed = complexContent.isMixed().booleanValue();
+      }
+      return isMixed ? XsComplexContentType.MIXED : XsComplexContentType.ELEMENT_ONLY;
+    }
+
+    private class ExtensionGroup implements XSGroup {
+      private final XSObject parent;
+      private final XSParticle[] particles;
+      private ExtensionGroup(XSObject pParent, XSParticle[] pParticles) {
+        parent = pParent;
+        particles = pParticles;
+      }
+      public boolean isTopLevelObject() { return false; }
+      public boolean isGlobal() { return false; }
+      public XsQName getName() { return null; }
+      public XSSchema getXSSchema() { return XSTypeImpl.this.getXSSchema(); }
+      public Locator getLocator() { return getComplexContent().getLocator(); }
+      public XSObjectFactory getXSObjectFactory() { return getXSObjectFactory(); }
+      public void validate() throws SAXException {}
+      public XSModelGroup.Compositor getCompositor() { return XSModelGroup.SEQUENCE; }
+      public boolean isSequence() { return true; }
+      public boolean isChoice() { return false; }
+      public boolean isAll() { return false; }
+      public XSParticle[] getParticles() { return particles; }
+      public XSAnnotation[] getAnnotations() { return new XSAnnotation[0]; }
+      public void setGlobal(boolean pGlobal) {
+        if (pGlobal) {
+          throw new IllegalStateException("An extensions model group cannot be made global.");
+        }
+      }
+      public XSObject getParentObject() { return parent; }
+      public Attributes getOpenAttributes() { return null; }
+    }
+
+    public XSComplexContentImpl(XSType pOwner, XsTComplexType pType, XsEComplexContent pComplexContent)
+        throws SAXException {
+      super(pOwner, pType);
+      complexContent = pComplexContent;
+      XsTExtensionType extension = complexContent.getExtension();
+      if (extension == null) {
+        XsTComplexRestrictionType restriction = complexContent.getRestriction();
+        if (restriction == null) {
+          // TODO: Restriction of the ur-type
+          throw new LocSAXException("Neither of extension or restriction, aka restriction of the ur-type: Not implemented",
+                                       complexContent.getLocator());
+        }
+        XsQName base = restriction.getBase();
+        if (base == null) {
+          throw new LocSAXException("Invalid 'restriction': Missing 'base' attribute", getLocator());
+        }
+        XSType type = getXSSchema().getType(base);
+        if (type == null) {
+          throw new LocSAXException("Invalid 'restriction': Unknown base type " + base, getLocator());
+        }
+        if (type.isSimple()) {
+          throw new LocSAXException("Invalid 'restriction': The base type " + getName() + " is simple.", getLocator());
+        }
+        XsTTypeDefParticle particle = restriction.getTypeDefParticle();
+
+        XSGroup group = getGroupByParticle(particle);
+        if (group == null) {
+          // TODO: Restriction of the ur-type
+          complexContentParticle = null;
+        } else {
+          complexContentParticle = new XSParticleImpl(group);
+        }
+        complexContentType = getContentTypeByParticle(particle, group);
+        attributes = XSAttributeGroupImpl.getAttributes(XSTypeImpl.this, restriction);
+        restrictedType = type;
+      } else {
+        XsQName base = extension.getBase();
+        if (base == null) {
+          throw new LocSAXException("Invalid 'extension': Missing 'base' attribute", getLocator());
+        }
+        XSType type = getXSSchema().getType(base);
+        if (type == null) {
+          throw new LocSAXException("Invalid 'extension': Unknown base type " + base, getLocator());
+        }
+        if (type.isSimple()) {
+          throw new LocSAXException("Invalid 'extension': The base type " + base + " is simple.", getLocator());
+        }
+        XSComplexType extendedComplexType = type.getComplexType();
+        if (extendedComplexType.hasSimpleContent()) {
+          throw new LocSAXException("Invalid 'extension': The base type " + base + " has simple content.",
+                                       getLocator());
+        }
+        XsTTypeDefParticle particle = extension.getTypeDefParticle();
+        XSGroup group = getGroupByParticle(particle);
+        XsComplexContentType groupType = getContentTypeByParticle(particle, group);
+
+        if (XsComplexContentType.EMPTY.equals(groupType)) {
+        	if (type == XSAnyType.getInstance()) {
+        		complexContentType = null;
+        		complexContentParticle = null;
+        	} else {
+        		complexContentType = extendedComplexType.getComplexContentType();
+        		complexContentParticle = extendedComplexType.getParticle();
+        	}
+        } else if (extendedComplexType.isEmpty()) {
+          complexContentType = groupType;
+          XSParticleImpl particleImpl = new XSParticleImpl(group);
+          particleImpl.setMinOccurs(getMinOccursByParticle(particle));
+          particleImpl.setMaxOccurs(getMaxOccursByParticle(particle));
+          complexContentParticle = particleImpl;
+        } else {
+          XSGroup sequenceGroup = new ExtensionGroup(pOwner, new XSParticle[]{extendedComplexType.getParticle(), new XSParticleImpl(group)});
+          complexContentParticle = new XSParticleImpl(sequenceGroup);
+          complexContentType = groupType;
+        }
+
+        XSAttributable[] inheritedAttributes = extendedComplexType.getAttributes();
+        XSAttributable[] myAttributes = XSAttributeGroupImpl.getAttributes(XSTypeImpl.this, extension);
+        attributes = new XSAttributable[inheritedAttributes.length + myAttributes.length];
+        System.arraycopy(inheritedAttributes, 0, attributes, 0, inheritedAttributes.length);
+        System.arraycopy(myAttributes, 0, attributes, inheritedAttributes.length, myAttributes.length);
+        extendedType = type;
+      }
+    }
+
+    public boolean hasComplexContent() { return true; }
+
+    public XsComplexContentType getComplexContentType() {
+      return complexContentType;
+    }
+
+    public XSParticle getParticle() {
+      return complexContentParticle;
+    }
+
+    public XSAttributable[] getAttributes() { return attributes; }
+  }
+
+
+  public abstract class XSBasicComplexTypeImpl extends XSComplexTypeImpl {
+    private final XSAttributable[] attributes;
+    private XSParticle particle;
+    private XsComplexContentType contentType;
+
+    public XSBasicComplexTypeImpl(XSType pOwner, XsTComplexType pType) throws SAXException {
+      super(pOwner, pType);
+      attributes = XSAttributeGroupImpl.getAttributes(XSTypeImpl.this, pType);
+    }
+
+    public void setParticle(XsComplexContentType pType, XSParticle pParticle) {
+      contentType = pType;
+      particle = pParticle;
+    }
+    public XSParticle getParticle() { return particle; }
+    public XSAttributable[] getAttributes() { return attributes; }
+    public XsComplexContentType getComplexContentType() { return contentType; }
+  }
+
+  public class XSSequenceComplexTypeImpl extends XSBasicComplexTypeImpl {
+    private final XsESequence sequence;
+
+    public XSSequenceComplexTypeImpl(XSType pOwner, XsTComplexType pType) throws SAXException {
+      super(pOwner, pType);
+      sequence = null;
+      setParticle(pType.isMixed() ? XsComplexContentType.MIXED : XsComplexContentType.EMPTY, null);
+    }
+    public XSSequenceComplexTypeImpl(XSType pOwner, XsTComplexType pType, XsESequence pSequence) throws SAXException {
+      super(pOwner, pType);
+      sequence = pSequence;
+      XSGroup group = pOwner.getXSSchema().getXSObjectFactory().newXSGroup(pOwner, sequence);
+      group.validate();
+      XSParticleImpl particle = new XSParticleImpl(group);
+      particle.setMaxOccurs(pSequence.getMaxOccurs());
+      particle.setMinOccurs(pSequence.getMinOccurs());
+      if (group.getParticles().length == 0) {
+        setParticle(XsComplexContentType.EMPTY, particle);
+      } else {
+        setParticle(pType.isMixed() ? XsComplexContentType.MIXED : XsComplexContentType.ELEMENT_ONLY, particle);
+      }
+    }
+
+    public boolean isSequence() { return true; }
+  }
+
+  public class XSChoiceComplexTypeImpl extends XSBasicComplexTypeImpl {
+    private final XsEChoice choice;
+
+    public XSChoiceComplexTypeImpl(XSType pOwner, XsTComplexType pType, XsEChoice pChoice) throws SAXException {
+      super(pOwner, pType);
+      choice = pChoice;
+      XSGroup group = pOwner.getXSSchema().getXSObjectFactory().newXSGroup(pOwner, choice);
+      group.validate();
+      XSParticleImpl particle = new XSParticleImpl(group);
+      particle.setMaxOccurs(pChoice.getMaxOccurs());
+      particle.setMinOccurs(pChoice.getMinOccurs());      
+      if (group.getParticles().length == 0) {
+        throw new LocSAXException("The complex type must not have an empty element group, as it is a choice.",
+                                     choice.getLocator());
+      } else {
+        setParticle(pType.isMixed() ? XsComplexContentType.MIXED : XsComplexContentType.ELEMENT_ONLY, particle);
+      }
+    }
+
+    public boolean isChoice() { return true; }
+  }
+
+  public class XSAllComplexTypeImpl extends XSBasicComplexTypeImpl {
+    private final XsTAll all;
+
+    public XSAllComplexTypeImpl(XSType pOwner, XsTComplexType pType, XsTAll pAll) throws SAXException {
+      super(pOwner, pType);
+      all = pAll;
+      XSGroup group = pOwner.getXSSchema().getXSObjectFactory().newXSGroup(pOwner, all);
+      group.validate();
+      XSParticleImpl particle = new XSParticleImpl(group);
+      particle.setMaxOccurs(pAll.getMaxOccurs());
+      particle.setMinOccurs(pAll.getMinOccurs());
+      if (group.getParticles().length == 0) {
+        setParticle(XsComplexContentType.EMPTY, particle);
+      } else {
+        setParticle(pType.isMixed() ? XsComplexContentType.MIXED : XsComplexContentType.ELEMENT_ONLY, particle);
+      }
+    }
+
+    public boolean isAll() { return true; }
+  }
+
+  public class XSGroupComplexTypeImpl extends XSBasicComplexTypeImpl {
+    private final XSGroup group;
+
+    public XSGroupComplexTypeImpl(XSType pOwner, XsTComplexType pType, XSGroup pGroup,
+    							  XsTGroupRef pRef) throws SAXException {
+      super(pOwner, pType);
+      group = pGroup;
+      XSParticleImpl particle = new XSParticleImpl(group);
+      particle.setMinOccurs(pRef.getMinOccurs());
+      particle.setMaxOccurs(pRef.getMaxOccurs());
+      if (group.getParticles().length == 0) {
+        setParticle(XsComplexContentType.EMPTY, particle);
+      } else {
+        setParticle(pType.isMixed() ? XsComplexContentType.MIXED : XsComplexContentType.ELEMENT_ONLY, particle);
+      }
+    }
+
+    public boolean isAll() { return group.isAll(); }
+    public boolean isChoice() { return group.isChoice(); }
+    public boolean isSequence() { return group.isSequence(); }
+  }
+
+  private final boolean isSimple;
+  private final XsQName name;
+  private boolean isGlobal;
+  private XSSimpleType simpleType;
+  private XSComplexType complexType;
+  private boolean isValidated;
+  private final XsEAnnotation xsAnnotation;
+  private XSAnnotation[] annotations;
+
+  protected boolean isValidated() { return isValidated; }
+
+  protected XSTypeImpl(XSObject pParent, XsETopLevelSimpleType pSimpleType)
+       throws SAXException {
+    super(pParent, pSimpleType);
+    isSimple = true;
+    XsNCName myName = pSimpleType.getName();
+    if (myName == null) {
+      throw new LocSAXException("Invalid simple type: Missing 'name' attribute.",
+                                   pSimpleType.getLocator());
+    }
+    XsESchema schema = pSimpleType.getXsESchema();
+    this.name = new XsQName(schema.getTargetNamespace(), myName.toString(), schema.getTargetNamespacePrefix());
+    xsAnnotation = pSimpleType.getAnnotation();
+  }
+
+  protected XSTypeImpl(XSObject pParent, XsTLocalSimpleType pSimpleType) {
+    super(pParent, pSimpleType);
+    isSimple = true;
+    name = null;
+    xsAnnotation = pSimpleType == null ? null : pSimpleType.getAnnotation();
+  }
+
+  protected XSTypeImpl(XSObject pParent, XsTComplexType pComplexType)
+      throws SAXException {
+    super(pParent, pComplexType);
+    isSimple = false;
+    XsNCName myName = pComplexType.getName();
+    if (myName == null) {
+      throw new LocSAXException("Invalid complex type: Missing 'name' attribute.",
+                                   pComplexType.getLocator());
+    }
+    XsESchema schema = pComplexType.getXsESchema();
+    this.name = new XsQName(schema.getTargetNamespace(), myName.toString(), schema.getTargetNamespacePrefix());
+    xsAnnotation = pComplexType.getAnnotation();
+  }
+
+  protected XSTypeImpl(XSObject pParent, XsTLocalComplexType pComplexType) {
+    super(pParent, pComplexType);
+    isSimple = false;
+    name = null;
+    xsAnnotation = pComplexType.getAnnotation();
+  }
+
+  protected XSTypeImpl(XSObject pParent, XsTSimpleRestrictionType pRestriction)
+      throws SAXException {
+    super(pParent, pRestriction);
+    XsQName myName = pRestriction.getBase();
+    if (myName == null) {
+      throw new LocSAXException("Invalid 'restriction': Missing 'base' attribute.",
+                                   pRestriction.getLocator());
+    }
+    XSType type = getXSSchema().getType(myName);
+    if (type == null) {
+      throw new LocSAXException("Invalid 'restriction': Unknown 'base' type " + myName,
+                                   pRestriction.getLocator());
+    }
+    type.validate();
+    if (type.isSimple()) {
+      throw new LocSAXException("The 'base' type " + myName + " of 'simpleContent/restriction' is simple." +
+                                   " It ought to be a complex type with simple content: ",
+                                   pRestriction.getLocator());
+    }
+    XSComplexType myComplexType = type.getComplexType();
+    if (!myComplexType.hasSimpleContent()) {
+      throw new LocSAXException("The 'base' type " + myName + " of 'simpleContent/restriction' is complex," +
+                                   " but doesn't have simple content: ", pRestriction.getLocator());
+    }
+    XSObjectFactory factory = pParent.getXSSchema().getXSObjectFactory();
+    if (myComplexType.isExtension()) {
+      XSType extendedType = myComplexType.getSimpleContent().getType();
+      extendedType.validate();
+      XSSimpleType extendedSimpleType = extendedType.getSimpleType();
+	
+      XSSimpleType mySimpleType;
+      if (extendedSimpleType.isAtomic()) {
+      	mySimpleType = factory.newXSAtomicType(this, extendedType, pRestriction);
+      } else if (extendedSimpleType.isList()) {
+      	mySimpleType = factory.newXSListType(this, extendedType, pRestriction);
+      } else if (extendedSimpleType.isUnion()) {
+      	mySimpleType = factory.newXSUnionType(this, extendedType, pRestriction);
+      } else {
+      	throw new LocSAXException("Unknown restriction type: " + extendedType, 
+      			                  pRestriction.getLocator());
+      }
+
+      simpleType = mySimpleType;
+      //was: setSimpleType( extendedType.getSimpleType() );
+    } else {
+      XsTLocalSimpleType localSimpleType = pRestriction.getSimpleType();
+      XSType restrictedType;
+      if (localSimpleType != null) {
+        restrictedType = factory.newXSType(this, localSimpleType);
+      } else {
+        restrictedType = myComplexType.getSimpleContent().getType();
+      }
+      restrictedType.validate();
+      XSSimpleType restrictedSimpleType = restrictedType.getSimpleType();
+      if (restrictedSimpleType.isAtomic()) {
+        simpleType = factory.newXSAtomicType(this, restrictedType, pRestriction);
+      } else if (restrictedSimpleType.isList()) {
+        simpleType = factory.newXSListType(this, restrictedType, pRestriction);
+      } else if (restrictedSimpleType.isUnion()) {
+        simpleType = factory.newXSUnionType(this, restrictedType, pRestriction);
+      }
+    }
+    this.name = null;
+    isSimple = true;
+    xsAnnotation = pRestriction.getAnnotation();
+  }
+
+  public XsQName getName() {
+    return name;
+  }
+
+  public boolean isSimple() {
+    return isSimple;
+  }
+
+  public boolean isGlobal() {
+    return isGlobal;
+  }
+
+  public void setGlobal(boolean pGlobal) {
+    isGlobal = pGlobal;
+  }
+
+  public XSAnnotation[] getAnnotations() {
+    return annotations;
+  }
+
+  public void validate() throws SAXException {
+    if (isValidated()) {
+      return;
+    } else {
+      isValidated = true;
+    }
+
+    if (xsAnnotation == null) {
+      annotations = new XSAnnotation[0];
+    } else {
+      XSAnnotation result = getXSSchema().getXSObjectFactory().newXSAnnotation(this, xsAnnotation);
+      result.validate();
+      annotations = new XSAnnotation[]{result};
+    }
+
+    if (isSimple()) {
+      XSSimpleType mySimpleType;
+      Object baseObject = getXsObject();
+      if (baseObject instanceof XsTSimpleType) {
+      	XsTSimpleType myXsTSimpleType = (XsTSimpleType) baseObject;
+      	XsEList list = myXsTSimpleType.getList();
+      	if (list == null) {
+      		XsEUnion union = myXsTSimpleType.getUnion();
+      		if (union == null) {
+      			XsERestriction restriction = myXsTSimpleType.getRestriction();
+      			if (restriction == null) {
+      				throw new LocSAXException("Either of the 'list', 'union', or 'restriction' child elements must be set.",
+      						myXsTSimpleType.getLocator());
+      			}
+      			XsQName myName = restriction.getBase();
+      			XSType restrictedType;          
+      			if (myName == null) {
+      				XsTLocalSimpleType baseType = restriction.getSimpleType();
+      				if (baseType == null) {
+      					throw new LocSAXException("Neither the 'base' attribute nor an inner 'simpleType' element are present",
+      							restriction.getLocator());
+      				} else {
+      					restrictedType = getXSSchema().getXSObjectFactory().newXSType(this, baseType);
+      				}
+      			} else {
+      				restrictedType = getXSSchema().getType(myName);
+      				if (restrictedType == null) {
+      					throw new LocSAXException("Unknown base type: " + myName,
+      							restriction.getLocator());
+      				}
+      			}
+      			restrictedType.validate();
+      			if (!restrictedType.isSimple()) {
+      				throw new LocSAXException("The restricted type " + myName + " is complex.",
+      						restriction.getLocator());
+      			}
+      			XSSimpleType baseType = restrictedType.getSimpleType();
+      			if (baseType.isAtomic()) {
+      				mySimpleType = getXSSchema().getXSObjectFactory().newXSAtomicType(this, restrictedType, restriction);
+      			} else if (baseType.isList()) {
+      				mySimpleType = getXSSchema().getXSObjectFactory().newXSListType(this, restrictedType, restriction);
+      			} else if (baseType.isUnion()) {
+      				mySimpleType = getXSSchema().getXSObjectFactory().newXSUnionType(this, restrictedType, restriction);
+      			} else {
+      				throw new LocSAXException("Unknown restriction type: " + baseType, restriction.getLocator());
+      			}
+      		} else {
+      			mySimpleType = getXSSchema().getXSObjectFactory().newXSUnionType(this, union);
+      		}
+      	} else {
+      		mySimpleType = getXSSchema().getXSObjectFactory().newXSListType(this, list);
+      	}
+      }
+      else {
+      	mySimpleType = getSimpleType();
+      }
+      
+      this.simpleType = mySimpleType;
+    } else {
+      XSComplexTypeImpl myComplexType;
+      XsTComplexType myXsTComplexType = (XsTComplexType) getXsObject();
+      XsESimpleContent simpleContent = myXsTComplexType.getSimpleContent();
+      if (simpleContent == null) {
+        XsEComplexContent complexContent = myXsTComplexType.getComplexContent();
+        if (complexContent == null) {
+          XsTTypeDefParticle particle = myXsTComplexType.getTypeDefParticle();
+          if (particle == null) {
+            myComplexType = new XSSequenceComplexTypeImpl(this, myXsTComplexType);
+          } else if (particle instanceof XsESequence) {
+            myComplexType = new XSSequenceComplexTypeImpl(this, myXsTComplexType, (XsESequence) particle);
+          } else if (particle instanceof XsEChoice) {
+            myComplexType = new XSChoiceComplexTypeImpl(this, myXsTComplexType, (XsEChoice) particle);
+          } else if (particle instanceof XsTAll) {
+            myComplexType = new XSAllComplexTypeImpl(this, myXsTComplexType, (XsTAll) particle);
+          } else if (particle instanceof XsTGroupRef) {
+            XsTGroupRef groupRef = (XsTGroupRef) particle;
+            XsQName myName = groupRef.getRef();
+            if (myName == null) {
+              throw new LocSAXException("Missing 'ref' attribute", groupRef.getLocator());
+            }
+            XSGroup group = getXSSchema().getGroup(myName);
+            if (group == null) {
+              throw new LocSAXException("Unknown group: " + myName, getLocator());
+            }
+            group.validate();
+            myComplexType = new XSGroupComplexTypeImpl(this, myXsTComplexType, group, groupRef);
+          } else {
+            throw new IllegalStateException("Invalid particle: " + particle.getClass().getName());
+          }
+        } else {
+          XSComplexContentImpl complexContentImpl = new XSComplexContentImpl(this, myXsTComplexType, complexContent);
+          myComplexType = complexContentImpl;
+        }
+      } else {
+        XSSimpleContentImpl simpleContentImpl = new XSSimpleContentImpl(this, myXsTComplexType, simpleContent);
+        myComplexType = simpleContentImpl;
+      }
+      this.complexType = myComplexType;
+      myComplexType.validate();
+    }
+  }
+
+  public XSSimpleType getSimpleType() throws SAXException {
+    validate();
+    XSSimpleType result = simpleType;
+    if (result == null) {
+      throw new IllegalStateException("This is a complex type.");
+    }
+    return result;
+  }
+
+  public XSComplexType getComplexType() throws SAXException {
+    validate();
+    XSComplexType result = complexType;
+    if (result == null) {
+      if (getName() == null) {
+        throw new IllegalStateException("This is a simple type.");
+      } else {
+        throw new IllegalStateException("The type " + getName() + " is simple.");
+      }
+    }
+    return result;
+  }
+
+  public boolean isBuiltin() {
+	return false;
+  }
+
+  public XsSchemaHeader getSchemaHeader() {
+  	return getXsObject().getXsESchema();
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSUnionTypeImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSUnionTypeImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSUnionTypeImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSUnionTypeImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.ws.jaxme.xs.XSEnumeration;
+import org.apache.ws.jaxme.xs.XSType;
+import org.apache.ws.jaxme.xs.XSUnionType;
+import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
+import org.apache.ws.jaxme.xs.xml.XsEUnion;
+import org.apache.ws.jaxme.xs.xml.XsQName;
+import org.apache.ws.jaxme.xs.xml.XsTLocalSimpleType;
+import org.xml.sax.SAXException;
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XSUnionTypeImpl extends XSSimpleTypeImpl implements XSUnionType {
+  private static final String[][] ZERO_PATTERNS = new String[0][];
+  private static final XSEnumeration[] ZERO_ENUMERATIONS = new XSEnumeration[0];
+  private final List memberTypes = new ArrayList();
+
+  public XSUnionTypeImpl(XSType pOwner,
+                          XsEUnion pBaseUnion) throws SAXException {
+    XsQName[] names = pBaseUnion.getMemberTypes();
+    if (names != null) {
+      for (int i = 0;  i < names.length;  i++) {
+        XsQName name = names[i];
+        XSType type = pOwner.getXSSchema().getType(name);
+        if (type == null) {
+          throw new LocSAXException("Unknown member type: " + name, pBaseUnion.getLocator());
+        }
+        type.validate();
+        if (!type.isSimple()) {
+          throw new LocSAXException("The member type " + name + " is complex.",
+                                       pBaseUnion.getLocator());
+        }
+        memberTypes.add(type);
+      }
+    }
+    XsTLocalSimpleType[] simpleTypes = pBaseUnion.getSimpleTypes();
+    if (simpleTypes != null) {
+      for (int i = 0;  i < simpleTypes.length;  i++) {
+        XsTLocalSimpleType localSimpleType = simpleTypes[i];
+        XSType type = pOwner.getXSSchema().getXSObjectFactory().newXSType(pOwner, localSimpleType);
+        type.validate();
+        memberTypes.add(type);
+      }
+    }
+    if (memberTypes.size() == 0) {
+      throw new LocSAXException("Neither the 'memberTypes' attribute nor the 'simpleType' child elements did define a member type.",
+                                   pBaseUnion.getLocator());
+    }
+  }
+
+  public boolean isUnion() { return true; }
+  public boolean isRestriction() { return false; }
+  public XSType getRestrictedType() {
+    throw new IllegalStateException("This is a basic list type and not a restriction of another simple type.");
+  }
+  public XSUnionType getUnionType() { return this; }
+  public String[][] getPattern() { return ZERO_PATTERNS; }
+  public XSEnumeration[] getEnumerations() { return ZERO_ENUMERATIONS; }
+  public XSType[] getMemberTypes() {
+    return (XSType[]) memberTypes.toArray(new XSType[memberTypes.size()]);
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSUnionTypeRestrictionImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSUnionTypeRestrictionImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSUnionTypeRestrictionImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSUnionTypeRestrictionImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.impl;
+
+import org.apache.ws.jaxme.xs.XSAtomicType;
+import org.apache.ws.jaxme.xs.XSType;
+import org.apache.ws.jaxme.xs.XSUnionType;
+import org.apache.ws.jaxme.xs.xml.XsGSimpleRestrictionModel;
+import org.xml.sax.SAXException;
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XSUnionTypeRestrictionImpl extends XSSimpleTypeRestrictionImpl implements XSUnionType {
+  private final XSUnionType unionBaseType;
+
+  protected XSUnionTypeRestrictionImpl(XSType pParent, XSType pRestrictedType, XsGSimpleRestrictionModel pRestriction) throws SAXException {
+    super(pParent, pRestrictedType, pRestriction);
+    unionBaseType = pRestrictedType.getSimpleType().getUnionType();
+  }
+
+  public boolean isUnion() { return true; }
+
+  public XSUnionType getUnionType() {
+    return this;
+  }
+
+  public XSType[] getMemberTypes() {
+    return unionBaseType.getMemberTypes();
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSUtil.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSUtil.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSUtil.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSUtil.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.ws.jaxme.xs.XSAnnotation;
+import org.apache.ws.jaxme.xs.XSAppinfo;
+import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
+import org.xml.sax.SAXException;
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XSUtil {
+  /** <p>Returns all childs of xs:annotation/xs:appinfo implementing
+   * or extending the given class.</p>
+   */
+  public static List getAppinfos(XSAnnotation[] annotations, Class pClass) {
+    List result = new ArrayList();
+    for (int i = 0;  i < annotations.length;  i++) {
+      XSAppinfo[] appinfos = annotations[i].getAppinfos();
+      for (int j = 0;  j < appinfos.length;  j++) {
+        Object[] childs = appinfos[j].getChilds();
+        for (int k = 0;  k < childs.length;  k++) {
+          if (pClass.isAssignableFrom(childs[k].getClass())) {
+            result.add(childs[k]);
+          }
+        }
+      }
+    }
+    return result;
+  }
+
+  /** <p>Returns the first child of xs:annotation/xs:appinfo implementing
+   * or extending the given class. Ensures that the child is unique.</p>
+   * @return The unique child or null, if no such child exists.
+   */
+  public static Object getSingleAppinfo(XSAnnotation[] annotations, Class pClass) throws SAXException {
+    Object result = null;
+    if (annotations != null) {
+      for (int i = 0;  i < annotations.length;  i++) {
+        XSAppinfo[] appinfos = annotations[i].getAppinfos();
+        for (int j = 0;  j < appinfos.length;  j++) {
+          Object[] childs = appinfos[j].getChilds();
+          for (int k = 0;  k < childs.length;  k++) {
+            if (pClass.isAssignableFrom(childs[k].getClass())) {
+              if (result == null) {
+                result = childs[k];
+              } else {
+                throw new LocSAXException("Multiple instances of " + pClass.getName() +
+                                           " in xs:annotation/xs:appinfo are forbidden.",
+                                           appinfos[j].getLocator());
+              }
+            }
+          }
+        }
+      }
+    }
+    return result;
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSWildcardImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSWildcardImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSWildcardImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSWildcardImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2003,2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.impl;
+
+import org.apache.ws.jaxme.xs.XSAnnotation;
+import org.apache.ws.jaxme.xs.XSObject;
+import org.apache.ws.jaxme.xs.XSWildcard;
+import org.apache.ws.jaxme.xs.xml.XsEAnnotation;
+import org.apache.ws.jaxme.xs.xml.XsNamespaceList;
+import org.apache.ws.jaxme.xs.xml.XsSchemaHeader;
+import org.apache.ws.jaxme.xs.xml.XsTWildcard;
+import org.xml.sax.SAXException;
+
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XSWildcardImpl extends XSOpenAttrsImpl implements XSWildcard {
+    private boolean isValidated;
+    private XSAnnotation[] annotations;
+    private final XsEAnnotation xsAnnotation;
+    
+    protected XSWildcardImpl(XSObject pParent, XsTWildcard pBaseObject) {
+		super(pParent, pBaseObject);
+		xsAnnotation = pBaseObject.getAnnotation();
+	}
+	
+	public XsNamespaceList getNamespaceList() {
+		return ((XsTWildcard) getXsObject()).getNamespace();
+	}
+
+	public XsTWildcard.ProcessContents getProcessContents() {
+		return ((XsTWildcard) getXsObject()).getProcessContents();
+	}
+
+	protected boolean isValidated() {
+	    return isValidated;
+	}
+
+	public void validate() throws SAXException {
+	    if (isValidated()) {
+	        return;
+	    } else {
+	        isValidated = true;
+	    }
+
+	    if (xsAnnotation == null) {
+	        annotations = new XSAnnotation[0];
+	    } else {
+	        XSAnnotation ann = getXSSchema().getXSObjectFactory().newXSAnnotation(this, xsAnnotation);
+	        annotations = new XSAnnotation[]{ ann };
+	        ann.validate();
+	    }
+	}
+
+	public XsSchemaHeader getSchemaHeader() {
+	    return getXsObject().getXsESchema();
+	}
+
+	public XSAnnotation[] getAnnotations() {
+	    return annotations;
+	}
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/package.html
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/package.html?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/package.html (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/impl/package.html Fri Nov 24 04:14:48 2006
@@ -0,0 +1,29 @@
+<!--
+
+ Copyright 2004 The Apache Software Foundation.
+ 
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ 
+      http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<html>
+    <head>
+        <title>
+Package Documentation for org.apache.ws.jaxme.xs.impl Package
+    </title>
+</head>
+    <body bgcolor="white">
+        <p>
+Basic generic implementation of the JaxMeXS parser for XML Schema.
+    </p>
+</body>
+</html>

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBAny.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBAny.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBAny.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBAny.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import org.apache.ws.jaxme.xs.XSAny;
+
+/** <p>JAXB specific extension of XSAny.</p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public interface JAXBAny extends XSAny, JAXBWildcard {
+
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBAttribute.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBAttribute.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBAttribute.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBAttribute.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import org.apache.ws.jaxme.xs.XSAttribute;
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public interface JAXBAttribute extends XSAttribute, JAXBPropertyOwner {
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBClass.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBClass.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBClass.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBClass.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import org.apache.ws.jaxme.xs.xml.XsObject;
+
+
+/** <p>This interface implements the JAXB class bindings.</p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ * @version $Id: JAXBClass.java 231785 2004-02-16 23:39:59Z jochen $
+ */
+public interface JAXBClass extends XsObject {
+  /** <p>Returns the classes name, without the package. The package
+   * name is specified by the schema bindings package declaration.</p>
+   */
+  public String getName();
+
+  /** <p>Returns the implementations class name, including a package
+   * name.</p>
+   */
+  public String getImplClass();
+
+  /** <p>Returns the classes JavaDoc documentation.</p>
+   */
+  public JAXBJavadoc getJavadoc();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBClassOwner.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBClassOwner.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBClassOwner.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBClassOwner.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public interface JAXBClassOwner {
+  /** <p>Returns the groups schemaBindings.</p>
+   */
+  public JAXBSchemaBindings getJAXBSchemaBindings();
+
+  /** <p>Returns the groups class customization settings.</p>
+   */
+  public JAXBClass getJAXBClass();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBElement.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBElement.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBElement.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBElement.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import org.apache.ws.jaxme.xs.XSElement;
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public interface JAXBElement extends XSElement, JAXBClassOwner, JAXBPropertyOwner {
+  /** <p>Returns the elements property customization settings.</p>
+   */
+  public JAXBProperty getJAXBProperty();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBEnumeration.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBEnumeration.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBEnumeration.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBEnumeration.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import org.apache.ws.jaxme.xs.XSEnumeration;
+
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public interface JAXBEnumeration extends XSEnumeration {
+  /** <p>Returns the jaxb:typesafeEnumMember details.</p>
+   */
+  public JAXBTypesafeEnumMember getJAXBTypesafeEnumMember();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBGlobalBindings.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBGlobalBindings.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBGlobalBindings.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBGlobalBindings.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import org.apache.ws.jaxme.xs.xml.XsQName;
+
+
+/** <p>This interface implements the JAXB global bindings.</p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ * @version $Id: JAXBGlobalBindings.java 231785 2004-02-16 23:39:59Z jochen $
+ */
+public interface JAXBGlobalBindings {
+  /** <p>Enumeration class holding possible values for {@link JAXBGlobalBindings#getUnderscoreBinding()}.</p>
+   */
+  public class UnderscoreBinding {
+    private final String name;
+    private UnderscoreBinding(String pName) {
+      name = pName;
+    }
+    public String toString() { return name; }
+    public String getName() { return name; }
+    public static final UnderscoreBinding AS_WORD_SEPARATOR = new UnderscoreBinding("asWordSeparator");
+    public static final UnderscoreBinding AS_CHAR_IN_WORD = new UnderscoreBinding("asCharInWord");
+    public static UnderscoreBinding valueOf(String pName) {
+      if (AS_WORD_SEPARATOR.name.equals(pName)) {
+        return AS_WORD_SEPARATOR;
+      } else if (AS_CHAR_IN_WORD.name.equals(pName)) {
+        return AS_CHAR_IN_WORD;
+      } else {
+        throw new IllegalArgumentException("Invalid value for underscoreBinding: " + pName +
+                                            ", expected either of asWordSeparator|asCharInWord");
+      }
+    }
+  }
+
+  /** <p>Returns the collection type; either of null ("indexed",
+   * default) or an implementation of <code>java.util.List</code>.</p>
+   */
+  public String getCollectionType();
+
+  /** <p>Returns whether fixed attributes are implemented as a
+   * constant property. Defaults to false.</p>
+   */
+  public boolean isFixedAttributeAsConstantProperty();
+
+  /** <p>Returns whether a <code>isSet()</code> method is being
+   * generated. Defaults to false.</p>
+   */
+  public boolean isGenerateIsSetMethod();
+
+  /** <p>Returns whether FailFastCheck is enabled. Defaults to
+   * false.</p>
+   */
+  public boolean isEnableFailFastCheck();
+
+  /** <p>Returns the <code>choiceContentProperty</code> value. Defaults
+   * to false. This value is ignored, if <code>bindingStyle</code> is
+   * defined as <code>elementBinding</code>. In this case, setting
+   * <code>choiceContentProperty</code> is an error. Defaults to false.</p>
+   */
+  public boolean isChoiceContentProperty();
+
+  /** <p>Returns the binding of underscores. Defaults to "asWordSeparator"
+   * (false). The value true indicates "asCharInWord".
+   */
+  public UnderscoreBinding getUnderscoreBinding();
+
+  /** <p>Returns whether Java naming conventions are enabled. Defaults to
+   * true.</p>
+   */
+  public boolean isEnableJavaNamingConventions();
+
+  /** <p>Returns a list of QNames, which are being implemented as type
+   * safe enumerations, if the <code>xs:enumeration</code> facet is
+   * used. Defaults to <code>xs:NCName</code> (single element list).</p>
+   */
+  public XsQName[] getTypesafeEnumBase();
+
+  /** <p>Returns whether the typesafeEnumMemberName generates an
+   * error (false, default) or a name.</p>
+   */
+  public boolean isTypesafeEnumMemberName();
+
+  /** <p>Returns whether the <code>elementBinding</code> style is
+   * being used (true, default) or not.</p>
+   */
+  public boolean isBindingStyleModelGroup();
+
+  /** <p>Returns the list of <code>javaType</code> declarations.</p>
+   */
+  public JAXBJavaType.JAXBGlobalJavaType[] getJavaType();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBGroup.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBGroup.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBGroup.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBGroup.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import org.apache.ws.jaxme.xs.XSGroup;
+
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public interface JAXBGroup extends XSGroup, JAXBClassOwner {
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBJavaType.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBJavaType.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBJavaType.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBJavaType.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import org.apache.ws.jaxme.xs.xml.XsObject;
+import org.apache.ws.jaxme.xs.xml.XsQName;
+
+
+/** <p>This interface implements the JAXB javaType bindings.</p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ * @version $Id: JAXBJavaType.java 231996 2004-09-30 00:09:30Z jochen $
+ */
+public interface JAXBJavaType extends XsObject {
+  public interface JAXBGlobalJavaType extends JAXBJavaType {
+    /** <p>Returns the xmlType.</p>
+     */
+    public XsQName getXmlType();
+  }
+
+  /** <p>Returns the runtime type.</p>
+   */
+  public String getName();
+
+  /** Returns the XML type.
+   */
+  public XsQName getXmlType();
+
+  /** <p>Returns whether the <code>print()</code> and/or
+   * <code>parse()</code> methods have an additional
+   * <code>nsContext</code> attribute.</p>
+   */
+  public boolean hasNsContext();
+
+  /** <p>Returns the name of the <code>parse()</code> method.</p>
+   */
+  public String getParseMethod();
+
+  /** <p>Returns the name of the <code>print()</code> method.</p>
+   */
+  public String getPrintMethod();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBJavaTypeOwner.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBJavaTypeOwner.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBJavaTypeOwner.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBJavaTypeOwner.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,12 @@
+package org.apache.ws.jaxme.xs.jaxb;
+
+
+/** Interface of an element providing a <code>jaxb:javaType</code>
+ * customization.
+ */
+public interface JAXBJavaTypeOwner {
+	/** Returns the elements <code>jaxb:javaType</code> customization,
+     * if any, or null.
+	 */
+    public JAXBJavaType getJAXBJavaType();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBJavadoc.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBJavadoc.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBJavadoc.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBJavadoc.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import org.apache.ws.jaxme.xs.xml.XsObject;
+
+
+/** <p>Implements a <code>&lt;javadoc&gt;...&lt;/javadoc&gt;</code>
+ * element.</p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ * @version $Id: JAXBJavadoc.java 231785 2004-02-16 23:39:59Z jochen $
+ */
+public interface JAXBJavadoc extends XsObject {
+  /** <p>Returns the text contained in the Javadoc element.</p>
+   */
+  public String getText();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBProperty.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBProperty.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBProperty.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBProperty.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import org.apache.ws.jaxme.xs.xml.XsObject;
+
+
+/** <p>This interface implements the JAXB property bindings.</p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ * @version $Id: JAXBProperty.java 231785 2004-02-16 23:39:59Z jochen $
+ */
+public interface JAXBProperty extends XsObject {
+  public interface BaseType extends XsObject {
+    /** <p>Returns the Java type.</p>
+     */
+    public JAXBJavaType getJavaType();
+  }
+
+  /** <p>Returns the property name.</p>
+   */
+  public String getName();
+
+  /** <p>Returns the collection type; either of "indexed"
+   * or an implementation of <code>java.util.List</code>.
+   * The value null indicates, that the attribute has not
+   * been set.</p>
+   */
+  public String getCollectionType();
+
+  /** <p>Returns whether fixed attributes are implemented as a
+   * constant property. The value null indicates, that the
+   * attribute has not been set.</p>
+   */
+  public Boolean isFixedAttributeAsConstantProperty();
+
+  /** <p>Returns whether a <code>isSet()</code> method is being
+   * generated. The value null indicates, that the attribute
+   * has not been set.</p>
+   */
+  public Boolean isGenerateIsSetMethod();
+
+  /** <p>Returns whether FailFastCheck is enabled. The value null
+   * indicates, that the attribute has not been set.</p>
+   */
+  public Boolean isEnableFailFastCheck();
+
+  /** <p>Returns the getter methods JavaDoc documentation.</p>
+   */
+  public JAXBJavadoc getJavadoc();
+
+  /** <p>Returns the base type.</p>
+   */
+  public BaseType getBaseType();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBPropertyOwner.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBPropertyOwner.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBPropertyOwner.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBPropertyOwner.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public interface JAXBPropertyOwner {
+  /** <p>Returns the types schemaBindings.</p>
+   */
+  public JAXBSchemaBindings getJAXBSchemaBindings();
+
+  /** <p>Returns the attributes property customization settings.</p>
+   */
+  public JAXBProperty getJAXBProperty();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSchema.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSchema.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSchema.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSchema.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import org.apache.ws.jaxme.xs.XSSchema;
+
+
+/** <p>Interface of a JAXB schema. It inherits the methods of
+ * {@link JAXBGlobalBindings}.</p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public interface JAXBSchema extends XSSchema {
+  /** <p>Returns the schemas globalBindings. This is guaranteed to be non-null.</p>
+   */
+  public JAXBGlobalBindings getJAXBGlobalBindings();
+
+  /** <p>Returns the schemas <code>jaxb:version</code> attribute.</p>
+   */
+  public String getJaxbVersion();
+
+  /** <p>Returns the schemas <code>jaxb:extensionBindingPrefixes</code> list.</p>
+   */
+  public String[] getJaxbExtensionBindingPrefixes();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSchemaBindings.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSchemaBindings.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSchemaBindings.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSchemaBindings.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import org.apache.ws.jaxme.xs.xml.XsObject;
+
+
+/** <p>This interface implements the JAXB schema bindings.</p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ * @version $Id: JAXBSchemaBindings.java 231789 2004-02-22 00:52:34Z jochen $
+ */
+public interface JAXBSchemaBindings {
+  /** <p>Configures the package that is used in this schema.</p>
+   */
+  public interface Package extends XsObject {
+    /** <p>Returns the package name.</p>
+     */
+    public String getName();
+
+    /** <p>Returns the packages JavaDoc documentation.</p>
+     */
+    public JAXBJavadoc getJavadoc();
+  }
+
+  public interface NameTransformation extends XsObject {
+    /** <p>Returns the suffix.</p>
+     */
+    public String getSuffix();
+    /** <p>Returns the prefix.</p>
+     */
+    public String getPrefix();
+  }
+
+  public interface NameXmlTransform extends XsObject {
+    /** <p>Returns the <code>typeName</code>'s NameTransformation.</p>
+     */
+    public NameTransformation getTypeName();
+    /** <p>Returns the <code>elementName</code>'s NameTransformation.</p>
+     */
+    public NameTransformation getElementName();
+    /** <p>Returns the <code>modelGroupName</code>'s NameTransformation.</p>
+     */
+    public NameTransformation getModelGroupName();
+    /** <p>Returns the <code>anonymousTypeName</code>'s NameTransformation.</p>
+     */
+    public NameTransformation getAnonymousTypeName();
+  }
+
+  /** <p>Returns the package declaration.</p>
+   */
+  public Package getPackage();
+
+  /** <p>Returns the list of NameXmlTransforms.</p>
+   */
+  public NameXmlTransform[] getNameXmlTransform();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSimpleContentType.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSimpleContentType.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSimpleContentType.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSimpleContentType.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import org.apache.ws.jaxme.xs.XSSimpleContentType;
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public interface JAXBSimpleContentType extends XSSimpleContentType, JAXBPropertyOwner {
+  /** <p>Returns the complex types schemaBindings.</p>
+   */
+  public JAXBSchemaBindings getJAXBSchemaBindings();
+
+  /** <p>Returns the customization details of the content type.</p>
+   */
+  public JAXBProperty getJAXBProperty();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSimpleType.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSimpleType.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSimpleType.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBSimpleType.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import org.apache.ws.jaxme.xs.XSSimpleType;
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public interface JAXBSimpleType extends XSSimpleType {
+  /** <p>Returns the jaxb:javaType customization details.</p>
+   */
+  public JAXBJavaType getJAXBJavaType();
+
+  /** <p>Returns the jaxb:typesafeEnumClass details.</p>
+   */
+  public JAXBTypesafeEnumClass getJAXBTypesafeEnumClass();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBType.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBType.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBType.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBType.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import org.apache.ws.jaxme.xs.XSType;
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public interface JAXBType extends XSType, JAXBClassOwner, JAXBJavaTypeOwner {
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBTypesafeEnumClass.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBTypesafeEnumClass.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBTypesafeEnumClass.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBTypesafeEnumClass.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+import java.util.Iterator;
+
+
+/** <p>This interface implements the JAXB typesafeEnumClass bindings.</p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ * @version $Id: JAXBTypesafeEnumClass.java 231785 2004-02-16 23:39:59Z jochen $
+ */
+public interface JAXBTypesafeEnumClass {
+  /** <p>Returns the enumeration classes name, without any package
+   * prefix.</p>
+   */
+  public String getName();
+
+  /** <p>Returns the list of members. Any element in the list is
+   * an instance of <code>TypesafeEnumMember</code>.</p>
+   */
+  public Iterator getTypesafeEnumMember();
+
+  /** <p>Returns the created classess JavaDoc documentation.</p>
+   */
+  public JAXBJavadoc getJavadoc();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBTypesafeEnumMember.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBTypesafeEnumMember.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBTypesafeEnumMember.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/jaxb/JAXBTypesafeEnumMember.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2003, 2004  The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ */
+package org.apache.ws.jaxme.xs.jaxb;
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public interface JAXBTypesafeEnumMember {
+  /** <p>Returns the members name.</p>
+   */
+  public String getName();
+  /** <p>Returns the members value,</p>
+   */
+  public String getValue();
+
+  /** <p>Returns the created constants JavaDoc documentation.</p>
+   */
+  public JAXBJavadoc getJavadoc();
+}
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org