Examples of XSDParticle


Examples of org.eclipse.xsd.XSDParticle

        {
            XSDWildcard elementWildcard = xsdFactory.createXSDWildcard();
            elementWildcard.getLexicalNamespaceConstraint().add("##other");
            elementWildcard.setProcessContents(XSDProcessContents.LAX_LITERAL);
            // Create a particle to hold the wildcard.
            XSDParticle wildcardParticle = xsdFactory.createXSDParticle();
            wildcardParticle.setContent(elementWildcard);
            wildcardParticle.setMaxOccurs(-1);
            ((XSDModelGroup)((XSDParticle)complexType.getContent()).getContent()).
                getContents().add(wildcardParticle);
              
            XSDWildcard attributeWildcard = xsdFactory.createXSDWildcard();
            attributeWildcard.getLexicalNamespaceConstraint().add("##other");
View Full Code Here

Examples of org.eclipse.xsd.XSDParticle

        Map groups = new HashMap();
        List particleInformation = collectParticles((XSDParticle)xsdComplexTypeDefinition.getContent());
        for (Iterator i = particleInformation.iterator(); i.hasNext(); )
        {
          EffectiveOccurrence effectiveOccurrence = (EffectiveOccurrence)i.next();
          XSDParticle xsdParticle = effectiveOccurrence.xsdParticle;
          EStructuralFeature group = (EStructuralFeature)groups.get(effectiveOccurrence.xsdModelGroup);
          XSDTerm xsdTerm = xsdParticle.getTerm();
          EStructuralFeature eStructuralFeature = null;
          String name = getEcoreAttribute(xsdParticle, "name");
          if (xsdTerm instanceof XSDModelGroup)
          {
            if (!isRestriction)
View Full Code Here

Examples of org.eclipse.xsd.XSDParticle

        if (xsdComponent instanceof XSDParticle)
        {
          eReference.setContainment(true);
          eReference.setResolveProxies(false);

          XSDParticle xsdParticle = (XSDParticle)xsdComponent;

          XSDTerm xsdTerm = ((XSDParticle)xsdComponent).getTerm();
          if (xsdTerm instanceof XSDElementDeclaration)
          {
            XSDElementDeclaration xsdElementDeclaration = (XSDElementDeclaration)xsdTerm;
View Full Code Here

Examples of org.eclipse.xsd.XSDParticle

        Map groups = new HashMap();
        List particleInformation = collectParticles((XSDParticle)xsdComplexTypeDefinition.getContent());
        for (Iterator i = particleInformation.iterator(); i.hasNext(); )
        {
          EffectiveOccurrence effectiveOccurrence = (EffectiveOccurrence)i.next();
          XSDParticle xsdParticle = effectiveOccurrence.xsdParticle;
          EStructuralFeature group = (EStructuralFeature)groups.get(effectiveOccurrence.xsdModelGroup);
          XSDTerm xsdTerm = xsdParticle.getTerm();
          EStructuralFeature eStructuralFeature = null;
          String name = getEcoreAttribute(xsdParticle, "name");
          if (xsdTerm instanceof XSDModelGroup)
          {
            if (!isRestriction)
View Full Code Here

Examples of org.eclipse.xsd.XSDParticle

        if (xsdComponent instanceof XSDParticle)
        {
          eReference.setContainment(true);
          eReference.setResolveProxies(false);

          XSDParticle xsdParticle = (XSDParticle)xsdComponent;

          XSDTerm xsdTerm = ((XSDParticle)xsdComponent).getTerm();
          if (xsdTerm instanceof XSDElementDeclaration)
          {
            XSDElementDeclaration xsdElementDeclaration = (XSDElementDeclaration)xsdTerm;
View Full Code Here

Examples of org.eclipse.xsd.XSDParticle

      if (el.getName().equals(elementName)){
        return el;     
      }
    }
    if (parentType.getContent() != null && parentType.getContent() instanceof XSDParticle){
      XSDParticle parentParticle = (XSDParticle)parentType.getContent();
      if (parentParticle.getContent() != null && parentParticle.getContent() instanceof XSDModelGroup){
        XSDModelGroup parentModelGroup = (XSDModelGroup)parentParticle.getContent();
        XSDParticle localElementParticle = XSDFactory.eINSTANCE.createXSDParticle();
        XSDElementDeclaration el = XSDFactory.eINSTANCE.createXSDElementDeclaration();
        localElementParticle.setContent(el);
        if (setTargetNamespace)
          el.setTargetNamespace(targetNamespace);
        if (!fieldType.getTargetNamespace().equals(parentType.getSchema().getTargetNamespace())){
          XSDSchema parentSchema = parentType.getSchema();
          XSDSchema fieldSchema = fieldType.getSchema();
View Full Code Here

Examples of org.eclipse.xsd.XSDParticle

        if (wsdlDocLitWrapResultMap.get(operation) == null){
          Part part = (Part)operation.getOutput().getMessage().getPart("parameters");
 
          XSDElementDeclaration parentElement = part.getElementDeclaration();
          XSDComplexTypeDefinition complexType = (XSDComplexTypeDefinition)parentElement.getType();       
          XSDParticle parentParticle = (XSDParticle)complexType.getContent();           
          XSDModelGroup parentModelGroup = (XSDModelGroup)parentParticle.getContent();       
         
          XSDElementDeclaration el = XSDFactory.eINSTANCE.createXSDElementDeclaration();
          el.setName(resultName);
          el.setTypeDefinition(xsdType);
         
          XSDParticle localElementParticle = XSDFactory.eINSTANCE.createXSDParticle();
          localElementParticle.setContent(el);                 
         
          parentModelGroup.getContents().add(localElementParticle);
          wsdlDocLitWrapResultMap.put(operation, el);
         
          XSDSchema schema = xsdType.getSchema();
View Full Code Here

Examples of org.eclipse.xsd.XSDParticle

       
        complexType = XSDFactory.eINSTANCE.createXSDComplexTypeDefinition();
        complexType.setTargetNamespace(schema.getTargetNamespace());
        complexType.setName(ctSimpleType.getSimpleName());
       
        XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle();
        XSDModelGroup modelGroup = XSDFactory.eINSTANCE.createXSDModelGroup();
        modelGroup.setCompositor(XSDCompositor.SEQUENCE_LITERAL);
        particle.setContent(modelGroup);   
        complexType.setContent(particle);
        try {
          schema.getContents().add(complexType);
        }catch(Exception e){
          System.out.println(e.getMessage());
View Full Code Here

Examples of org.eclipse.xsd.XSDParticle

          Part part = (Part)operation.getInput().getMessage().getPart("parameters");
         
          XSDElementDeclaration parentElement = part.getElementDeclaration();
          XSDComplexTypeDefinition complexType = (XSDComplexTypeDefinition)parentElement.getType();
         
          XSDParticle parentParticle = (XSDParticle)complexType.getContent();           
          XSDModelGroup parentModelGroup = (XSDModelGroup)parentParticle.getContent();
          XSDParticle localElementParticle = XSDFactory.eINSTANCE.createXSDParticle();
          XSDElementDeclaration el = XSDFactory.eINSTANCE.createXSDElementDeclaration();
          localElementParticle.setContent(el);
          el.setName(paramName);
          el.setTypeDefinition(xsdType);         
          parentModelGroup.getContents().add(localElementParticle);
          if (wsdlDocLitParamElemMap.get(operation) == null)
            wsdlDocLitParamElemMap.put(operation, new LinkedList<XSDElementDeclaration>());
View Full Code Here

Examples of org.eclipse.xsd.XSDParticle

      // document style message contains one part.  this part refers to an element which contains a sub-element for each parameter
      //  this function adds the part and the top-level element, the sub-elements are added when the parameter is scanned
      if (parameterStyle == javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED){
        XSDSchema schema = wsdlTypesSchemaMap.get(operation.getEnclosingDefinition());
       
        XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle();
        XSDModelGroup modelGroup = XSDFactory.eINSTANCE.createXSDModelGroup();
        modelGroup.setCompositor(XSDCompositor.SEQUENCE_LITERAL);
        particle.setContent(modelGroup);
       
        XSDComplexTypeDefinition complexType = XSDFactory.eINSTANCE.createXSDComplexTypeDefinition();
        complexType.setContent(particle);
       
        XSDElementDeclaration elIn = XSDFactory.eINSTANCE.createXSDElementDeclaration();
        elIn.setName(operationName);
        elIn.setAnonymousTypeDefinition(complexType);
        schema.getContents().add(elIn);
       
        Part partIn = WSDLFactory.eINSTANCE.createPart();
        partIn.setName("parameters");
        partIn.setElementDeclaration(elIn);
        operation.getInput().getMessage().addPart(partIn);
       
        particle = XSDFactory.eINSTANCE.createXSDParticle();
        modelGroup = XSDFactory.eINSTANCE.createXSDModelGroup();
        modelGroup.setCompositor(XSDCompositor.SEQUENCE_LITERAL);
        particle.setContent(modelGroup);
       
        complexType = XSDFactory.eINSTANCE.createXSDComplexTypeDefinition();
        complexType.setContent(particle);
       
        XSDElementDeclaration elOut = XSDFactory.eINSTANCE.createXSDElementDeclaration();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.