Package org.eclipse.emf.ecore.util

Examples of org.eclipse.emf.ecore.util.FeatureMap$Entry$Internal


                int baseTimeUnit = 2; // default to minutes
                if(def.getRelationships() != null && def.getRelationships().size() > 0) {
                    Relationship relationship = def.getRelationships().get(0);
                    for(ExtensionAttributeValue extattrval : relationship.getExtensionValues()) {
                        FeatureMap extensionElements = extattrval.getValue();
                        @SuppressWarnings("unchecked")
                        List<BPSimDataType> bpsimExtensions = (List<BPSimDataType>) extensionElements.get(BpsimPackage.Literals.DOCUMENT_ROOT__BP_SIM_DATA, true);
                        if(bpsimExtensions != null && bpsimExtensions.size() > 0) {
                            BPSimDataType processAnalysis = bpsimExtensions.get(0);
                            if(processAnalysis.getScenario() != null && processAnalysis.getScenario().size() > 0) {
                                Scenario simulationScenario = processAnalysis.getScenario().get(0);
                                baseTimeUnit = simulationScenario.getScenarioParameters().getBaseTimeUnit().getValue();
View Full Code Here


    {
      documentRoot = (EObject)resource.getContents().get(0);
      EClass documentRootClass = documentRoot.eClass();
      if ("".equals(extendedMetaData.getName(documentRootClass))) //TODO efficient way to check this? Maybe DataObject.getContainer should also check this?
      {
        FeatureMap featureMap = (FeatureMap)documentRoot.eGet(documentRootClass.getEStructuralFeature(0)); // get mixed feature
        int size = featureMap.size();
        for (int index = 0; index < size; index++)
        {
          EStructuralFeature feature = featureMap.getEStructuralFeature(index);
          boolean isText =
            feature == XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT ||
            feature == XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA ||   
            feature == XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT;
          if (!isText)
          {
            if (feature instanceof EReference)
            {
              rootObject = (EObject)featureMap.getValue(index);
              documentRoot.eUnset(feature);
            }
            else //EAttribute
            {
              rootObject = (EObject)SDOUtil.createDataTypeWrapper((Type)feature.getEType(), featureMap.getValue(index));
            }
            rootElement = feature;
            break;
          }
        } //for
View Full Code Here

        extent.addUnique(object);
      }
         
      if (extendedMetaData != null && !mixedTargets.isEmpty())
      {
        FeatureMap featureMap = mixedTargets.pop();
        EStructuralFeature target = extendedMetaData.getMixedFeature(object.eClass());
        if (target != null)
        {
          FeatureMap otherFeatureMap = (FeatureMap)object.eGet(target);
          for (FeatureMap.Entry entry : new ArrayList<FeatureMap.Entry>(featureMap))
          {
            // Ignore a whitespace only text entry at the beginning.
            //
            if (entry.getEStructuralFeature() !=  XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT ||
                  !"".equals(XMLTypeUtil.normalize(entry.getValue().toString(), true)))
            {
              otherFeatureMap.add(entry.getEStructuralFeature(), entry.getValue());
            }
          }
        }
        text = null;
      }
View Full Code Here

   */
  protected void processObject(EObject object)
  {
    if (recordAnyTypeNSDecls && object instanceof AnyType)
    {
      FeatureMap featureMap = ((AnyType)object).getAnyAttribute();
      for (Map.Entry<String, String> entry : helper.getAnyContentPrefixToURIMapping().entrySet())
      {
        Object uri = entry.getValue();
        featureMap.add(extendedMetaData.demandFeature(ExtendedMetaData.XMLNS_URI, entry.getKey(), false), uri == null ? "" : uri);
      }
    }

    if (object != null)
    {
View Full Code Here

    return header.substring(firstQuoteIndex + 1, lastQuoteIndex);
  }

  protected void handleComment(String comment)
  {
    FeatureMap featureMap = mixedTargets.peek();
    featureMap.add(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT, comment);
    text = null;
  }
View Full Code Here

    featureMap.add(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT, comment);
    text = null;
  }
  protected void handleMixedText()
  {
    FeatureMap featureMap = mixedTargets.peek();
    featureMap.add(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, text.toString());
    text = null;
  }
View Full Code Here

    text = null;
  }

  protected void handleCDATA()
  {
    FeatureMap featureMap = mixedTargets.peek();
    featureMap.add(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, text.toString());
    text = null;
  }
View Full Code Here

    text = null;
  }

  protected void handleProcessingInstruction(String target, String data)
  {
    FeatureMap featureMap = mixedTargets.peek();
    FeatureMapUtil.addProcessingInstruction(featureMap, target, data);
    text = null;
  }
View Full Code Here

    isSubmitNodeHasUserCommand(flowElements,sb);
    processDefaultTitleAndDefaultForm(process,sb);
    boolean yzForm = true;
    if (process.getExtensionValues().size() > 0) {
      for (ExtensionAttributeValue extensionAttributeValue : process.getExtensionValues()) {
        FeatureMap extensionElements = extensionAttributeValue.getValue();
        for (Entry entry : extensionElements) {
          if (entry.getValue() instanceof FormUri) {
            FormUri formUri = (FormUri) entry.getValue();
            if (formUri.getExpression().getValue() == null || formUri.getExpression().getValue().equals("")) {
              yzForm = true;
View Full Code Here

  private static void processDefaultTitleAndDefaultForm(Process process,StringBuffer sb) {
    boolean formUriYZ = false;
    boolean taskSubjectYZ = false;
    if (process.getExtensionValues().size() > 0) {
      for (ExtensionAttributeValue extensionAttributeValue : process.getExtensionValues()) {
        FeatureMap extensionElements = extensionAttributeValue.getValue();
        for (Entry entry : extensionElements) {
          if (entry.getValue() instanceof FormUri) {
            FormUri formUri = (FormUri) entry.getValue();
            if (formUri.getExpression().getValue() != null && !formUri.getExpression().getValue().equals("")) {
              formUriYZ = true;
View Full Code Here

TOP

Related Classes of org.eclipse.emf.ecore.util.FeatureMap$Entry$Internal

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.