Examples of AnyType


Examples of com.google.checkout.schema._2.AnyType

      cart.setCartExpiration(cartExpiry);
    }

    // Add merchantPrivateData if it is provided
    if (merchantPrivateData != null) {
      AnyType anyType = _objectFact.createAnyType();
      anyType.setAny(merchantPrivateData);
      cart.setMerchantPrivateData(anyType);
    }
   
    return cart;
  }
View Full Code Here

Examples of com.google.checkout.schema._2.AnyType

      if (taxTableSelector != null) {
        item.setTaxTableSelector(taxTableSelector);
      }
     
      if (privateItemData != null) {
        AnyType anyType = _objectFact.createAnyType();
        anyType.setAny(privateItemData);
        item.setMerchantPrivateItemData(anyType);
      }
     
      return item;
    } catch (JAXBException jaxbEx) {
View Full Code Here

Examples of com.google.checkout.schema._2.AnyType

        cart.setCartExpiration(cartExpiry);
      }
 
      // Add merchantPrivateData if it is provided
      if (merchantPrivateData != null) {
        AnyType anyType = _objectFact.createAnyType();
        anyType.setAny(merchantPrivateData);
        cart.setMerchantPrivateData(anyType);
      }
     
      return cart;
    } catch (JAXBException jaxbEx) {
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.AnyType

    EObject doc = EcoreUtil.create(docEClass);
    resource.getContents().add(doc);
   
    EStructuralFeature docMixedFeature = ExtendedMetaData.INSTANCE.getMixedFeature(docEClass);
    FeatureMap docMixed = (FeatureMap) doc.eGet(docMixedFeature);
    AnyType test = (AnyType) EcoreUtil.create(XMLTypePackage.Literals.ANY_TYPE);
    docMixed.add(ExtendedMetaData.INSTANCE.demandFeature("urn:test", "test", true), test);
    SimpleAnyType subTest1 = (SimpleAnyType) EcoreUtil.create(XMLTypePackage.Literals.SIMPLE_ANY_TYPE);
    test.getMixed().add(ExtendedMetaData.INSTANCE.demandFeature("urn:test", "subTest", true), subTest1);
    subTest1.setInstanceType(XMLTypePackage.Literals.STRING);
    subTest1.setValue("subTest1");
    SimpleAnyType subTest2 = (SimpleAnyType) EcoreUtil.create(XMLTypePackage.Literals.SIMPLE_ANY_TYPE);
    test.getMixed().add(ExtendedMetaData.INSTANCE.demandFeature("urn:test", "subTest", true), subTest2);
    subTest2.setInstanceType(XMLTypePackage.Literals.INT);
    subTest2.setValue(new Integer(2));
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.AnyType

      }
    }

    if (extendedMetaData != null)
    {
      AnyType anyType = XMLTypeFactory.eINSTANCE.createAnyType();
      mixedTargets.push(anyType.getMixed());
      text = new StringBuffer();
    }
   
    anyType = (EClass)options.get(XMLResource.OPTION_ANY_TYPE);
    anySimpleType = (EClass)options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE);
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.AnyType

    {
      if (ecoreBuilder != null)
      {
        ecoreBuilder.setExtendedMetaData(extendedMetaData);
      }
      AnyType anyType = XMLTypeFactory.eINSTANCE.createAnyType();
      mixedTargets.push(anyType.getMixed());
      text = new StringBuffer();
    }
   
    // bug #126072
    @SuppressWarnings("unchecked") Map<EClassFeatureNamePair, EStructuralFeature> newEClassFeatureNamePairToEStructuralFeatureMap =
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.AnyType

        resourceURI == null ? "" : resourceURI.toString();
  }
 
  protected AnyType getExtension(EObject peekObject)
  {
    AnyType anyType = eObjectToExtensionMap.get(peekObject);
    if (anyType == null)
    {
      anyType = XMLTypeFactory.eINSTANCE.createAnyType();
      eObjectToExtensionMap.put(peekObject, anyType);
    }
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.AnyType

  protected void recordUnknownFeature(String prefix, String name, boolean isElement, EObject peekObject, String value)
  {
    if (isElement)
    {
      AnyType anyType = getExtension(peekObject);
      int objectsIndex = objects.size();
      objects.push(anyType);
      int mixedTargetsIndex = mixedTargets.size();
      mixedTargets.push(anyType.getAny());
      int typesIndex = types.size();
      types.push(UNKNOWN_FEATURE_TYPE);

      handleFeature(prefix, name);

      objects.remove(objectsIndex);
      mixedTargets.remove(mixedTargetsIndex);
      types.remove(typesIndex);
    }
    else
    {
      AnyType anyType = getExtension(peekObject);
      setAttribValue(anyType, prefix == null ? name : prefix + ":" + name, value);
    }
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.AnyType

          if (recordUnknownFeature)
          {
            EObject peekObject = objects.peekEObject();
            if (!(peekObject instanceof AnyType))
            {
              AnyType anyType = getExtension(objects.peekEObject());
              EStructuralFeature entryFeature =
                extendedMetaData.demandFeature(extendedMetaData.getNamespace(feature), extendedMetaData.getName(feature), true);
              anyType.getAny().add(entryFeature, newObject);
              contextFeature = entryFeature;
            }
            return newObject;
          }
          else
          {
            String namespace = extendedMetaData.getNamespace(feature);
            String name = extendedMetaData.getName(feature);
            EStructuralFeature wildcardFeature =
              extendedMetaData.getElementWildcardAffiliation((objects.peekEObject()).eClass(), namespace, name);
            if (wildcardFeature != null)
            {
              int processingKind = laxWildcardProcessing ? ExtendedMetaData.LAX_PROCESSING : extendedMetaData.getProcessingKind(wildcardFeature);
              switch (processingKind)
              {
                case ExtendedMetaData.LAX_PROCESSING:
                case ExtendedMetaData.SKIP_PROCESSING:
                {
                  return newObject;
                }
              }
            }
          }

          newObject = null;
        }
      }
    }
    else if (feature != null && factory != null && extendedMetaData != null)
    {
      // processing unknown feature with xsi:type (xmi:type)
      if (recordUnknownFeature || processAnyXML)
      {
       
        EObject result = null;
        String namespace = extendedMetaData.getNamespace(factory.getEPackage());
        if (namespace == null)
        {
          usedNullNamespacePackage = true;
        }
        if (useNewMethods)
        {
          EClassifier type = extendedMetaData.demandType(namespace, typeName);
          result = createObject(type.getEPackage().getEFactoryInstance(), type, false);
        }
        else
        {
          factory = extendedMetaData.demandType(namespace, typeName).getEPackage().getEFactoryInstance();
          result = createObjectFromFactory(factory, typeName);
        }
        EObject peekObject = objects.peekEObject();
        if (!(peekObject instanceof AnyType))
        {
          AnyType anyType = getExtension(peekObject);
          EStructuralFeature entryFeature =
            extendedMetaData.demandFeature(extendedMetaData.getNamespace(feature), extendedMetaData.getName(feature), true);
          anyType.getAny().add(entryFeature, result);
          contextFeature = entryFeature;
        }
        return result;
      }
      else
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.AnyType

     * <!-- end-user-doc -->
     * @generated
     */
    public AnyType popAnyType(AnyTypeStackFrame anyType)
    {
      AnyType resultAnyTypeValue = anyType.popAnyType();
      this.anyType = anyType;
      return resultAnyTypeValue;
    }
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.