Package org.eclipse.emf.common.util

Examples of org.eclipse.emf.common.util.EList


     * @param particle the particle
     * @return a set of global definitions that this particle relies upon.
     */
    protected Collection getGlobalDependencies(XSDParticle particle) {
        Set set = new HashSet();
        EList contents = particle.eContents();
        for (int i = 0; i < contents.size(); i++) {
            XSDParticleContent particleContent = (XSDParticleContent) contents.get(i);
            if (particleContent instanceof XSDModelGroup) {
                XSDModelGroupImpl modelGroup = (XSDModelGroupImpl) particleContent;
                set.addAll(getGlobalDependencies(modelGroup));
            } else if (particleContent instanceof XSDElementDeclaration) {
                XSDElementDeclaration elementDecl = (XSDElementDeclaration) particleContent;
View Full Code Here


        XSDCompositor compositor = modelGroup.getCompositor();
        String compositorName = compositor.getName();
        if (compositorName.equals("sequence")
                || compositorName.equals("choice")
                || compositorName.equals("group")) {
            EList elements = modelGroup.getContents();
            for (int i = 0; i < elements.size(); i++) {
                XSDParticle particle = (XSDParticle) elements.get(i);
                set.addAll(getGlobalDependencies(particle));
            }
        }
        return set;
    }
View Full Code Here

     * Helper method to return whether a given atribute is globally defined or not.
     * @param attribute the attribute in question.
     * @return see above.
     */
    protected boolean isGlobalAttributeDeclaration(XSDAttributeDeclaration attribute) {
        EList attributes = _schema.getAttributeDeclarations();
        return attributes.contains(attribute);
    }
View Full Code Here

//                <xs:element name="name2" personType="xs:string"/>
//            </xs:sequence>
//        </xs:complexType>
        XSDTypeDefinition personType = _xsd4YAWLBuilder.getTypeDefinition("PersonType");
        XSDComplexTypeDefinition complexPersonType = (XSDComplexTypeDefinition) personType;
        EList attributes = complexPersonType.getAttributeContents();
        for (int i = 0; i < attributes.size(); i++) {
            XSDAttributeUse attribute = (XSDAttributeUse) attributes.get(i);

            XSDAttributeDeclaration attDecl = attribute.getAttributeDeclaration();
            String attName = attDecl.getName();
            assertTrue(attName.equals("maritalStatus") || attName.equals("isParent"));
            XSDSimpleTypeDefinition attType = attDecl.getTypeDefinition();
            assertTrue("Attname(): " + attType.getName(),
                    attType.getName().equals("MaritalStatusType") ||
                    attType.getName().equals("boolean"));
        }
        XSDComplexTypeContent content = complexPersonType.getContent();
        XSDParticleImpl particle1 = (XSDParticleImpl) content;
        EList contents = particle1.eContents();
        XSDParticleContent particleContent = particle1.getContent();
        assertNotNull(particleContent);
        for (int i = 0; i < contents.size(); i++) {
            XSDModelGroupImpl modelGroup = (XSDModelGroupImpl) contents.get(i);
            EList elements = modelGroup.getContents();
            XSDCompositor compositor = modelGroup.getCompositor();
            assertNotNull(compositor);
            for (int j = 0; j < elements.size(); j++) {
                XSDParticle particle = (XSDParticle) elements.get(j);
                EList contents2 = particle.eContents();
                for (int k = 0; k < contents2.size(); k++) {
                    Object o = contents2.get(k);
                    assertNotNull(o);
                }
                XSDParticleContent pContent = particle.getContent();
                if (pContent instanceof XSDElementDeclaration) {
                    XSDElementDeclaration elementDecl = (XSDElementDeclaration) pContent;
View Full Code Here



    public void testGlobalAttributeDetermination(){
        XSDSchema schema = _xsd4YAWLBuilder.getOriginalSchema();
        EList listAtts = schema.getAttributeDeclarations();
        for (int i = 0; i < listAtts.size(); i++) {
            XSDAttributeDeclaration attribute = (XSDAttributeDeclaration) listAtts.get(i);
            assertTrue(_xsd4YAWLBuilder.isGlobalAttributeDeclaration(attribute));
        }
    }
View Full Code Here

                break;

            case FeatureDiff.UPDATED:

                final UpdateElementType update = WfsFactory.eINSTANCE.createUpdateElementType();
                final EList properties = update.getProperty();

                SimpleFeature f = diff.getFeature();

                for (Iterator it = diff.getChangedAttributes().iterator(); it.hasNext();) {
                    final PropertyType property = WfsFactory.eINSTANCE.createPropertyType();
                    String name = (String) it.next();
                    property.setName(new QName(name));
                    property.setValue(f.getAttribute(name));
                    properties.add(property);
                }

                FeatureId featureId = filterFactory.featureId(diff.getID());
                final Filter filter = filterFactory.id(Collections.singleton(featureId));
                update.setFilter(filter);
View Full Code Here

   * <!-- end-user-doc -->
   * @generated NOT
   */
  public void addSOAPHeaderFault(javax.wsdl.extensions.soap.SOAPHeaderFault soapHeaderFault)
  {
    EList headerFaults = getHeaderFaults();
    headerFaults.add(soapHeaderFault);
  }
View Full Code Here

        if (WSDLConstants.isMatchingNamespace(namespace, targetNamespace))
        {
          list.add(schema);
        }

        EList schemaContents = schema.getContents();
        Iterator schemaContentsIterator = schemaContents.iterator();

        while (schemaContentsIterator.hasNext())
        {
          Object component = schemaContentsIterator.next();
          if (component instanceof XSDImport)
View Full Code Here

   @param namespace the namespace to match
   *  @param list all imported schemas that match the namespace will be added to this list.
   */
  protected void collectImportedSchemas(String namespace, List list)
  {
    EList imports = getEImports();
    Iterator importsIterator = imports.iterator();
    while (importsIterator.hasNext())
    {
      Import theImport = (Import)importsIterator.next();
      String importNamespaceURI = theImport.getNamespaceURI();

View Full Code Here

   @param namespace the namespace to match
   *  @param list all inlined schemas of imported definitions that match the namespace will be added to this list.
   */
  protected void collectInlinedSchemasOfImportedDefinitions(String namespace, List list)
  {
    EList imports = getEImports();
    Iterator importsIterator = imports.iterator();
    while (importsIterator.hasNext())
    {
      Import theImport = (Import)importsIterator.next();
      DefinitionImpl importedDefinition = (DefinitionImpl)theImport.getEDefinition();
      if (importedDefinition != null)
View Full Code Here

TOP

Related Classes of org.eclipse.emf.common.util.EList

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.