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 [15/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/xml/impl/XsTElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTElementImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTElementImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTElementImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,267 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
+import org.apache.ws.jaxme.xs.xml.*;
+import org.xml.sax.SAXException;
+
+
+/** <p>Implementation of the <code>xs:element</code> type,
+ * as specified by the following:
+ * <pre>
+ *  &lt;xs:complexType name="element" abstract="true"&gt;
+ *    &lt;xs:annotation&gt;
+ *      &lt;xs:documentation&gt;
+ *        The element element can be used either
+ *        at the top level to define an element-type binding globally,
+ *        or within a content model to either reference a globally-defined
+ *        element or type or declare an element-type binding locally.
+ *        The ref form is not allowed at the top level.
+ *      &lt;/xs:documentation&gt;
+ *    &lt;/xs:annotation&gt;
+ *    &lt;xs:complexContent&gt;
+ *      &lt;xs:extension base="xs:annotated"&gt;
+ *        &lt;xs:sequence&gt;
+ *          &lt;xs:choice minOccurs="0"&gt;
+ *            &lt;xs:element name="simpleType" type="xs:localSimpleType"/&gt;
+ *            &lt;xs:element name="complexType" type="xs:localComplexType"/&gt;
+ *          &lt;/xs:choice&gt;
+ *          &lt;xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/&gt;
+ *        &lt;/xs:sequence&gt;
+ *        &lt;xs:attributeGroup ref="xs:defRef"/&gt;
+ *        &lt;xs:attribute name="type" type="xs:QName"/&gt;
+ *        &lt;xs:attribute name="substitutionGroup" type="xs:QName"/&gt;
+ *        &lt;xs:attributeGroup ref="xs:occurs"/&gt;
+ *        &lt;xs:attribute name="default" type="xs:string"/&gt;
+ *        &lt;xs:attribute name="fixed" type="xs:string"/&gt;
+ *        &lt;xs:attribute name="nillable" type="xs:boolean" use="optional" default="false"/&gt;
+ *        &lt;xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/&gt;
+ *        &lt;xs:attribute name="final" type="xs:derivationSet"/&gt;
+ *        &lt;xs:attribute name="block" type="xs:blockSet"/&gt;
+ *        &lt;xs:attribute name="form" type="xs:formChoice"/&gt;
+ *      &lt;/xs:extension&gt;
+ *    &lt;/xs:complexContent&gt;
+ *  &lt;/xs:complexType&gt;
+ * </pre></p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public abstract class XsTElementImpl extends XsTAnnotatedImpl implements XsTElement {
+  private XsTLocalSimpleType simpleType;
+  private XsTLocalComplexType complexType;
+  private XsQName type;
+  private XsQName substitutionGroup;
+  private String defaultValue;
+  private String fixedValue;
+  private boolean isNillable;
+  private boolean isAbstract;
+  private XsDerivationSet finalSet;
+  private XsBlockSet blockSet;
+  private XsFormChoice formChoice;
+  private final XsAGDefRef defRef;
+  private final XsAGOccurs occurs;
+  private XsGIdentityConstraint constraint;
+
+  protected XsTElementImpl(XsObject pParent) {
+    super(pParent);
+    defRef = getObjectFactory().newXsAGDefRef(this);
+    occurs = getObjectFactory().newXsAGOccurs(this);
+    constraint = getObjectFactory().newXsGIdentityConstraint(this);
+  }
+
+  public XsTLocalSimpleType createSimpleType() throws SAXException {
+    if (simpleType != null) {
+      throw new LocSAXException("Multiple 'simpleType' childs are forbidden.", getLocator());
+    }
+    if (complexType != null) {
+      throw new LocSAXException("The 'simpleType' and 'complexType' childs are mutually exclusive.", getLocator());
+    }
+    if (type != null) {
+      throw new LocSAXException("The 'simpleType' child and the 'type' attribute are mutually exclusive.", getLocator());
+    }
+    return simpleType = getObjectFactory().newXsTLocalSimpleType(this);
+  }
+
+  public XsTLocalSimpleType getSimpleType() {
+    return simpleType;
+  }
+
+  public XsTLocalComplexType createComplexType() throws SAXException {
+    if (complexType != null) {
+      throw new LocSAXException("Multiple 'complexType' childs are forbidden.", getLocator());
+    }
+    if (simpleType != null) {
+      throw new LocSAXException("The 'simpleType' and 'complexType' childs are mutually exclusive.", getLocator());
+    }
+    if (type != null) {
+      throw new LocSAXException("The 'complexType' child and the 'type' attribute are mutually exclusive.", getLocator());
+    }
+    return complexType = getObjectFactory().newXsTLocalComplexType(this);
+  }
+
+  public XsTLocalComplexType getComplexType() {
+    return complexType;
+  }
+
+  public void setType(XsQName pType) throws SAXException {
+    if (simpleType != null) {
+      throw new LocSAXException("The 'simpleType' child element and the 'type' attribute are mutually exclusive.", getLocator());
+    }
+    if (complexType != null) {
+      throw new LocSAXException("The 'complexType' child element and the 'type' attribute are mutually exclusive.", getLocator());
+    }
+    type = pType;
+  }
+
+  public void setType(String pType) throws SAXException {
+    setType(asXsQName(pType));
+  }
+
+  public XsQName getType() {
+    return type;
+  }
+
+  public void setSubstitutionGroup(XsQName pSubstitutionGroup) throws SAXException {
+    substitutionGroup = pSubstitutionGroup;
+  }
+
+  public void setSubstitutionGroup(String pSubstitutionGroup) throws SAXException {
+    setSubstitutionGroup(asXsQName(pSubstitutionGroup));
+  }
+
+  public XsQName getSubstitutionGroup() {
+    return substitutionGroup;
+  }
+
+  public void setDefault(String pDefault) {
+    defaultValue = pDefault;
+  }
+
+  public String getDefault() {
+    return defaultValue;
+  }
+
+  public void setFixed(String pFixed) {
+    fixedValue = pFixed;
+  }
+
+  public String getFixed() {
+    return fixedValue;
+  }
+
+  public void setNillable(boolean pNillable) {
+    isNillable = pNillable;
+  }
+
+  public boolean getNillable() {
+    return isNillable;
+  }
+
+  public void setAbstract(boolean pAbstract) {
+    isAbstract = pAbstract;
+  }
+
+  public boolean getAbstract() {
+    return isAbstract;
+  }
+
+  public void setFinal(XsDerivationSet pFinal) {
+    finalSet = pFinal;
+  }
+
+  public XsDerivationSet getFinal() {
+    return finalSet;
+  }
+
+  public void setBlock(XsBlockSet pBlock) {
+    blockSet = pBlock;
+  }
+
+  public XsBlockSet getBlock() {
+    return blockSet;
+  }
+
+  public void setForm(XsFormChoice pForm) {
+    formChoice = pForm;
+  }
+
+  public XsFormChoice getForm() {
+    return formChoice;
+  }
+
+  public void validate() throws SAXException {
+    super.validate();
+    if (type == null  &&  simpleType == null  &&  complexType == null  &&  getRef() == null) {
+      setType(org.apache.ws.jaxme.xs.types.XSAnyType.getInstance().getName());
+    }
+    defRef.validate();
+    occurs.validate();
+  }
+
+  public void setName(XsNCName pName) {
+    defRef.setName(pName);
+  }
+
+  public XsNCName getName() {
+    return defRef.getName();
+  }
+
+  public void setRef(XsQName pRef) {
+    defRef.setRef(pRef);
+  }
+
+  public void setRef(String pRef) throws SAXException {
+    setRef(asXsQName(pRef));
+  }
+
+  public XsQName getRef() {
+    return defRef.getRef();
+  }
+
+  public void setMaxOccurs(String pMaxOccurs) {
+    occurs.setMaxOccurs(pMaxOccurs);
+  }
+
+  public int getMaxOccurs() {
+    return occurs.getMaxOccurs();
+  }
+
+  public void setMinOccurs(int pMinOccurs) {
+    occurs.setMinOccurs(pMinOccurs);
+  }
+
+  public int getMinOccurs() {
+    return occurs.getMinOccurs();
+  }
+
+  public XsEUnique createUnique() {
+    return constraint.createUnique();
+  }
+
+  public XsEKey createKey() {
+    return constraint.createKey();
+  }
+
+  public XsEKeyref createKeyref() {
+    return constraint.createKeyref();
+  }
+
+  public XsTIdentityConstraint[] getIdentityConstraints() {
+    return constraint.getIdentityConstraints();
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTExplicitGroupImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTExplicitGroupImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTExplicitGroupImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTExplicitGroupImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,73 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.xml.*;
+import org.apache.ws.jaxme.xs.xml.XsTExplicitGroup;
+import org.xml.sax.SAXException;
+
+
+/** <p>Implementation of the <code>xs:explicitGroup</code>
+ * type, as specified by the following:
+ * <pre>
+ *  <xs:complexType name="explicitGroup">
+ *    <xs:annotation>
+ *      <xs:documentation>
+ *        group type for the three kinds of group
+ *      </xs:documentation>
+ *    </xs:annotation>
+ *    <xs:complexContent>
+ *      <xs:restriction base="xs:group">
+ *        <xs:sequence>
+ *          <xs:element ref="xs:annotation" minOccurs="0"/>
+ *          <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
+ *        </xs:sequence>
+ *        <xs:attribute name="name" type="xs:NCName" use="prohibited"/>
+ *        <xs:attribute name="ref" type="xs:QName" use="prohibited"/>
+ *      </xs:restriction>
+ *    </xs:complexContent>
+ *  </xs:complexType>
+ * </pre></p>
+ * <p><em>Implementation note:</em> This interface doesn't specify
+ * any additional methods. However, the implementations <code>validate()</code>
+ * method must ensure that
+ * <ol>
+ *   <li>neither of the 'name' or 'ref' attributes are set</li>
+ *   <li>Either of the 'element', 'choice', 'sequence', 'any', or 'group'
+ *     child elements is set, but not the 'all' element.</li>
+ * </ol>
+ * </p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTExplicitGroupImpl extends XsTGroupImpl implements XsTExplicitGroup {
+  protected XsTExplicitGroupImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  public void setName(XsNCName pName) {
+    throw new IllegalStateException("This group must not have its 'name' attribute set.");
+  }
+
+  public void setRef(XsQName pRef) {
+    throw new IllegalStateException("This group must not have its 'ref' attribute set.");
+  }
+
+  public void setRef(String pRef) throws SAXException {
+    setRef(asXsQName(pRef));
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTExtensionTypeImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTExtensionTypeImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTExtensionTypeImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTExtensionTypeImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,118 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.xml.*;
+import org.xml.sax.SAXException;
+
+
+/** <p>Implementation of the <code>xs:extensionType</code> type, as
+ * specified by:
+ * <pre>
+ *  &lt;xs:complexType name="extensionType"&gt;
+ *    &lt;xs:complexContent&gt;
+ *      &lt;xs:extension base="xs:annotated"&gt;
+ *        &lt;xs:sequence&gt;
+ *          &lt;xs:group ref="xs:typeDefParticle" minOccurs="0"/&gt;
+ *          &lt;xs:group ref="xs:attrDecls"/&gt;
+ *        &lt;/xs:sequence&gt;
+ *        &lt;xs:attribute name="base" type="xs:QName" use="required"/&gt;
+ *      &lt;/xs:extension&gt;
+ *    &lt;/xs:complexContent&gt;
+ *  &lt;/xs:complexType&gt;
+ * </pre></p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTExtensionTypeImpl extends XsTAnnotatedImpl implements XsTExtensionType {
+  private XsQName base;
+  private final XsGTypeDefParticle particle;
+  private final XsGAttrDecls attrDecls;
+
+  protected XsTExtensionTypeImpl(XsObject pParent) {
+    super(pParent);
+    particle = getObjectFactory().newXsGTypeDefParticle(this);
+    attrDecls = getObjectFactory().newXsGAttrDecls(this);
+  }
+
+  public void setBase(XsQName pBase) {
+    base = pBase;
+  }
+
+  public void setBase(String pBase) throws SAXException {
+    setBase(asXsQName(pBase));
+  }
+
+  public XsQName getBase() {
+    return base;
+  }
+
+  public XsTGroupRef createGroup() {
+    return particle.createGroup();
+  }
+
+  public XsTAll createAll() {
+    return particle.createAll();
+  }
+
+  public XsEChoice createChoice() {
+    return particle.createChoice();
+  }
+
+  public XsESequence createSequence() {
+    return particle.createSequence();
+  }
+
+  public XsTTypeDefParticle getTypeDefParticle() {
+    return particle.getTypeDefParticle();
+  }
+
+  public XsTAttribute createAttribute() {
+    return attrDecls.createAttribute();
+  }
+
+  public XsTAttribute[] getAttributes() {
+    return attrDecls.getAttributes();
+  }
+
+  public XsTAttributeGroupRef createAttributeGroup() {
+    return attrDecls.createAttributeGroup();
+  }
+
+  public XsTAttributeGroupRef[] getAttributeGroups() {
+    return attrDecls.getAttributeGroups();
+  }
+
+  public XsTWildcard createAnyAttribute() {
+    return attrDecls.createAnyAttribute();
+  }
+
+  public XsTWildcard getAnyAttribute() {
+    return attrDecls.getAnyAttribute();
+  }
+
+  public Object[] getAllAttributes() {
+    return attrDecls.getAllAttributes();
+  }
+
+  public void validate() throws SAXException {
+    super.validate();
+    if (getBase() == null) {
+      throw new NullPointerException("Missing 'base' attribute.");
+    }
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTFacetBaseImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTFacetBaseImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTFacetBaseImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTFacetBaseImpl.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.xml.impl;
+
+import org.apache.ws.jaxme.xs.xml.*;
+
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public abstract class XsTFacetBaseImpl extends XsTAnnotatedImpl
+    implements XsTFacetBase {
+  protected XsTFacetBaseImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  public abstract String getFacetName();
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTFacetImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTFacetImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTFacetImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTFacetImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,60 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
+import org.apache.ws.jaxme.xs.xml.XsObject;
+import org.xml.sax.SAXException;
+
+
+/** <p>Implementation of a facet, following this specification:
+ * <pre>
+ *  &lt;xs:complexType name="facet"&gt;
+ *    &lt;xs:complexContent&gt;
+ *      &lt;xs:extension base="xs:annotated"&gt;
+ *        &lt;xs:attribute name="value" use="required"/&gt;
+ *        &lt;xs:attribute name="fixed" type="xs:boolean" use="optional"
+ *                    default="false"/&gt;
+ *      &lt;/xs:extension&gt;
+ *    &lt;/xs:complexContent&gt;
+ *  &lt;/xs:complexType&gt;
+ * </pre></p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public abstract class XsTFacetImpl extends XsTFixedFacetImpl {
+  private String value;
+
+  protected XsTFacetImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  public void setValue(String pValue) {
+    value = pValue;
+  }
+
+  public String getValue() {
+    return value;
+  }
+
+  public void validate() throws SAXException {
+    super.validate();
+    if (value == null) {
+      throw new LocSAXException("Missing 'value' attribute", getLocator());
+    }
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTFixedFacetImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTFixedFacetImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTFixedFacetImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTFixedFacetImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,43 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.xml.XsObject;
+import org.apache.ws.jaxme.xs.xml.XsTFixedFacet;
+
+
+/** <p>A common base class for {@link org.apache.ws.jaxme.xs.xml.XsTFacet} and
+ * {@link org.apache.ws.jaxme.xs.xml.XsTNumFacet}.</p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public abstract class XsTFixedFacetImpl extends XsTFacetBaseImpl
+    implements XsTFixedFacet {
+  private boolean isFixed;
+
+  protected XsTFixedFacetImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  public void setFixed(boolean pFixed) {
+    isFixed = pFixed;
+  }
+
+  public boolean isFixed() {
+    return isFixed;
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTGroupImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTGroupImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTGroupImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTGroupImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,120 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.xml.*;
+import org.xml.sax.SAXException;
+
+
+/** <p>Implementation of the <code>xs:group</code>, type, with the
+ * following specification:
+ * <pre>
+ *  &lt;xs:complexType name="group" abstract="true"&gt;
+ *    &lt;xs:annotation&gt;
+ *      &lt;xs:documentation&gt;
+ *        group type for explicit groups, named top-level groups and
+ *        group references
+ *      &lt;/xs:documentation&gt;
+ *    &lt;/xs:annotation&gt;
+ *    &lt;xs:complexContent&gt;
+ *      &lt;xs:extension base="xs:annotated"&gt;
+ *        &lt;xs:group ref="xs:particle" minOccurs="0" maxOccurs="unbounded"/&gt;
+ *        &lt;xs:attributeGroup ref="xs:defRef"/&gt;
+ *        &lt;xs:attributeGroup ref="xs:occurs"/&gt;
+ *      &lt;/xs:extension&gt;
+ *    &lt;/xs:complexContent&gt;
+ *  &lt;/xs:complexType&gt;
+ * </pre>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTGroupImpl extends XsTAnnotatedImpl implements XsTGroup {
+  private final XsAGDefRef defRef;
+  private final XsAGOccurs occurs;
+  private final XsGParticle particle;
+
+  protected XsTGroupImpl(XsObject pParent) {
+    super(pParent);
+    defRef = getObjectFactory().newXsAGDefRef(this);
+    occurs = getObjectFactory().newXsAGOccurs(this);
+    particle = getObjectFactory().newXsGParticle(this);
+  }
+
+  public void setName(XsNCName pName) {
+    defRef.setName(pName);
+  }
+
+  public XsNCName getName() {
+    return defRef.getName();
+  }
+
+  public void setRef(XsQName pRef) {
+    defRef.setRef(pRef);
+  }
+
+  public void setRef(String pRef) throws SAXException {
+    setRef(asXsQName(pRef));
+  }
+
+  public XsQName getRef() {
+    return defRef.getRef();
+  }
+
+  public void setMaxOccurs(String pMaxOccurs) {
+    occurs.setMaxOccurs(pMaxOccurs);
+  }
+
+  public int getMaxOccurs() {
+    return occurs.getMaxOccurs();
+  }
+
+  public void setMinOccurs(int pMinOccurs) {
+    occurs.setMinOccurs(pMinOccurs);
+  }
+
+  public int getMinOccurs() {
+    return occurs.getMinOccurs();
+  }
+
+  public XsTLocalElement createElement() {
+    return particle.createElement();
+  }
+
+  public XsTGroupRef createGroup() {
+    return particle.createGroup();
+  }
+
+  public XsTAll createAll() {
+    return particle.createAll();
+  }
+
+  public XsESequence createSequence() {
+    return particle.createSequence();
+  }
+
+  public XsEChoice createChoice() {
+    return particle.createChoice();
+  }
+
+  public XsEAny createAny() {
+    return particle.createAny();
+  }
+
+  public XsTParticle[] getParticles() {
+    return particle.getParticles();
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTGroupRefImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTGroupRefImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTGroupRefImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTGroupRefImpl.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.xml.impl;
+
+import org.apache.ws.jaxme.xs.xml.*;
+
+
+/** <p>Implementation of the <code>xs:groupRef</code> type,
+ * with the following specification:
+ * <pre>
+ *  <xs:complexType name="groupRef">
+ *    <xs:complexContent>
+ *      <xs:restriction base="xs:realGroup">
+ *        <xs:sequence>
+ *          <xs:element ref="xs:annotation" minOccurs="0"/>
+ *        </xs:sequence>
+ *        <xs:attribute name="ref" use="required" type="xs:QName"/>
+ *        <xs:attribute name="name" use="prohibited"/>
+ *      </xs:restriction>
+ *   </xs:complexContent>
+ * </xs:complexType>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTGroupRefImpl extends XsTRealGroupImpl implements XsTGroupRef {
+  protected XsTGroupRefImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  public void validate() {
+    super.validate();
+    if (getName() != null) {
+      throw new IllegalStateException("A group reference must not have a 'name' attribute.");
+    }
+    if (getRef() == null) {
+      throw new NullPointerException("A group reference must have a nonempty 'ref' attribute.");
+    }
+    if (getParticles().length != 0) {
+      throw new NullPointerException("A group reference must not have any 'all', 'sequence', or 'choice' elements.");
+    }
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTKeybaseImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTKeybaseImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTKeybaseImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTKeybaseImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,99 @@
+/*
+ * 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.xml.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.ws.jaxme.xs.xml.*;
+
+
+/** <p>Implementation of the <code>xs:keybase</code> type, with the
+ * following specification:
+ * <pre>
+ *  &lt;xs:complexType name="keybase"&gt;
+ *    &lt;xs:complexContent&gt;
+ *      &lt;xs:extension base="xs:annotated"&gt;
+ *        &lt;xs:sequence&gt;
+ *          &lt;xs:element ref="xs:selector"/&gt;
+ *          &lt;xs:element ref="xs:field" minOccurs="1" maxOccurs="unbounded"/&gt;
+ *        &lt;/xs:sequence&gt;
+ *        &lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
+ *      &lt;/xs:extension&gt;
+ *    &lt;/xs:complexContent&gt;
+ *  &lt;/xs:complexType&gt;
+ * </pre></p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTKeybaseImpl extends XsTAnnotatedImpl implements XsTKeybase {
+  private XsESelector selector;
+  private List fields = new ArrayList();
+  private XsNCName name;
+
+  protected XsTKeybaseImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  public XsESelector createSelector() {
+    if (selector != null) {
+      throw new IllegalStateException("Multiple 'selector' child elements are forbidden.");
+    }
+    if (fields.size() > 0) {
+      throw new IllegalStateException("The 'selector' child element must precede the 'field' child elements.");
+    }
+    selector = getObjectFactory().newXsESelector(this);
+    return selector;
+  }
+
+  public XsESelector getSelector() {
+    return selector;
+  }
+
+  public XsEField createField() {
+    if (selector == null) {
+      throw new NullPointerException("This 'field' child element must be preceded by a 'selector' child element.");
+    }
+    XsEField field = getObjectFactory().newXsEField(this);
+    fields.add(field);
+    return field;
+  }
+
+  public XsEField[] getFields() {
+    return (XsEField[]) fields.toArray(new XsEField[fields.size()]);
+  }
+
+  public void setName(XsNCName pName) {
+    name = pName;
+  }
+
+  public XsNCName getName() {
+    return name;
+  }
+
+  public void validate() {
+    if (name == null) {
+      throw new NullPointerException("Missing attribute: 'name'");
+    }
+    if (selector == null) {
+      throw new NullPointerException("Missing child element: 'selector'");
+    }
+    if (fields.size() == 0) {
+      throw new NullPointerException("Missing child element: 'field'");
+    }
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalAllElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalAllElementImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalAllElementImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalAllElementImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,51 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.xml.XsObject;
+
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTLocalAllElementImpl extends XsTLocalElementImpl {
+  protected XsTLocalAllElementImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  public void setMaxOccurs(String pValue) {
+    boolean valid = !"unbounded".equals(pValue);
+    if (valid) {
+      try {
+        int i = Integer.parseInt(pValue);
+        valid = i == 0  ||  i == 1;
+      } catch (Exception e) {
+        valid = false;
+      }
+    }
+    if (!valid) {
+      throw new IllegalArgumentException("Invalid value for 'maxOccurs': " + pValue + "; must be 0 or 1");
+    }
+    super.setMaxOccurs(pValue);
+  }
+  public void setMinOccurs(int pValue) {
+    if (pValue != 0  &&  pValue != 1) {
+      throw new IllegalArgumentException("Invalid value for 'minOccurs': " + pValue + "; must be 0 or 1");
+    }
+    super.setMinOccurs(pValue);
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalComplexTypeImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalComplexTypeImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalComplexTypeImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalComplexTypeImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,47 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.xml.*;
+
+
+/** <p>Interface of a local <code>xs:complexType</code>,
+ * following the specification below:
+ * <pre>
+ *  &lt;xs:complexType name="localComplexType"&gt;
+ *    &lt;xs:complexContent&gt;
+ *      &lt;xs:restriction base="xs:complexType"&gt;
+ *        &lt;xs:sequence&gt;
+ *          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
+ *          &lt;xs:group ref="xs:complexTypeModel"/&gt;
+ *        &lt;/xs:sequence&gt;
+ *        &lt;xs:attribute name="name" use="prohibited"/&gt;
+ *        &lt;xs:attribute name="abstract" use="prohibited"/&gt;
+ *        &lt;xs:attribute name="final" use="prohibited"/&gt;
+ *        &lt;xs:attribute name="block" use="prohibited"/&gt;
+ *      &lt;/xs:restriction&gt;
+ *    &lt;/xs:complexContent&gt;
+ *  &lt;/xs:complexType&gt;
+ * </pre></p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTLocalComplexTypeImpl  extends XsTComplexTypeImpl implements XsTLocalComplexType {
+  protected XsTLocalComplexTypeImpl(XsObject pParent) {
+    super(pParent);
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalElementImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalElementImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalElementImpl.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.xml.impl;
+
+import org.apache.ws.jaxme.xs.xml.*;
+
+
+/** <p>Implementation of the <code>xs:localElement</code> type, as
+ * specified by:
+ * <pre>
+ *  &lt;xs:complexType name="localElement"&gt;
+ *    &lt;xs:complexContent&gt;
+ *      &lt;xs:restriction base="xs:element"&gt;
+ *        &lt;xs:sequence&gt;
+ *          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
+ *          &lt;xs:choice minOccurs="0"&gt;
+ *            &lt;xs:element name="simpleType" type="xs:localSimpleType"/&gt;
+ *            &lt;xs:element name="complexType" type="xs:localComplexType"/&gt;
+ *          &lt;/xs:choice&gt;
+ *          &lt;xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/&gt;
+ *        &lt;/xs:sequence&gt;
+ *        &lt;xs:attribute name="substitutionGroup" use="prohibited"/&gt;
+ *        &lt;xs:attribute name="final" use="prohibited"/&gt;
+ *        &lt;xs:attribute name="abstract" use="prohibited"/&gt;
+ *      &lt;/xs:restriction&gt;
+ *    &lt;/xs:complexContent&gt;
+ *  &lt;/xs:complexType&gt;
+ * </pre></p>
+ * <p><em>Implementation note:</em> This class doesn't specify any
+ * additional methods. It only disables the 'substitutionGroup',
+ * 'final', and 'abstract' attributes.</p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTLocalElementImpl extends XsTElementImpl implements XsTLocalElement {
+  protected XsTLocalElementImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  public void setSubstitutionGroup(XsQName pSubstitutionGroup) {
+    throw new IllegalArgumentException("A local element must not have its 'substitutionGroup' attribute set.");
+  }
+
+  public void setSubstitutionGroup(String pSubstitutionGroup) {
+    throw new IllegalArgumentException("A local element must not have its 'substitutionGroup' attribute set.");
+  }
+
+  public void setFinal(XsDerivationSet pFinal) {
+    throw new IllegalArgumentException("A local element must not have its 'final' attribute set.");
+  }
+
+  public void setAbstract(boolean pAbstract) {
+    throw new IllegalArgumentException("A local element must not have its 'abstract' attribute set.");
+  }
+
+  public boolean isGlobal() { return false; }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalSimpleTypeImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalSimpleTypeImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalSimpleTypeImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTLocalSimpleTypeImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,63 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
+import org.apache.ws.jaxme.xs.xml.*;
+import org.xml.sax.SAXException;
+
+
+/** <p>Implementation of the <code>xs:localSimpleType</code> type,
+ * as specified by the following:
+ * <pre>
+ *  &lt;xs:complexType name="localSimpleType"&gt;
+ *    &lt;xs:complexContent&gt;
+ *      &lt;xs:restriction base="xs:simpleType"&gt;
+ *        &lt;xs:sequence&gt;
+ *          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
+ *          &lt;xs:group ref="xs:simpleDerivation"/&gt;
+ *        &lt;/xs:sequence&gt;
+ *        &lt;xs:attribute name="name" use="prohibited"&gt;
+ *          &lt;xs:annotation&gt;
+ *            &lt;xs:documentation&gt;
+ *              Forbidden when nested
+ *            &lt;/xs:documentation&gt;
+ *          &lt;/xs:annotation&gt;
+ *        &lt;/xs:attribute&gt;
+ *        &lt;xs:attribute name="final" use="prohibited"/&gt;
+ *      &lt;/xs:restriction&gt;
+ *    &lt;/xs:complexContent&gt;
+ *  &lt;/xs:complexType&gt;
+ * </pre></p>
+ * <p><em>Implementation note:</em> The implementation must ensure,
+ * that the 'final' and 'name' attributes aren't set.</p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTLocalSimpleTypeImpl extends XsTSimpleTypeImpl implements XsTLocalSimpleType {
+  protected XsTLocalSimpleTypeImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  public void setName(XsNCName pName) throws SAXException {
+    throw new LocSAXException("A local simpleType must not have its 'name' attribute set.", getLocator());
+  }
+
+  public void setFinal(XsSimpleDerivationSet pFinal) throws SAXException {
+    throw new LocSAXException("A local simpleType must not have its 'final' attribute set.", getLocator());
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTNamedGroupImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTNamedGroupImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTNamedGroupImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTNamedGroupImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,141 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.xml.*;
+
+
+/** <p>Implementation of a named top-level group, with the following
+ * specification:
+ * <pre>
+ *  &lt;xs:complexType name="namedGroup"&gt;
+ *    &lt;xs:annotation&gt;
+ *      &lt;xs:documentation&gt;
+ *        Should derive this from realGroup, but too complicated for now
+ *      &lt;/xs:documentation&gt;
+ *    &lt;/xs:annotation&gt;
+ *    &lt;xs:sequence&gt;
+ *      &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
+ *      &lt;xs:choice minOccurs="1" maxOccurs="1"&gt;
+ *        &lt;xs:element name="all"&gt;
+ *          &lt;xs:complexType&gt;
+ *            &lt;xs:complexContent&gt;
+ *              &lt;xs:restriction base="xs:all"&gt;
+ *                &lt;xs:group ref="xs:allModel"/&gt;
+ *                &lt;xs:attribute name="minOccurs" use="prohibited"/&gt;
+ *                &lt;xs:attribute name="maxOccurs" use="prohibited"/&gt;
+ *              &lt;/xs:restriction&gt;
+ *            &lt;/xs:complexContent&gt;
+ *          &lt;/xs:complexType&gt;
+ *        &lt;/xs:element&gt;
+ *        &lt;xs:element name="choice" type="xs:simpleExplicitGroup"/&gt;
+ *        &lt;xs:element name="sequence" type="xs:simpleExplicitGroup"/&gt;
+ *      &lt;/xs:choice&gt;
+ *    &lt;/xs:sequence&gt;
+ *    &lt;xs:attribute name="name" use="required" type="xs:NCName"/&gt;
+ *    &lt;xs:attribute name="ref" use="prohibited"/&gt;
+ *    &lt;xs:attribute name="minOccurs" use="prohibited"/&gt;
+ *    &lt;xs:attribute name="maxOccurs" use="prohibited"/&gt;
+ *  &lt;/xs:complexType&gt;
+ * &lt;/pre>&lt;/p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTNamedGroupImpl extends XsTAnnotatedImpl implements XsTNamedGroup {
+  private XsGAllModel all;
+  private XsTSimpleExplicitGroup sequence, choice;
+  private XsNCName name;
+
+  protected XsTNamedGroupImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  public void setName(XsNCName pName) {
+    name = pName;
+  }
+
+  public XsNCName getName() {
+    return name;
+  }
+
+  public XsGAllModel createAll() {
+    if (all != null) {
+      throw new IllegalStateException("Multiple 'all' child elements are forbidden.");
+    }
+    if (choice != null) {
+      throw new IllegalStateException("The 'choice' and 'all' child elements are mutually exclusive.");
+    }
+    if (sequence != null) {
+      throw new IllegalStateException("The 'sequence' and 'all' child elements are mutually exclusive.");
+    }
+    return all = getObjectFactory().newXsGAllModel(this);
+  }
+
+  public XsGAllModel getAll() {
+    return all;
+  }
+
+  public XsTSimpleExplicitGroup createSequence() {
+    if (sequence != null) {
+      throw new IllegalStateException("Multiple 'sequence' child elements are forbidden.");
+    }
+    if (all != null) {
+      throw new IllegalStateException("The 'all' and 'sequence' child elements are mutually exclusive.");
+    }
+    if (choice != null) {
+      throw new IllegalStateException("The 'all' and 'sequence' child elements are mutually exclusive.");
+    }
+    return sequence = getObjectFactory().newXsTSimpleExplicitGroup(this);
+  }
+
+  public XsTSimpleExplicitGroup getSequence() {
+    return sequence;
+  }
+
+  public XsTSimpleExplicitGroup createChoice() {
+    if (choice != null) {
+      throw new IllegalStateException("Multiple 'choice' elements are forbidden.");
+    }
+    if (sequence != null) {
+      throw new IllegalStateException("The 'sequence' and 'choice' elements are mutually exclusive.");
+    }
+    if (all != null) {
+      throw new IllegalStateException("The 'all' and 'choice' elements are mutually exclusive.");
+    }
+    return choice = getObjectFactory().newXsTSimpleExplicitGroup(this);
+  }
+
+  public XsTSimpleExplicitGroup getChoice() {
+    return choice;
+  }
+
+  public void validate() {
+    XsGAllModel myAll = getAll();
+    if (myAll == null) {
+      XsTSimpleExplicitGroup mySequence = getSequence();
+      if (mySequence == null) {
+        XsTSimpleExplicitGroup myChoice = getChoice();
+        if (myChoice == null) {
+          throw new NullPointerException("Neither of the 'all', 'choice', or 'sequence' elements are given.");
+        } else {
+        }
+      } else {
+      }
+    } else {
+    }
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTNumFacetImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTNumFacetImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTNumFacetImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTNumFacetImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,65 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
+import org.apache.ws.jaxme.xs.xml.*;
+import org.xml.sax.SAXException;
+
+/** <p>Implementation of <code>xs:numFacet</code>, following
+ * this specification:
+ * <pre>
+ *  &lt;xs:complexType name="numFacet"&gt;
+ *    &lt;xs:complexContent&gt;
+ *      &lt;xs:restriction base="xs:facet"&gt;
+ *        &lt;xs:sequence&gt;
+ *          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
+ *        &lt;/xs:sequence&gt;
+ *        &lt;xs:attribute name="value" type="xs:nonNegativeInteger" use="required"/&gt;
+ *      &lt;/xs:restriction&gt;
+ *    &lt;/xs:complexContent&gt;
+ *  &lt;/xs:complexType&gt;
+ * </pre></p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public abstract class XsTNumFacetImpl extends XsTFixedFacetImpl
+    implements XsTNumFacet {
+  private long value = -1;
+
+  protected XsTNumFacetImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  public void setValue(long pValue) throws SAXException {
+    if (pValue < 0) {
+      throw new LocSAXException("The 'value' attribute must not be negative.", getLocator());
+    }
+    value = pValue;
+  }
+
+  public long getValue() {
+    return value;
+  }
+
+  public void validate() throws SAXException {
+    super.validate();
+    if (value == -1) {
+      throw new LocSAXException("Missing 'value' attribute.", getLocator());
+    }
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTOpenAttrsImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTOpenAttrsImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTOpenAttrsImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTOpenAttrsImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,74 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.XSParser;
+import org.apache.ws.jaxme.xs.xml.*;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
+
+
+/** <p>A common base type for most of the schema elements.
+ * Implements the following specification:
+ * <pre>
+ *  &lt;xs:complexType name="openAttrs">
+ *    &lt;xs:annotation>
+ *      &lt;xs:documentation>
+ *        This type is extended by almost all schema types
+ *        to allow attributes from other namespaces to be
+ *        added to user schemas.
+ *      &lt;/xs:documentation>
+ *    &lt;/xs:annotation>
+ *    &lt;xs:complexContent>
+ *      &lt;xs:restriction base="xs:anyType">
+ *        &lt;xs:anyAttribute namespace="##other" processContents="lax"/>
+ *      &lt;/xs:restriction>
+ *    &lt;/xs:complexContent>
+ *  &lt;/xs:complexType&gt;
+ * </pre>
+ * 
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTOpenAttrsImpl extends XsObjectImpl implements XsTOpenAttrs {
+  private AttributesImpl attributes = new AttributesImpl();
+
+  protected XsTOpenAttrsImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  public Attributes getOpenAttributes() {
+    return attributes;
+  }
+
+  /** <p>This method receives all the attributes, including those from the
+   * XML schema namespace. The method refuses to handle the attribute, if
+   * it has the XML schema namespace by returning the value false. Otherwise,
+   * the attribute is added to the list returned by {@link #getOpenAttributes()}
+   * and the value true is returned.</p>
+   */
+  public boolean setAttribute(String pQName, String pNamespaceURI, String pLocalName, String pValue)
+      throws SAXException {
+    if (pNamespaceURI == null  ||  "".equals(pNamespaceURI)) {
+      return false;
+    } else if (XSParser.XML_SCHEMA_URI.equals(pNamespaceURI)) {
+      throw new IllegalStateException("Unknown attribute in " + getClass().getName() + ": " + pQName);
+    }
+    attributes.addAttribute(pNamespaceURI, pLocalName, pQName, "CDATA", pValue);
+    return true;
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTRealGroupImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTRealGroupImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTRealGroupImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTRealGroupImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,81 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.xml.*;
+
+
+/** <p>Implementation of the <code>xs:realGroup</code> type, as specified
+ * by the following:
+ * <pre>
+ *  &lt;xs:complexType name="realGroup"&gt;
+ *    &lt;xs:complexContent&gt;
+ *      &lt;xs:restriction base="xs:group"&gt;
+ *        &lt;xs:sequence&gt;
+ *          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
+ *          &lt;xs:choice minOccurs="0" maxOccurs="1"&gt;
+ *            &lt;xs:element ref="xs:all"/&gt;
+ *            &lt;xs:element ref="xs:choice"/&gt;
+ *            &lt;xs:element ref="xs:sequence"/&gt;
+ *          &lt;/xs:choice&gt;
+ *        &lt;/xs:sequence&gt;
+ *      &lt;/xs:restriction&gt;
+ *    &lt;/xs:complexContent&gt;
+ *  &lt;/xs:complexType&gt;
+ * </pre></p>
+ * <p><em>Implementation note:</em> This interface does not define
+ * any additional methods. However, the <code>validate()</code>
+ * method must ensure, that either of <code>xs:all</code>,
+ * <code>xs:choice</code>, or <code>xs:sequence</code> is set.</p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTRealGroupImpl extends XsTGroupImpl implements XsTRealGroup {
+  protected XsTRealGroupImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  public XsTGroupRef createGroup() {
+    throw new IllegalStateException("This group must not reference other groups.");
+  }
+
+  public XsEAny createAny() {
+    throw new IllegalStateException("This group must not have an an 'any' element.");
+  }
+
+  public XsTLocalElement createElement() {
+    throw new IllegalStateException("This group must not have an 'element' child element.");
+  }
+
+  public XsESequence createSequence() {
+    return super.createSequence();
+  }
+
+  public XsEChoice createChoice() {
+    return super.createChoice();
+  }
+
+  public XsTAll createAll() {
+    return super.createAll();
+  }
+
+  public void validate() {
+    if (getParticles().length > 1) {
+      throw new IllegalStateException("This group must have exactly a single 'sequence', 'choice', or 'all' element.");
+    }
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTRestrictionTypeImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTRestrictionTypeImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTRestrictionTypeImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTRestrictionTypeImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,236 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
+import org.apache.ws.jaxme.xs.xml.*;
+import org.xml.sax.SAXException;
+
+
+/** <p>Implementation of <code>xs:restrictionType</code>,
+ * as specified by the following:
+ * <pre>
+ *  &lt;xs:complexType name="restrictionType"&gt;
+ *    &lt;xs:complexContent&gt;
+ *      &lt;xs:extension base="xs:annotated"&gt;
+ *        &lt;xs:sequence&gt;
+ *          &lt;xs:choice&gt;
+ *            &lt;xs:group ref="xs:typeDefParticle" minOccurs="0"/&gt;
+ *            &lt;xs:group ref="xs:simpleRestrictionModel" minOccurs="0"/&gt;
+ *          &lt;/xs:choice&gt;
+ *          &lt;xs:group ref="xs:attrDecls"/&gt;
+ *        &lt;/xs:sequence&gt;
+ *        &lt;xs:attribute name="base" type="xs:QName" use="required"/&gt;
+ *      &lt;/xs:extension&gt;
+ *    &lt;/xs:complexContent&gt;
+ *  &lt;/xs:complexType&gt;
+ * </pre></p>
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTRestrictionTypeImpl extends XsTAnnotatedImpl
+    implements XsTRestrictionType {
+  private XsQName base;
+  private final XsGTypeDefParticle typeDefParticle;
+  private final XsGSimpleRestrictionModel simpleRestrictionModel;
+  private final XsGAttrDecls attrDecls;
+
+  protected XsTRestrictionTypeImpl(XsObject pParent) {
+    super(pParent);
+    typeDefParticle = getObjectFactory().newXsGTypeDefParticle(this);
+    simpleRestrictionModel = getObjectFactory().newXsGSimpleRestrictionModel(this);
+    attrDecls = getObjectFactory().newXsGAttrDecls(this);
+  }
+
+  public void setBase(XsQName pBase) {
+    base = pBase;
+  }
+
+  public void setBase(String pBase) throws SAXException {
+    setBase(asXsQName(pBase));
+  }
+
+  public XsQName getBase() {
+    return base;
+  }
+
+  public XsTGroupRef createGroup() {
+    return typeDefParticle.createGroup();
+  }
+
+  public XsTAll createAll() {
+    return typeDefParticle.createAll();
+  }
+
+  public XsESequence createSequence() {
+    return typeDefParticle.createSequence();
+  }
+
+  public XsEChoice createChoice() {
+    return typeDefParticle.createChoice();
+  }
+
+  public XsTTypeDefParticle getTypeDefParticle() {
+    return typeDefParticle.getTypeDefParticle();
+  }
+
+  public XsTLocalSimpleType createSimpleType() throws SAXException {
+    return simpleRestrictionModel.createSimpleType();
+  }
+
+  public XsTLocalSimpleType getSimpleType() {
+    return simpleRestrictionModel.getSimpleType();
+  }
+
+  public XsEMinExclusive createMinExclusive() throws SAXException {
+    return simpleRestrictionModel.createMinExclusive();
+  }
+
+  public XsEMinExclusive getMinExclusive() {
+    return simpleRestrictionModel.getMinExclusive();
+  }
+
+  public XsEMinInclusive createMinInclusive() throws SAXException {
+    return simpleRestrictionModel.createMinInclusive();
+  }
+
+  public XsEMinInclusive getMinInclusive() {
+    return simpleRestrictionModel.getMinInclusive();
+  }
+
+  public XsEMaxExclusive createMaxExclusive() throws SAXException {
+    return simpleRestrictionModel.createMaxExclusive();
+  }
+
+  public XsEMaxExclusive getMaxExclusive() {
+    return simpleRestrictionModel.getMaxExclusive();
+  }
+
+  public XsEMaxInclusive createMaxInclusive() throws SAXException {
+    return simpleRestrictionModel.createMaxInclusive();
+  }
+
+  public XsEMaxInclusive getMaxInclusive() {
+    return simpleRestrictionModel.getMaxInclusive();
+  }
+
+  public XsETotalDigits createTotalDigits() throws SAXException {
+    return simpleRestrictionModel.createTotalDigits();
+  }
+
+  public XsETotalDigits getTotalDigits() {
+    return simpleRestrictionModel.getTotalDigits();
+  }
+
+  public XsEFractionDigits createFractionDigits() throws SAXException {
+    return simpleRestrictionModel.createFractionDigits();
+  }
+
+  public XsEFractionDigits getFractionDigits() {
+    return simpleRestrictionModel.getFractionDigits();
+  }
+
+  public XsELength createLength() throws SAXException {
+    return simpleRestrictionModel.createLength();
+  }
+
+  public XsELength getLength() {
+    return simpleRestrictionModel.getLength();
+  }
+
+  public XsEMinLength createMinLength() throws SAXException {
+    return simpleRestrictionModel.createMinLength();
+  }
+
+  public XsEMinLength getMinLength() {
+    return simpleRestrictionModel.getMinLength();
+  }
+
+  public XsEMaxLength createMaxLength() throws SAXException {
+    return simpleRestrictionModel.createMaxLength();
+  }
+
+  public XsEMaxLength getMaxLength() {
+    return simpleRestrictionModel.getMaxLength();
+  }
+
+  public XsEWhiteSpace createWhiteSpace() throws SAXException {
+    return simpleRestrictionModel.createWhiteSpace();
+  }
+
+  public XsEWhiteSpace getWhiteSpace() {
+    return simpleRestrictionModel.getWhiteSpace();
+  }
+
+  public XsEPattern createPattern() throws SAXException {
+    return simpleRestrictionModel.createPattern();
+  }
+
+  public XsEPattern[] getPatterns() {
+    return simpleRestrictionModel.getPatterns();
+  }
+
+  public XsEEnumeration createEnumeration() throws SAXException {
+    return simpleRestrictionModel.createEnumeration();
+  }
+
+  public XsEEnumeration[] getEnumerations() {
+    return simpleRestrictionModel.getEnumerations();
+  }
+
+  public boolean hasFacets() {
+    return simpleRestrictionModel.hasFacets();
+  }
+
+  public XsTFacetBase[] getFacets() {
+    return simpleRestrictionModel.getFacets();
+  }
+
+  public XsTAttribute createAttribute() {
+    return attrDecls.createAttribute();
+  }
+
+  public XsTAttribute[] getAttributes() {
+    return attrDecls.getAttributes();
+  }
+
+  public XsTAttributeGroupRef createAttributeGroup() {
+    return attrDecls.createAttributeGroup();
+  }
+
+  public XsTAttributeGroupRef[] getAttributeGroups() {
+    return attrDecls.getAttributeGroups();
+  }
+
+  public XsTWildcard createAnyAttribute() {
+    return attrDecls.createAnyAttribute();
+  }
+
+  public XsTWildcard getAnyAttribute() {
+    return attrDecls.getAnyAttribute();
+  }
+
+  public Object[] getAllAttributes() {
+    return attrDecls.getAllAttributes();
+  }
+
+  public void validate() throws SAXException {
+    super.validate();
+    if (base == null) {
+      throw new LocSAXException("The 'base' attribute must be set.", getLocator());
+    }
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleExplicitGroupImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleExplicitGroupImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleExplicitGroupImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleExplicitGroupImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,78 @@
+/*
+ * 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.xml.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.ws.jaxme.xs.xml.XsEAny;
+import org.apache.ws.jaxme.xs.xml.XsEChoice;
+import org.apache.ws.jaxme.xs.xml.XsESequence;
+import org.apache.ws.jaxme.xs.xml.XsObject;
+import org.apache.ws.jaxme.xs.xml.XsTGroupRef;
+import org.apache.ws.jaxme.xs.xml.XsTLocalElement;
+import org.apache.ws.jaxme.xs.xml.XsTNestedParticle;
+import org.apache.ws.jaxme.xs.xml.XsTSimpleExplicitGroup;
+
+/**
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTSimpleExplicitGroupImpl extends XsTAnnotatedImpl implements XsTSimpleExplicitGroup {
+  private final List particles = new ArrayList();
+
+  protected XsTSimpleExplicitGroupImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  protected void addParticle(XsTNestedParticle pParticle) {
+    particles.add(pParticle);
+  }
+
+  public XsTLocalElement createElement() {
+    XsTLocalElement element = getObjectFactory().newXsTLocalElement(this);
+    addParticle(element);
+    return element;
+  }
+
+  public XsTGroupRef createGroup() {
+    XsTGroupRef groupRef = getObjectFactory().newXsTGroupRef(this);
+    addParticle(groupRef);
+    return groupRef;
+  }
+
+  public XsEChoice createChoice() {
+    XsEChoice choice = getObjectFactory().newXsEChoice(this);
+    addParticle(choice);
+    return choice;
+  }
+
+  public XsESequence createSequence() {
+    XsESequence sequence = getObjectFactory().newXsESequence(this);
+    addParticle(sequence);
+    return sequence;
+  }
+
+  public XsEAny createAny() {
+    XsEAny any = getObjectFactory().newXsEAny(this);
+    addParticle(any);
+    return any;
+  }
+
+  public XsTNestedParticle[] getParticles() {
+    return (XsTNestedParticle[]) particles.toArray(new XsTNestedParticle[particles.size()]);
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleExtensionTypeImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleExtensionTypeImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleExtensionTypeImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleExtensionTypeImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,101 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
+import org.apache.ws.jaxme.xs.xml.*;
+import org.xml.sax.SAXException;
+
+
+/** <p>Implementation of the <code>xs:simpleExtensionType</code>, as
+ * specified by:
+ * <pre>
+ *  <xs:complexType name="simpleExtensionType">
+ *    <xs:complexContent>
+ *      <xs:restriction base="xs:extensionType">
+ *        <xs:sequence>
+ *          <xs:annotation>
+ *            <xs:documentation>
+ *              No typeDefParticle group reference
+ *            </xs:documentation>
+ *          </xs:annotation>
+ *          <xs:element ref="xs:annotation" minOccurs="0"/>
+ *          <xs:group ref="xs:attrDecls"/>
+ *        </xs:sequence>
+ *      </xs:restriction>
+ *    </xs:complexContent>
+ *  </xs:complexType>
+ * </pre></p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTSimpleExtensionTypeImpl extends XsTAnnotatedImpl implements XsTSimpleExtensionType {
+  private XsQName base;
+  private final XsGAttrDecls attrDecls;
+
+  protected XsTSimpleExtensionTypeImpl(XsObject pParent) {
+    super(pParent);
+    attrDecls = getObjectFactory().newXsGAttrDecls(this);
+  }
+
+  public void setBase(XsQName pBase) {
+    base = pBase;
+  }
+
+  public void setBase(String pBase) throws SAXException {
+    setBase(asXsQName(pBase));
+  }
+
+  public XsQName getBase() {
+    return base;
+  }
+
+  public void validate() throws SAXException {
+    super.validate();
+    if (getBase() == null) {
+      throw new LocSAXException("The 'base' attribute must be set.", getLocator());
+    }
+  }
+
+  public XsTAttribute createAttribute() {
+    return attrDecls.createAttribute();
+  }
+
+  public XsTAttribute[] getAttributes() {
+    return attrDecls.getAttributes();
+  }
+
+  public XsTAttributeGroupRef createAttributeGroup() {
+    return attrDecls.createAttributeGroup();
+  }
+
+  public XsTAttributeGroupRef[] getAttributeGroups() {
+    return attrDecls.getAttributeGroups();
+  }
+
+  public XsTWildcard createAnyAttribute() {
+    return attrDecls.createAnyAttribute();
+  }
+
+  public XsTWildcard getAnyAttribute() {
+    return attrDecls.getAnyAttribute();
+  }
+
+  public Object[] getAllAttributes() {
+    return attrDecls.getAllAttributes();
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleRestrictionTypeImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleRestrictionTypeImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleRestrictionTypeImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleRestrictionTypeImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,187 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.xml.*;
+import org.xml.sax.SAXException;
+
+
+/** <p>Implementation of <code>xs:simpleRestrictionType</code>,
+ * as specified by the following:
+ * <pre>
+ *  &lt;xs:complexType name="simpleRestrictionType"&gt;
+ *    &lt;xs:complexContent&gt;
+ *      &lt;xs:restriction base="xs:restrictionType"&gt;
+ *        &lt;xs:sequence&gt;
+ *          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
+ *          &lt;xs:group ref="xs:simpleRestrictionModel" minOccurs="0"/&gt;
+ *          &lt;xs:group ref="xs:attrDecls"/&gt;
+ *        &lt;/xs:sequence&gt;
+ *      &lt;/xs:restriction&gt;
+ *    &lt;/xs:complexContent&gt;
+ *  &lt;/xs:complexType&gt;
+ * </pre></p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTSimpleRestrictionTypeImpl extends XsTRestrictionTypeImpl
+    implements XsTSimpleRestrictionType {
+  private final XsGSimpleRestrictionModel impl;
+  private final XsGAttrDecls decls;
+
+  protected XsTSimpleRestrictionTypeImpl(XsObject pParent) {
+    super(pParent);
+    impl = getObjectFactory().newXsGSimpleRestrictionModel(this);
+    decls = getObjectFactory().newXsGAttrDecls(this);
+  }
+
+  public XsTLocalSimpleType createSimpleType() throws SAXException {
+    return impl.createSimpleType();
+  }
+
+  public XsTLocalSimpleType getSimpleType() {
+    return impl.getSimpleType();
+  }
+
+  public XsEMaxExclusive getMaxExclusive() {
+    return impl.getMaxExclusive();
+  }
+
+  public XsEMinExclusive createMinExclusive() throws SAXException {
+    return impl.getMinExclusive();
+  }
+
+  public XsEMinExclusive getMinExclusive() {
+    return impl.getMinExclusive();
+  }
+
+  public XsEMaxInclusive createMaxInclusive() throws SAXException {
+    return impl.createMaxInclusive();
+  }
+
+  public XsEMaxInclusive getMaxInclusive() {
+    return impl.getMaxInclusive();
+  }
+
+  public XsEMinInclusive createMinInclusive() throws SAXException {
+    return impl.createMinInclusive();
+  }
+
+  public XsEMinInclusive getMinInclusive() {
+    return impl.getMinInclusive();
+  }
+
+  public XsETotalDigits createTotalDigits() throws SAXException {
+    return impl.createTotalDigits();
+  }
+
+  public XsETotalDigits getTotalDigits() {
+    return impl.getTotalDigits();
+  }
+
+  public XsEFractionDigits createFractionDigits() throws SAXException {
+    return impl.createFractionDigits();
+  }
+
+  public XsEFractionDigits getFractionDigits() {
+    return impl.getFractionDigits();
+  }
+
+  public XsELength createLength() throws SAXException {
+    return impl.createLength();
+  }
+
+  public XsELength getLength() {
+    return impl.getLength();
+  }
+
+  public XsEMinLength createMinLength() throws SAXException {
+    return impl.createMinLength();
+  }
+
+  public XsEMinLength getMinLength() {
+    return impl.getMinLength();
+  }
+
+  public XsEMaxLength createMaxLength() throws SAXException {
+    return impl.createMaxLength();
+  }
+
+  public XsEMaxLength getMaxLength() {
+    return impl.getMaxLength();
+  }
+
+  public XsEWhiteSpace createWhiteSpace() throws SAXException {
+    return impl.createWhiteSpace();
+  }
+
+  public XsEWhiteSpace getWhiteSpace() {
+    return impl.getWhiteSpace();
+  }
+
+  public XsEPattern createPattern() throws SAXException {
+    return impl.createPattern();
+  }
+
+  public XsEPattern[] getPatterns() {
+    return impl.getPatterns();
+  }
+
+  public XsEEnumeration createEnumeration() throws SAXException {
+    return impl.createEnumeration();
+  }
+
+  public XsEEnumeration[] getEnumerations() {
+    return impl.getEnumerations();
+  }
+
+  public boolean hasFacets() {
+    return impl.hasFacets();
+  }
+
+  public XsTFacetBase[] getFacets() {
+    return impl.getFacets();
+  }
+
+  public XsTAttribute createAttribute() {
+    return decls.createAttribute();
+  }
+
+  public XsTAttribute[] getAttributes() {
+    return decls.getAttributes();
+  }
+
+  public XsTAttributeGroupRef createAttributeGroup() {
+    return decls.createAttributeGroup();
+  }
+
+  public XsTAttributeGroupRef[] getAttributeGroups() {
+    return decls.getAttributeGroups();
+  }
+
+  public XsTWildcard createAnyAttribute() {
+    return decls.createAnyAttribute();
+  }
+
+  public XsTWildcard getAnyAttribute() {
+    return decls.getAnyAttribute();
+  }
+
+  public Object[] getAllAttributes() {
+    return decls.getAllAttributes();
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleTypeImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleTypeImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleTypeImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTSimpleTypeImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,120 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
+import org.apache.ws.jaxme.xs.xml.*;
+import org.xml.sax.SAXException;
+
+
+/** <p>Implementation of the following specification for
+ * <code>xs:simpleType</code>:
+ * <pre>
+ *  &lt;xs:complexType name="simpleType" abstract="true"&gt;
+ *    &lt;xs:complexContent&gt;
+ *      &lt;xs:extension base="xs:annotated"&gt;
+ *        &lt;xs:group ref="xs:simpleDerivation"/&gt;
+ *        &lt;xs:attribute name="final" type="xs:simpleDerivationSet"/&gt;
+ *        &lt;xs:attribute name="name" type="xs:NCName"&gt;
+ *          &lt;xs:annotation&gt;
+ *            &lt;xs:documentation&gt;
+ *              Can be restricted to required or forbidden
+ *            &lt;/xs:documentation&gt;
+ *          &lt;/xs:annotation&gt;
+ *        &lt;/xs:attribute&gt;
+ *      &lt;/xs:extension&gt;
+ *    &lt;/xs:complexContent&gt;
+ *  &lt;/xs:complexType&gt;
+ *
+ *  &lt;xs:group name="simpleDerivation"&gt;
+ *    &lt;xs:choice&gt;
+ *      &lt;xs:element ref="xs:restriction"/&gt;
+ *      &lt;xs:element ref="xs:list"/&gt;
+ *      &lt;xs:element ref="xs:union"/&gt;
+ *    &lt;/xs:choice&gt;
+ *  &lt;/xs:group&gt;
+ * </pre></p>
+ *
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTSimpleTypeImpl extends XsTAnnotatedImpl implements XsTSimpleType {
+  private XsERestriction restriction;
+  private XsEList list;
+  private XsEUnion union;
+  private XsSimpleDerivationSet finalSet;
+  private XsNCName name;
+
+  protected XsTSimpleTypeImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  public XsERestriction createRestriction() throws SAXException {
+    if (restriction != null  ||  list != null  ||  union != null) {
+      throw new LocSAXException("Only one 'restriction', 'list', or 'union' child element is allowed.", getLocator());
+    }
+    return restriction = getObjectFactory().newXsERestriction(this);
+  }
+
+  public XsERestriction getRestriction() {
+    return restriction;
+  }
+
+  public XsEList createList() throws SAXException {
+    if (restriction != null  ||  list != null  ||  union != null) {
+      throw new LocSAXException("Only one 'restriction', 'list', or 'union' child element is allowed.", getLocator());
+    }
+    return list = getObjectFactory().newXsEList(this);
+  }
+
+  public XsEList getList() {
+    return list;
+  }
+
+  public XsEUnion createUnion() throws SAXException {
+    if (restriction != null  ||  list != null  ||  union != null) {
+      throw new LocSAXException("Only one 'restriction', 'list', or 'union' child element is allowed.", getLocator());
+    }
+    return union = getObjectFactory().newXsEUnion(this);
+  }
+
+  public XsEUnion getUnion() {
+    return union;
+  }
+
+  public void setFinal(XsSimpleDerivationSet pSet) throws SAXException {
+    finalSet = pSet;
+  }
+
+  public XsSimpleDerivationSet getFinal() {
+    return finalSet;
+  }
+
+  public void setName(XsNCName pName) throws SAXException {
+    name = pName;
+  }
+
+  public XsNCName getName() {
+    return name;
+  }
+
+  public void validate() throws SAXException {
+    super.validate();
+    if (restriction == null  &&  list == null  &&  union == null) {
+      throw new LocSAXException("Expected either of 'restriction', 'list' or 'union' child element.", getLocator());
+    }
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTTopLevelComplexTypeImpl.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTTopLevelComplexTypeImpl.java?view=auto&rev=478855
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTTopLevelComplexTypeImpl.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-xs/src/main/java/org/apache/ws/jaxme/xs/xml/impl/XsTTopLevelComplexTypeImpl.java Fri Nov 24 04:14:48 2006
@@ -0,0 +1,97 @@
+/*
+ * 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.xml.impl;
+
+import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
+import org.apache.ws.jaxme.xs.xml.*;
+import org.xml.sax.SAXException;
+
+
+/** <p>Implementation of a top level <code>xs:complexType</code>,
+ * following the specification below:
+ * <pre>
+ *  &lt;xs:complexType name="topLevelComplexType"&gt;
+ *    &lt;xs:complexContent&gt;
+ *      &lt;xs:restriction base="xs:complexType"&gt;
+ *        &lt;xs:sequence&gt;
+ *          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
+ *          &lt;xs:group ref="xs:complexTypeModel"/&gt;
+ *        &lt;/xs:sequence&gt;
+ *        &lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
+ *      &lt;/xs:restriction&gt;
+ *    &lt;/xs:complexContent&gt;
+ *  &lt;/xs:complexType&gt;
+ * </pre></p>
+ * @author <a href="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
+ */
+public class XsTTopLevelComplexTypeImpl extends XsTComplexTypeImpl implements XsTTopLevelComplexType {
+  private XsNCName name;
+  private boolean isMixed, isAbstract;
+  private XsDerivationSet finalSet;
+  private XsDerivationSet blockSet;
+
+  protected XsTTopLevelComplexTypeImpl(XsObject pParent) {
+    super(pParent);
+  }
+
+  public void setName(XsNCName pName) {
+    name = pName;
+  }
+
+  public XsNCName getName() {
+    return name;
+  }
+
+  public void setMixed(boolean pMixed) {
+    isMixed = pMixed;
+  }
+
+  public boolean isMixed() {
+    return isMixed;
+  }
+
+  public void setAbstract(boolean pAbstract) {
+    isAbstract = pAbstract;
+  }
+
+  public boolean isAbstract() {
+    return isAbstract;
+  }
+
+  public void setFinal(XsDerivationSet pFinal) {
+    finalSet = pFinal;
+  }
+
+  public XsDerivationSet getFinal() {
+    return finalSet;
+  }
+
+  public void setBlock(XsDerivationSet pBlock) {
+    blockSet = pBlock;
+  }
+
+  public XsDerivationSet getBlock() {
+    return blockSet;
+  }
+
+  public void validate() throws SAXException {
+    super.validate();
+    if (name == null) {
+      throw new LocSAXException("Missing attribute: 'name'", getLocator());
+    }
+  }
+}



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