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

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


  private boolean isValidated;

  protected XSGroupImpl(XSObject pParent, XsTGroupRef pBaseGroup)
      throws SAXException {
    super(pParent, pBaseGroup);
    XsQName qName = pBaseGroup.getRef();
    if (qName == null) {
      qName = getQName(pBaseGroup.getName());
    }
    name = qName;
    modelGroupImpl = null;
View Full Code Here


    if (pName == null) {
      throw new LocSAXException("Invalid group: Either of its 'ref' or 'name' attributes must be set.",
                                   getLocator());
    }
    XsESchema syntaxSchema = getXsObject().getXsESchema();
    return new XsQName(syntaxSchema.getTargetNamespace(), pName.toString(), syntaxSchema.getTargetNamespacePrefix());
  }
View Full Code Here

      if (pParticle instanceof XsTGroupRef) {
        groupRef = (XsTGroupRef) pParticle;
      } else if (pParticle instanceof XsTLocalElement) {
        localElement = (XsTLocalElement) pParticle;
        // May be the referenced element is the head of a substitution group
        XsQName ref = localElement.getRef();
        if (ref != null) {
          XSElement referencedElement = getXSSchema().getElement(ref);
          if (referencedElement == null) {
            throw new LocSAXException("The referenced element " + ref + " is undefined.", localElement.getLocator());
          }
View Full Code Here

      result.validate();
      annotations = new XSAnnotation[]{result};
    }

    if (modelGroup == null) {
      XsQName myName = getName();
      if (myName == null) {
        throw new NullPointerException("Missing group name");
      }
      XSGroup group = getXSSchema().getGroup(myName);
      if (group == null) {
View Full Code Here

  }

  protected XSAttributeGroupImpl(XSObject pParent, XsTAttributeGroup pBaseGroup)
      throws SAXException {
    super(pParent, pBaseGroup);
    XsQName qName;
    if (isReference()) {
      qName = getXsTAttributeGroup().getRef();
    } else {
      XsNCName myName = pBaseGroup.getName();
      if (myName == null) {
        throw new LocSAXException("Invalid attribute group: Neither of its 'name' or 'ref' attributes are set.",
                                     pBaseGroup.getLocator());
      } else {
        XsESchema schema = pBaseGroup.getXsESchema();
        qName = new XsQName(schema.getTargetNamespace(), myName.toString(), schema.getTargetNamespacePrefix());
      }
    }
    name = qName;
  }
View Full Code Here

        XSAttribute attribute = pObject.getXSSchema().getXSObjectFactory().newXSAttribute(pObject, (XsTAttribute) o);
        attribute.validate();
        attributes.add(attribute);
      } else if (o instanceof XsTAttributeGroupRef) {
        XsTAttributeGroupRef agRef = (XsTAttributeGroupRef) o;
        XsQName ref = agRef.getRef();
        if (ref == null) {
          throw new LocSAXException("Invalid attribute group: Missing 'ref' attribute", pObject.getLocator());
        }
        XSAttributeGroup attributeGroup = pObject.getXSSchema().getAttributeGroup(ref);
        if (attributeGroup == null) {
View Full Code Here

  }

  protected XSElementImpl(XSObject pParent, XsTElement pBaseElement)
      throws SAXException {
    super(pParent, pBaseElement);
    XsQName qName;
    if (isReference()) {
      qName = pBaseElement.getRef();
    } else {
      XsNCName myName = pBaseElement.getName();
      if (myName == null) {
        throw new LocSAXException("Invalid element: Must have either of its 'ref' or 'name' attributes set.",
                                     getLocator());
      }
      XsESchema schema = pBaseElement.getXsESchema();

      XsAnyURI namespace;
      String namespacePrefix;
      boolean qualified = pBaseElement.isGlobal();
      if (!qualified) {
        XsFormChoice form = pBaseElement.getForm();
        if (form == null) {
          form = schema.getElementFormDefault();
        }
        qualified = XsFormChoice.QUALIFIED.equals(form);
      }
      if (qualified) {
        namespace = schema.getTargetNamespace();
        namespacePrefix = schema.getTargetNamespacePrefix();
      } else {
        namespace = null;
        namespacePrefix = null;
      }
      qName = new XsQName(namespace, myName.toString(), namespacePrefix);
    }
    name = qName;
    xsAnnotation = pBaseElement.getAnnotation();
    isGlobal = pBaseElement instanceof XsTTopLevelElement;
  }
View Full Code Here

      if (isInnerSimpleType()) {
        myType = getXSSchema().getXSObjectFactory().newXSType(this, element.getSimpleType());
      } else if (isInnerComplexType()) {
        myType = getXSSchema().getXSObjectFactory().newXSType(this, element.getComplexType());
      } else {
        XsQName typeName = element.getType();
        if (typeName == null) {
          throw new LocSAXException("Invalid element: Either of its 'type' or 'ref' attributes or its 'simpleType' or 'complexType' children must be set.",
                                       getLocator());
        }
        myType = getXSSchema().getType(typeName);
View Full Code Here

          }
        }
      }
    }
    for (Iterator iter = names.iterator();  iter.hasNext()) {
      XsQName qName = (XsQName) iter.next();
      String prefix = qName.getPrefix();
      if (prefix != null) {
        String uri = qName.getNamespaceURI();
        if (uri == null) uri = "";
        if (!uris.containsKey(uri)) {
          uris.put(uri, prefix);
        }
      }
View Full Code Here

    }

    JavaField myName = js.newJavaField("__qName", QName.class, JavaSource.PRIVATE);
    myName.setStatic(true);
    myName.setFinal(true);
    XsQName qName = pController.getName();
    myName.addLine("new ", QName.class, "(", JavaSource.getQuoted(qName.getNamespaceURI()),
                   ", ", JavaSource.getQuoted(qName.getLocalName()), ")");

    JavaMethod getQName = js.newJavaMethod("getQName", QName.class, JavaSource.PUBLIC);
    getQName.addLine("return ", myName, ";");

    return js;
View Full Code Here

TOP

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

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.