Examples of XSDTypeDefinition


Examples of org.eclipse.xsd.XSDTypeDefinition

    return result;
  }

  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))
View Full Code Here

Examples of org.eclipse.xsd.XSDTypeDefinition

   * <!-- end-user-doc -->
   * @generated
   */
  public void setTypeDefinition(XSDTypeDefinition newTypeDefinition)
  {
    XSDTypeDefinition oldTypeDefinition = typeDefinition;
    typeDefinition = newTypeDefinition;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, WSDLPackage.PART__TYPE_DEFINITION, oldTypeDefinition, typeDefinition));
  }
View Full Code Here

Examples of org.eclipse.xsd.XSDTypeDefinition

    Element theElement = getElement();
    if (theElement != null)
    {
      if (eReference == null || eReference == WSDLPackage.Literals.PART__TYPE_DEFINITION)
      {
        XSDTypeDefinition typeDefinition = getTypeDefinition();
        if (typeDefinition != null)
        {
          niceSetAttributeURIValue(theElement, WSDLConstants.TYPE_ATTRIBUTE, typeDefinition.getURI());
        }
      }
      if (eReference == null || eReference == WSDLPackage.Literals.PART__ELEMENT_DECLARATION)
      {
        XSDElementDeclaration elementDecl = getElementDeclaration();
View Full Code Here

Examples of org.eclipse.xsd.XSDTypeDefinition

    if (newElementDeclaration != elementDeclaration)
    {
      setElementDeclaration(newElementDeclaration);
    }

    XSDTypeDefinition newTypeDefinition = resolveTypeDefinition(typeName);
    if (newTypeDefinition != typeDefinition)
    {
      setTypeDefinition(newTypeDefinition);
    }
View Full Code Here

Examples of org.eclipse.xsd.XSDTypeDefinition

    return result;
  }

  private XSDTypeDefinition resolveTypeDefinition(QName qname)
  {
    XSDTypeDefinition result = null;
    if (qname != null)
    {
      DefinitionImpl definition = (DefinitionImpl)getEnclosingDefinition();
      if (definition != null)
      {
View Full Code Here

Examples of org.eclipse.xsd.XSDTypeDefinition

        }
    }
   
    public XSDTypeDefinition getXSDTypeDef(String namespaceURI, String typeName)
    {
        XSDTypeDefinition typeDef = null;
        if ( namespaceURI != null && typeName != null  )
        {
            if ( XML_SCHEMA_URI.equals(namespaceURI) )
            {
                if ( ( typeDef = (XSDTypeDefinition)xsdTypeDefs.get(asQualifiedName(namespaceURI, typeName)) ) == null )
                {
                    typeDef = XSDFactory.eINSTANCE.createXSDSimpleTypeDefinition();
                    typeDef.setName(typeName);
                    typeDef.setTargetNamespace(namespaceURI);
                    addXSDTypeDef(namespaceURI, typeName, typeDef);
                }
            }
            else
            {
View Full Code Here

Examples of org.eclipse.xsd.XSDTypeDefinition

  private XSDTypeDefinition getXSDTypeDefinition(EClassifier eClassifier)
  {
    //TODO Maybe we should create a reverse (eModelElementToXSDComponentMap) for better performance.
    //     Use a HashMap subclass for xsdComponentToEModelElementMap that overrides put() to also add the
    //     reverse mapping in eModelElementToXSDComponentMap
    XSDTypeDefinition xsdTypeDefinition = null;
    for (Iterator i = xsdComponentToEModelElementMap.entrySet().iterator(); i.hasNext(); )
    {
      Entry e = (Entry) i.next();
      if (eClassifier == e.getValue())
      {
View Full Code Here

Examples of org.eclipse.xsd.XSDTypeDefinition

    {
      EClassifier nextEClassifier = (EClassifier)eClassifiers.get(index);
      if (!name.equals(nextEClassifier.getName())) break;
      if (extendedMetaData.getName(eClassifier).equals(extendedMetaData.getName(nextEClassifier)))
      {
        XSDTypeDefinition nextXSDTypeDefinition = getXSDTypeDefinition(nextEClassifier);
        if (!sameType(nextXSDTypeDefinition, xsdTypeDefinition))
        {
          //System.out.println("###EClassifier mismatch: ");
          //System.out.println("    old: " + extendedMetaData.getName(nextEClassifier));
          //System.out.println("    new: " + extendedMetaData.getName(eClassifier));
View Full Code Here

Examples of org.eclipse.xsd.XSDTypeDefinition

      if (xsdComponent != null && xsdComponent instanceof XSDParticle)
      {
        XSDTerm xsdTerm = ((XSDParticle)xsdComponent).getTerm();
        if (xsdTerm instanceof XSDElementDeclaration)
        {
          XSDTypeDefinition elementTypeDefinition = getEffectiveTypeDefinition(xsdComponent, (XSDElementDeclaration)xsdTerm);
          EClassifier eClassifier = getEClassifier(elementTypeDefinition);
          if (elementTypeDefinition instanceof XSDSimpleTypeDefinition && eClassifier instanceof EClass)
          {
            eReference.setContainment(true);
          }
View Full Code Here

Examples of org.eclipse.xsd.XSDTypeDefinition

  {
    if (xsdFeature == null)
    {
      return super.getEffectiveTypeDefinition(xsdComponent, xsdFeature);
    }
    XSDTypeDefinition typeDef = getEcoreTypeQNameAttribute(xsdComponent, "dataType");

    String isString = getEcoreAttribute(xsdComponent, xsdFeature, "string");
    if ("true".equalsIgnoreCase(isString)) {
      typeDef =
        xsdFeature.resolveSimpleTypeDefinition(rootSchema.getSchemaForSchemaNamespace(), "string");
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.