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

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


          if (referencedElement == null) {
            throw new LocSAXException("The referenced element " + ref + " is undefined.", localElement.getLocator());
          }
          XSGroup substitutedGroup = referencedElement.getSubstitutionGroup();
          if (substitutedGroup != null  &&  substitutedGroup != this) {
            XsObject parent = localElement.getParentObject();
            XsTGroupRefImpl groupRefImpl = (XsTGroupRefImpl) localElement.getObjectFactory().newXsTGroupRef(parent);
            groupRefImpl.setRef(substitutedGroup.getName());
            int maxOccurs = localElement.getMaxOccurs();
            if (maxOccurs == -1) {
              groupRefImpl.setMaxOccurs("unbounded");
View Full Code Here


  protected XsObject getBeanByParent(XsObject pParent, Locator pLocator, XsQName pQName) throws SAXException {
      XsObjectCreator[] creators = getXsObjectCreators();
      if (creators != null) {
          for (int i = 0;  i < creators.length;  i++) {
              XsObject result = creators[i].newBean(pParent, pLocator, pQName);
              if (result != null) {
                  return result;
              }
          }
      }
View Full Code Here

    int offset = pQName.indexOf(':');
    if (offset > 0) {
      String prefix = pQName.substring(0, offset);
      if (isPrefixEnabled(prefix)) {
          XsQName qName = new XsQName(pNamespaceURI, pLocalName, XsQName.prefixOf(pQName));
          XsObject result = getBeanByParent(this, getObjectFactory().getLocator(), qName);
          if (result != null) {
              return getObjectFactory().newXsSAXParser(result);
          } else {
              return new DefaultHandler();
          }
View Full Code Here

    // For any substitution group: Build an implicit choice group, which
    // may be used to replace the substitution groups head, if required.
    for (Iterator iter = substitutionGroups.values().iterator();  iter.hasNext()) {
      SubstitutionGroup group = (SubstitutionGroup) iter.next();
      XSElementImpl head = (XSElementImpl) group.getHead();
      XsObject object = head.getXsObject();
      XsESchema syntaxSchema = object.getXsESchema();
     
      // Find a name for the group
      String namespace = syntaxSchema.getTargetNamespace().toString();
      String localName = head.getName().getLocalName() + "Group";
      XsQName suggestion = new XsQName(namespace, localName);
      if (pSchema.getGroup(suggestion) != null) {
        for (int i = 0;  ;  i++) {
          suggestion = new XsQName(namespace, localName + i);
          if (pSchema.getGroup(suggestion) == null) {
            break;
          }
        }
      }
     
      XsTNamedGroup namedGroup = object.getObjectFactory().newXsTNamedGroup(syntaxSchema);
      namedGroup.setName(new XsNCName(suggestion.getLocalName()));
      XsTSimpleExplicitGroup choice = namedGroup.createChoice();
      XSElement[] members = group.getMembers();
      for (int j = 0;  j < members.length;  j++) {
        XSElement member = members[j];
View Full Code Here

  }

  /** <p>Creates a new instance of {@link JAXBTypesafeEnumClass}.</p>
   */
  public JAXBTypesafeEnumClass createTypesafeEnumClass() throws SAXException {
    XsObject annotationParent = getParentObject();
    if (annotationParent instanceof XsEAnnotation) {
      XsObject simpleTypeParent = annotationParent.getParentObject();
      if (simpleTypeParent instanceof XsTSimpleType) {
        JAXBTypesafeEnumClass jaxbTypesafeEnumClass = getJAXBXsObjectFactory().newJAXBTypesafeEnumClass(this);
        addChild(jaxbTypesafeEnumClass);
        return jaxbTypesafeEnumClass;
      }
View Full Code Here

    // For any substitution group: Build an implicit choice group, which
    // may be used to replace the substitution groups head, if required.
    for (Iterator iter = substitutionGroups.values().iterator();  iter.hasNext()) {
      SubstitutionGroup group = (SubstitutionGroup) iter.next();
      XSElementImpl head = (XSElementImpl) group.getHead();
      XsObject object = head.getXsObject();
      XsESchema syntaxSchema = object.getXsESchema();

      // Find a name for the group
      String namespace = syntaxSchema.getTargetNamespace().toString();
      String localName = head.getName().getLocalName() + "Group";
      XsQName suggestion = new XsQName(namespace, localName);
      if (pSchema.getGroup(suggestion) != null) {
        for (int i = 0;  ;  i++) {
          suggestion = new XsQName(namespace, localName + i);
          if (pSchema.getGroup(suggestion) == null) {
            break;
          }
        }
      }

      XsTNamedGroup namedGroup = object.getObjectFactory().newXsTNamedGroup(syntaxSchema);
      namedGroup.setName(new XsNCName(suggestion.getLocalName()));
      XsTSimpleExplicitGroup choice = namedGroup.createChoice();
      XSElement[] members = group.getMembers();
      for (int j = 0;  j < members.length;  j++) {
        XSElement member = members[j];
View Full Code Here

  protected XsObject getBeanByParent(XsObject pParent, Locator pLocator, XsQName pQName) throws SAXException {
      XsObjectCreator[] creators = getXsObjectCreators();
      if (creators != null) {
          for (int i = 0;  i < creators.length;  i++) {
              XsObject result = creators[i].newBean(pParent, pLocator, pQName);
              if (result != null) {
                  return result;
              }
          }
      }
View Full Code Here

    int offset = pQName.indexOf(':');
    if (offset > 0) {
      String prefix = pQName.substring(0, offset);
      if (isPrefixEnabled(prefix)) {
          XsQName qName = new XsQName(pNamespaceURI, pLocalName, XsQName.prefixOf(pQName));
          XsObject result = getBeanByParent(this, getObjectFactory().getLocator(), qName);
          if (result != null) {
              return getObjectFactory().newXsSAXParser(result);
          } else {
              return new DefaultHandler();
          }
View Full Code Here

TOP

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

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.