Package org.eclipse.wst.wsdl

Examples of org.eclipse.wst.wsdl.Import


    List imports = definition.getEImports();
    Iterator importsIterator = imports.iterator();

    while (importsIterator.hasNext())
    {
      Import theImport = (Import)importsIterator.next();

      String importLocationURI = theImport.getLocationURI();
      if (importLocationURI != null &&
      // ISSUE This assumption seems a bit weak.
        importLocationURI.endsWith("wsdl"))
      {
        Definition importedDefinition = theImport.getEDefinition();

        if (importedDefinition != null && !list.contains(importedDefinition))
        {
          // Recursively try to locate all definitions.
View Full Code Here


  public Map getImports()
  {
    HashMap map = new HashMap();
    for (Iterator i = getEImports().iterator(); i.hasNext();)
    {
      Import theImport = (Import)i.next();
      String key = theImport.getNamespaceURI();
      if (key == null)
      {
        key = "";
      }
View Full Code Here

  public List getImports(String namespaceURI)
  {
    List list = new ArrayList();
    for (Iterator i = getEImports().iterator(); i.hasNext();)
    {
      Import theImport = (Import)i.next();
      if (WSDLConstants.isMatchingNamespace(namespaceURI, theImport.getNamespaceURI()))
      {
        list.add(theImport);
      }
    }
    return list;
View Full Code Here

        //definition.setDocumentationElement(child); 
        break;
      }
      case WSDLConstants.IMPORT:
      {
        Import i = WSDLFactory.eINSTANCE.createImport();
        i.setEnclosingDefinition(this);
        i.setElement(child);
        addImport(i);
        break;
      }
      case WSDLConstants.MESSAGE:
      {
View Full Code Here

  {
    List list = new ArrayList();

    for (Iterator i = getImports(namespace).iterator(); i.hasNext();)
    {
      Import theImport = (Import)i.next();
      ((ImportImpl)theImport).importDefinitionOrSchema();
      Definition importedDefinition = theImport.getEDefinition();
      if (importedDefinition != null && WSDLConstants.isMatchingNamespace(namespace, importedDefinition.getTargetNamespace()))
      {
        list.add(importedDefinition);
      }
    }
View Full Code Here

  private List getImportedOrInlinedSchemas()
  {
    List list = new ArrayList();
    for (Iterator i = getEImports().iterator(); i.hasNext();)
    {
      Import theImport = (Import)i.next();
      ((ImportImpl)theImport).importDefinitionOrSchema();
      XSDSchema schema = theImport.getESchema();
      if (schema != null)
        list.add(schema);
    }

    if (getETypes() != null)
View Full Code Here

  {
    EList imports = getEImports();
    Iterator importsIterator = imports.iterator();
    while (importsIterator.hasNext())
    {
      Import theImport = (Import)importsIterator.next();
      String importNamespaceURI = theImport.getNamespaceURI();

      if (WSDLConstants.isMatchingNamespace(importNamespaceURI, namespace))
      {
        ((ImportImpl)theImport).importDefinitionOrSchema();
        XSDSchema schema = theImport.getESchema();

        if (schema != null && WSDLConstants.isMatchingNamespace(schema.getTargetNamespace(), namespace))
        {
          list.add(schema);
        }
View Full Code Here

  {
    EList imports = getEImports();
    Iterator importsIterator = imports.iterator();
    while (importsIterator.hasNext())
    {
      Import theImport = (Import)importsIterator.next();
      DefinitionImpl importedDefinition = (DefinitionImpl)theImport.getEDefinition();
      if (importedDefinition != null)
      {
        importedDefinition.collectInlinedSchemas(namespace, list);
      }
    }
View Full Code Here

  @SuppressWarnings("unchecked")
  void addWsdlImports(Definition wsdl){
    Vector<XSDSchema> dependencies = wsdlDependencies.get(wsdl);
    if (dependencies != null){
      for (XSDSchema schema : dependencies){
        Import xsdImport = WSDLFactory.eINSTANCE.createImport();
        xsdImport.setSchema(schema);
        String fileName = schemaFileMap.get(schema);//schema.getSchemaLocation();
        xsdImport.setLocationURI(fileName);
        xsdImport.setNamespaceURI(schema.getTargetNamespace());
        wsdl.addImport(xsdImport);
        wsdl.addNamespace(schemaNsPrefixMap.get(schema.getTargetNamespace()), schema.getTargetNamespace());
        Types types = wsdl.getETypes();
        List<XSDSchema> schemas = types.getSchemas();
        if (schemas.size() == 1){
View Full Code Here

TOP

Related Classes of org.eclipse.wst.wsdl.Import

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.