Esempio n. 1
0
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 @Override
 public void eUnset(int featureID) {
   switch (featureID) {
     case EpatchTestLanguagePackage.EXTENSION_IMPORT__PATH:
       getPath().clear();
       return;
   }
   super.eUnset(featureID);
 }
Esempio n. 2
0
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 @SuppressWarnings("unchecked")
 @Override
 public void eSet(int featureID, Object newValue) {
   switch (featureID) {
     case EpatchTestLanguagePackage.EXTENSION_IMPORT__PATH:
       getPath().clear();
       getPath().addAll((Collection<? extends String>) newValue);
       return;
   }
   super.eSet(featureID, newValue);
 }
Esempio n. 3
0
  @SuppressWarnings("unchecked")
  public DescriptionImpl(
      final URI baseURI,
      final TDefinitions definition,
      final NamespaceMapperImpl namespaceMapper,
      final SchemaLocatorImpl schemaLocator,
      final Map<FeatureConstants, Object> features,
      Map<URI, AbsItfDescription> descriptionImports,
      Map<URI, AbsItfSchema> schemaImports,
      WSDLReaderImpl reader)
      throws WSDLException, WSDLImportException {

    super(baseURI, definition, namespaceMapper, schemaLocator, features);

    // get the documentation
    this.documentation =
        new org.ow2.easywsdl.wsdl.impl.wsdl11.DocumentationImpl(
            this.model.getDocumentation(), this);

    // get the reader
    if (reader == null) {
      this.reader = new WSDLReaderImpl();
    } else {
      this.reader = reader;
    }

    boolean find = false;
    for (final TDocumented part : this.model.getAnyTopLevelOptionalElement()) {
      // get imports
      if (part instanceof TImport) {
        final Import impt =
            new org.ow2.easywsdl.wsdl.impl.wsdl11.ImportImpl(
                (TImport) part,
                this,
                descriptionImports,
                schemaImports,
                this.documentURI,
                this.reader);
        this.imports.add(impt);
        find = true;
      }
    }
    if (!find) {
      Iterator<Object> it = this.model.getAny().iterator();
      while (it.hasNext()) {
        Object part = it.next();

        // get import
        if (part instanceof Element) {
          if ((((Element) part).getLocalName().equals("import"))
              && verifWSDL11Ns(((Element) part).getNamespaceURI())) {
            TImport tImpt =
                ImportImpl.replaceDOMElementByTImport(this, (Element) part, this.reader);
            it = this.model.getAny().iterator();
            final Import impt =
                new org.ow2.easywsdl.wsdl.impl.wsdl11.ImportImpl(
                    (TImport) tImpt,
                    this,
                    descriptionImports,
                    schemaImports,
                    this.documentURI,
                    this.reader);
            this.imports.add(impt);
          }
        }
      }
    }

    this.addImportElementsInAllList();
    this.addIncludeElementsInAllList();

    find = false;
    for (final TDocumented part : this.model.getAnyTopLevelOptionalElement()) {
      // get types
      if (part instanceof TTypes) {
        this.types =
            new org.ow2.easywsdl.wsdl.impl.wsdl11.TypesImpl(
                (TTypes) part, this, schemaImports, this.reader);
        find = true;
        break;
      }
    }
    if (!find) {
      Iterator<Object> it = this.model.getAny().iterator();
      while (it.hasNext()) {
        Object part = it.next();

        // get import
        if (part instanceof Element) {

          if ((((Element) part).getLocalName().equals("types"))
              && verifWSDL11Ns(((Element) part).getNamespaceURI())) {
            if (reader == null) {
              reader = new WSDLReaderImpl();
            }
            TTypes tTypes = TypesImpl.replaceDOMElementByTTypes(this, (Element) part, reader);
            it = this.model.getAny().iterator();
            this.types =
                new org.ow2.easywsdl.wsdl.impl.wsdl11.TypesImpl(
                    (TTypes) tTypes, this, schemaImports, this.reader);
          }
        }
      }
    }

    this.messages = this.findAllMessages(this);

    find = false;
    for (final TDocumented part : this.model.getAnyTopLevelOptionalElement()) {
      // get interfaces
      if (part instanceof TPortType) {
        final InterfaceType itf =
            new org.ow2.easywsdl.wsdl.impl.wsdl11.InterfaceTypeImpl((TPortType) part, this);
        this.interfaces.add(itf);
        find = true;
      }
    }
    if (!find) {
      Iterator<Object> it = this.model.getAny().iterator();
      while (it.hasNext()) {
        Object part = it.next();

        // get import
        if (part instanceof Element) {
          if ((((Element) part).getLocalName().equals("portType"))
              && verifWSDL11Ns(((Element) part).getNamespaceURI())) {
            if (reader == null) {
              reader = new WSDLReaderImpl();
            }
            TPortType tPortType =
                InterfaceTypeImpl.replaceDOMElementByTPortType(this, (Element) part, reader);
            it = this.model.getAny().iterator();
            final InterfaceType itf =
                new org.ow2.easywsdl.wsdl.impl.wsdl11.InterfaceTypeImpl(
                    (TPortType) tPortType, this);
            this.interfaces.add(itf);
          }
        }
      }
    }

    find = false;
    for (final TDocumented part : this.model.getAnyTopLevelOptionalElement()) {
      // get bindings
      if (part instanceof TBinding) {
        final Binding b = new org.ow2.easywsdl.wsdl.impl.wsdl11.BindingImpl((TBinding) part, this);
        this.bindings.add(b);
        find = true;
      }
    }
    if (!find) {
      Iterator<Object> it = this.model.getAny().iterator();
      while (it.hasNext()) {
        Object part = it.next();

        // get import
        if (part instanceof Element) {
          if ((((Element) part).getLocalName().equals("binding"))
              && verifWSDL11Ns(((Element) part).getNamespaceURI())) {
            if (reader == null) {
              reader = new WSDLReaderImpl();
            }
            TBinding tBinding =
                BindingImpl.replaceDOMElementByTBinding(this, (Element) part, reader);
            it = this.model.getAny().iterator();
            final Binding b =
                new org.ow2.easywsdl.wsdl.impl.wsdl11.BindingImpl((TBinding) tBinding, this);
            this.bindings.add(b);
          }
        }
      }
    }

    find = false;
    for (final TDocumented part : this.model.getAnyTopLevelOptionalElement()) {
      // get services
      if (part instanceof TService) {
        final Service s = new org.ow2.easywsdl.wsdl.impl.wsdl11.ServiceImpl((TService) part, this);
        this.services.add(s);
        find = true;
      }
    }
    if (!find) {
      Iterator<Object> it = this.model.getAny().iterator();
      while (it.hasNext()) {
        Object part = it.next();

        // get import
        if (part instanceof Element) {
          if ((((Element) part).getLocalName().equals("service"))
              && verifWSDL11Ns(((Element) part).getNamespaceURI())) {
            if (reader == null) {
              reader = new WSDLReaderImpl();
            }
            TService tService =
                ServiceImpl.replaceDOMElementByTService(this, (Element) part, reader);
            it = this.model.getAny().iterator();
            final Service s =
                new org.ow2.easywsdl.wsdl.impl.wsdl11.ServiceImpl((TService) tService, this);
            this.services.add(s);
          }
        }
      }
    }
  }