Package org.apache.xerces.xs

Examples of org.apache.xerces.xs.XSElementDeclaration


      }

      XSNamedMap elements = xsSchema.getComponents(XSConstants.ELEMENT_DECLARATION);
      for (int i = 0; i < elements.getLength(); ++i)
      {
         XSElementDeclaration xsElement = (XSElementDeclaration) elements.item(i);
         if (IGNORED_NS.contains(xsElement.getNamespace()))
            continue;
         QName elementQName = new QName(xsElement.getNamespace(), xsElement.getName());
         ElementBinding elementBinding = schemaBinding.getElement(elementQName);
         assertNotNull("ElementBinding " + elementQName + " exists", elementBinding);
      }
   }
View Full Code Here


         else
            assertEquivalent(xsModelGroup, (ModelGroupBinding) termBinding);
      }
      else if(xsTermType == XSConstants.ELEMENT_DECLARATION)
      {
         XSElementDeclaration xsElement = (XSElementDeclaration) xsTerm;
         QName xsElementName = new QName(xsElement.getNamespace(), xsElement.getName());
         termStr = xsElementName.toString();

         if(!termBinding.isElement())
         {
            // TODO sometimes XB wraps (maybe unnecessarily) repeatable elements into a sequence.
View Full Code Here

                        else if (compositor == XSModelGroup.COMPOSITOR_ALL)
                           msg += "- all\n";
                     }
                     else if (type == XSConstants.ELEMENT_DECLARATION)
                     {
                        XSElementDeclaration element = (XSElementDeclaration) xsTerm;
                        msg += "- " + new QName(element.getNamespace(), element.getName()) + "\n";
                     }
                     else
                     {
                        msg += "- wildcard\n";
                     }
View Full Code Here

         XSParticle particle = (XSParticle)xsParticles.item(i);
         XSTerm term = particle.getTerm();
         short termType = term.getType();
         if(termType == XSConstants.ELEMENT_DECLARATION)
         {
            XSElementDeclaration element = (XSElementDeclaration) term;
            QName qName = new QName(element.getNamespace(), element.getName());
            elementParticles.put(qName, particle);
         }
         else if(termType == XSConstants.WILDCARD)
            elementParticles.put(WILDCARD, particle);
         else
View Full Code Here

            XSTypeDefinition xsType = null;
            // Getting the corresponding part type
            if (type == XSConstants.ELEMENT_DECLARATION)
            {
              // Getting schema element
              XSElementDeclaration elem = xsModel.getElementDeclaration(
                ref.getLocalPart(), ref.getNamespaceURI());
              if (elem != null)
              {
                // Getting element's type
                xsType = elem.getTypeDefinition();
                // If it is ref:swaRef
                if (WSIConstants.NS_URI_SWA_REF.equals(xsType.getName())
                  && WSIConstants.SCHEMA_TYPE_SWA_REF.equals(
                    xsType.getNamespace()))
                {
                  // Adding the name of the element to the list
                  swaRefs.add(
                    new QName(elem.getNamespace(), elem.getName()));
                }
              }
            }
            else
            {
View Full Code Here

  {
    List swaRefs = new ArrayList();
    // If a term is an element declaration
    if (term.getType() == XSConstants.ELEMENT_DECLARATION)
    {
      XSElementDeclaration elem = (XSElementDeclaration) term;
      XSTypeDefinition xsType = elem.getTypeDefinition();
      // If element's type is ref:swaRef
      if (WSIConstants.NS_URI_SWA_REF.equals(xsType.getNamespace())
        && WSIConstants.SCHEMA_TYPE_SWA_REF.equals(xsType.getName()))
      {
        // Add element's name to the list
        swaRefs.add(
          new QName(elem.getNamespace(), elem.getName()));
      }
      else
      {
        // else collecting element names from element's type
        swaRefs.addAll(collectSwaRefs(xsType));
View Full Code Here

        XSModel xsModel = (XSModel) it2.next();
        XSTypeDefinition partType = null;
        // Getting the corresponding part type
        if (type == XSConstants.ELEMENT_DECLARATION)
        {
          XSElementDeclaration elem = xsModel.getElementDeclaration(
            ref.getLocalPart(), ref.getNamespaceURI());
          if (elem != null)
            partType = elem.getTypeDefinition();
        }
        else
        {
          partType = xsModel.getTypeDefinition(
            ref.getLocalPart(), ref.getNamespaceURI());
View Full Code Here

      List tagList = (List)nsTagListMap.get(targetNS);
//      root = null;
     
      XSNamedMap map = grammer.getComponents(XSConstants.ELEMENT_DECLARATION);
      for(int i=0;i<map.getLength();i++){
        XSElementDeclaration element = (XSElementDeclaration)map.item(i);
        parseXSDElement(tagList,element);
      }
    } catch(Exception ex){
     
    }
View Full Code Here

            if(in!=null){
              SchemaGrammar grammer = (SchemaGrammar)new XMLSchemaLoader().loadGrammar(
                  new XMLInputSource(null,null,null,in,null));
              XSNamedMap map = grammer.getComponents(XSConstants.ELEMENT_DECLARATION);
              for(int i=0;i<map.getLength();i++){
                XSElementDeclaration element = (XSElementDeclaration)map.item(i);
                comboDocumentRoot.add(element.getName());
              }
            }
          }
        } catch(Exception ex){
          HTMLPlugin.openAlertDialog(ex.toString());
View Full Code Here

            //Get the main fault from the wsdlInterface
            WSDLInterfaceFault intfFault = fault.getWsdlInterfaceOperation().getWsdlInterface().getFault(faultName);
            JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdl.getWsdlTypes());
            QName faultXMLName = intfFault.getElement();
            QName faultXMLType = intfFault.getXmlType();
            XSElementDeclaration xe = xsmodel.getElementDeclaration(faultXMLName.getLocalPart(), faultXMLName.getNamespaceURI());
            XSTypeDefinition xt = xe.getTypeDefinition();
            if (!xt.getAnonymous())
               xt = xsmodel.getTypeDefinition(xt.getName(), xt.getNamespace());
            if (xt instanceof XSComplexTypeDefinition)
               generateJavaSource((XSComplexTypeDefinition)xt, xsmodel, faultXMLName.getLocalPart(), true);
View Full Code Here

TOP

Related Classes of org.apache.xerces.xs.XSElementDeclaration

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.