Examples of XSDSchema


Examples of org.eclipse.xsd.XSDSchema

  public XSDElementDeclaration resolveElementDeclaration(String namespace, String localName)
  {
    XSDElementDeclaration result = null;
    for (Iterator i = resolveSchema(namespace).iterator(); i.hasNext();)
    {
      XSDSchema schema = (XSDSchema)i.next();
      result = schema.resolveElementDeclaration(namespace, localName);
      if (isComponentDefined(result))
        return result;
    }

    // Could not resolve. Try against all <import>ed and inlined schemas.
    for (Iterator i = getImportedOrInlinedSchemas().iterator(); i.hasNext();)
    {
      XSDSchema schema = (XSDSchema)i.next();
      result = schema.resolveElementDeclaration(namespace, localName);
      if (isComponentDefined(result))
        return result;
    }

    return result;
View Full Code Here

Examples of org.eclipse.xsd.XSDSchema

  public XSDTypeDefinition resolveTypeDefinition(String namespace, String localName)
  {
    XSDTypeDefinition result = null;
    for (Iterator i = resolveSchema(namespace).iterator(); i.hasNext();)
    {
      XSDSchema schema = (XSDSchema)i.next();
      result = schema.resolveTypeDefinition(namespace, localName);
      if (isComponentDefined(result))
        return result;
    }

    // Could not resolve. Try against all <import>ed and inlined schemas.
    for (Iterator i = getImportedOrInlinedSchemas().iterator(); i.hasNext();)
    {
      XSDSchema schema = (XSDSchema)i.next();
      result = schema.resolveTypeDefinition(namespace, localName);
      if (isComponentDefined(result))
        return result;
    }

    return result; // Failed to resolve.
View Full Code Here

Examples of org.eclipse.xsd.XSDSchema

    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

Examples of org.eclipse.xsd.XSDSchema

        if (!(extensibilityElement instanceof XSDSchemaExtensibilityElement))
        {
          continue;
        }
        XSDSchemaExtensibilityElement el = (XSDSchemaExtensibilityElement)extensibilityElement;
        XSDSchema schema = el.getSchema();
        if (schema != null)
        {
          // We need this try-catch block in case we encounter an exception while attempting
          // to resolve the schema.  In the case of the WSDL Editor, we get a
          // 'cannot create part exception'......See eclipse bugzilla bug 89855
          try
          {
            schema.setSchemaLocation(resource.getURI().toString());
          }
          catch (Exception e)
          {

          }
View Full Code Here

Examples of org.eclipse.xsd.XSDSchema

    {
      List schemas = types.getSchemas();
      Iterator schemasIterator = schemas.iterator();
      while (schemasIterator.hasNext())
      {
        XSDSchema schema = (XSDSchema)schemasIterator.next();
        String targetNamespace = schema.getTargetNamespace();

        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)
          {
            XSDImport theImport = (XSDImport)component;
            String importNamespace = theImport.getNamespace();
            if (WSDLConstants.isMatchingNamespace(namespace, importNamespace))
            {
              ((XSDImportImpl)theImport).importSchema();
              XSDSchema importedSchema = theImport.getResolvedSchema();
              if (importedSchema != null)
              {
                list.add(importedSchema);
              }
            }
View Full Code Here

Examples of org.eclipse.xsd.XSDSchema

      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

Examples of org.eclipse.xsd.XSDSchema

  public List getSchemas(String namespaceURI)
  {
    List schemas = new ArrayList();
    for (Iterator i = getSchemas().iterator(); i.hasNext();)
    {
      XSDSchema schema = (XSDSchema)i.next();
      if (namespaceURI == null && schema.getTargetNamespace() == null)
      {
        schemas.add(schema);
      }
      else if (namespaceURI != null && namespaceURI.equals(schema.getTargetNamespace()))
      {
        schemas.add(schema);
      }
    }
    return schemas;
View Full Code Here

Examples of org.eclipse.xsd.XSDSchema

   * <!-- end-user-doc -->
   * @generated
   */
  public void setESchema(XSDSchema newESchema)
  {
    XSDSchema oldESchema = eSchema;
    eSchema = newESchema;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, WSDLPackage.IMPORT__ESCHEMA, oldESchema, eSchema));
  }
View Full Code Here

Examples of org.eclipse.xsd.XSDSchema

   * @see org.eclipse.xsd.util.XSDSchemaLocator#locateSchema(org.eclipse.xsd.XSDSchema,
   *      java.lang.String, java.lang.String, java.lang.String)
   */
  public XSDSchema locateSchema(XSDSchema xsdSchema, String namespaceURI, String rawSchemaLocationURI, String resolvedSchemaLocationURI)
  {
    XSDSchema resolvedSchema = null;

    // Bugzilla 122624:  WSDL model does not resolve <import> of inline schema with no namespace.
    // KB: We are not resolving <import>ed or <include>d schemas from the root inline schemas.
    // In other words, since we are resolving only between multiple root inline schemas,
    // do not attempt to resolve if "rawSchemaLocationURI" is not null.
    if (namespaceURI != null && rawSchemaLocationURI == null)
    {
      Definition definition = null;

      for (EObject parent = xsdSchema.eContainer(); parent != null; parent = parent.eContainer())
      {
        if (parent instanceof Definition)
        {
          definition = (Definition)parent;
          break;
        }
      }

      if (definition != null && definition.getETypes() != null)
      {
        for (Iterator i = definition.getETypes().getEExtensibilityElements().iterator(); i.hasNext();)
        {
          Object o = i.next();
          if (o instanceof XSDSchemaExtensibilityElement)
          {
            XSDSchema schema = ((XSDSchemaExtensibilityElement)o).getSchema();
            if (schema != null && namespaceURI.equals(schema.getTargetNamespace()))
            {
              resolvedSchema = schema;
              break;
            }
          }
View Full Code Here

Examples of org.eclipse.xsd.XSDSchema

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetSchema(XSDSchema newSchema, NotificationChain msgs)
  {
    XSDSchema oldSchema = schema;
    schema = newSchema;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(
        this,
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.