Package org.apache.ws.jaxme.xs.xml

Examples of org.apache.ws.jaxme.xs.xml.XsEChoice


          throw new SAXParseException("Mixed content must be either #PCDATA or have multiplicity '*'",
                                        pLocator);
        } else {
          XsTLocalComplexType complexType = pElement.createComplexType();
            complexType.setMixed(true);
            XsEChoice choice = complexType.createChoice();
            choice.setMinOccurs(0);
            choice.setMaxOccurs("unbounded");
            while (!"".equals(pModel)) {
              if (pModel.startsWith("|")) {
                pModel = pModel.substring(1).trim();
                } else {
                  throw new SAXParseException("Expected '|' while parsing mixed content", pLocator);
                }
                int offset = pModel.indexOf('|');
                String name;
                if (offset == -1) {
                    name = pModel.trim();
                    pModel = "";
                } else {
                  name = pModel.substring(0, offset).trim();
                    pModel = pModel.substring(offset);
                }
                if (elements.containsKey(name)) {
                  XsTLocalElement e = choice.createElement();
                    e.setRef(new XsQName(getTargetNamespace(), getLocalPart(name)));
                } else {
                  throw new SAXParseException("Element " + pElement.getName()
                                                + " references element " + name
                                                + ", which is not declared",
View Full Code Here


    addParticle(groupRef);
    return groupRef;
  }

  public XsEChoice createChoice() {
    XsEChoice choice = getObjectFactory().newXsEChoice(this);
    addParticle(choice);
    return choice;
  }
View Full Code Here

      occurs = any;
      XSAny wildcard = getXSSchema().getXSObjectFactory().newXSAny(this, any);
      wildcard.validate();
      p = new XSParticleImpl(wildcard);
    } else if (pParticle instanceof XsEChoice) {
      XsEChoice choice = (XsEChoice) pParticle;
      occurs = choice;
      XSGroup group = getXSSchema().getXSObjectFactory().newXSGroup(this, choice);
      group.validate();
      p = new XSParticleImpl(group);
    } else if (pParticle instanceof XsESequence) {
View Full Code Here

      occurs = any;
      XSAny wildcard = getXSSchema().getXSObjectFactory().newXSAny(this, any);
      wildcard.validate();
      p = new XSParticleImpl(wildcard);
    } else if (pParticle instanceof XsEChoice) {
      XsEChoice choice = (XsEChoice) pParticle;
      occurs = choice;
      XSGroup group = getXSSchema().getXSObjectFactory().newXSGroup(this, choice);
      group.validate();
      p = new XSParticleImpl(group);
    } else if (pParticle instanceof XsESequence) {
View Full Code Here

          throw new SAXParseException("Mixed content must be either #PCDATA or have multiplicity '*'",
                                        pLocator);
        } else {
          XsTLocalComplexType complexType = pElement.createComplexType();
            complexType.setMixed(true);
            XsEChoice choice = complexType.createChoice();
            choice.setMinOccurs(0);
            choice.setMaxOccurs("unbounded");
            while (!"".equals(pModel)) {
              if (pModel.startsWith("|")) {
                pModel = pModel.substring(1).trim();
                } else {
                  throw new SAXParseException("Expected '|' while parsing mixed content", pLocator);
                }
                int offset = pModel.indexOf('|');
                String name;
                if (offset == -1) {
                    name = pModel.trim();
                    pModel = "";
                } else {
                  name = pModel.substring(0, offset).trim();
                    pModel = pModel.substring(offset);
                }
                if (elements.containsKey(name)) {
                  XsTLocalElement e = choice.createElement();
                    e.setRef(new XsQName(getTargetNamespace(), getLocalPart(name)));
                } else {
                  throw new SAXParseException("Element " + pElement.getName()
                                                + " references element " + name
                                                + ", which is not declared",
View Full Code Here

          throw new SAXParseException("Mixed content must be either #PCDATA or have multiplicity '*'",
                                        pLocator);
        } else {
          XsTLocalComplexType complexType = pElement.createComplexType();
            complexType.setMixed(true);
            XsEChoice choice = complexType.createChoice();
            choice.setMinOccurs(0);
            choice.setMaxOccurs("unbounded");
            while (!"".equals(pModel)) {
              if (pModel.startsWith("|")) {
                pModel = pModel.substring(1).trim();
                } else {
                  throw new SAXParseException("Expected '|' while parsing mixed content", pLocator);
                }
                int offset = pModel.indexOf('|');
                String name;
                if (offset == -1) {
                    name = pModel.trim();
                    pModel = "";
                } else {
                  name = pModel.substring(0, offset).trim();
                    pModel = pModel.substring(offset);
                }
                if (elements.containsKey(name)) {
                  XsTLocalElement e = choice.createElement();
                    e.setRef(new XsQName(getTargetNamespace(), getLocalPart(name)));
                } else {
                  throw new SAXParseException("Element " + pElement.getName()
                                                + " references element " + name
                                                + ", which is not declared",
View Full Code Here

    addParticle(groupRef);
    return groupRef;
  }

  public XsEChoice createChoice() {
    XsEChoice choice = getObjectFactory().newXsEChoice(this);
    addParticle(choice);
    return choice;
  }
View Full Code Here

      occurs = any;
      XSAny wildcard = getXSSchema().getXSObjectFactory().newXSAny(this, any);
      wildcard.validate();
      p = new XSParticleImpl(wildcard);
    } else if (pParticle instanceof XsEChoice) {
      XsEChoice choice = (XsEChoice) pParticle;
      occurs = choice;
      XSGroup group = getXSSchema().getXSObjectFactory().newXSGroup(this, choice);
      group.validate();
      p = new XSParticleImpl(group);
    } else if (pParticle instanceof XsESequence) {
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.xs.xml.XsEChoice

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.