Package org.eclipse.emf.ecore.util

Examples of org.eclipse.emf.ecore.util.FeatureMap


    private Scenario getDefaultScenario(Definitions def) {
      if(def.getRelationships() != null && def.getRelationships().size() > 0) {
          // current support for single relationship
          Relationship relationship = def.getRelationships().get(0);
          for(ExtensionAttributeValue extattrval : relationship.getExtensionValues()) {
                FeatureMap extensionElements = extattrval.getValue();
                @SuppressWarnings("unchecked")
                List<BPSimDataType> bpsimExtension = (List<BPSimDataType>) extensionElements.get(BpsimPackage.Literals.DOCUMENT_ROOT__BP_SIM_DATA, true);
                if(bpsimExtension != null && bpsimExtension.size() > 0) {
                    BPSimDataType bpmsim = bpsimExtension.get(0);
                  if(bpmsim.getScenario() != null && bpmsim.getScenario().size() > 0) {
                    return bpmsim.getScenario().get(0);
                  }
View Full Code Here


    @Override
    public void handle(Object request, RequestData data) {
        super.handle(request, data);
       
        //also determine the sub operation
        FeatureMap elements = (FeatureMap) EMFUtils.get((EObject)request, "group");
        ListIterator i = elements.valueListIterator();
        int flag = 0;
        while(i.hasNext()) {
            Object e = i.next();
            if (e.getClass().getSimpleName().startsWith("Insert")) {
                flag |= 1;
View Full Code Here

        data.setSubOperation(sb.toString());
    }
   
    @Override
    public List<String> getLayers(Object request) {
        FeatureMap elements = (FeatureMap) EMFUtils.get((EObject)request, "group");
       
        List<String> layers = new ArrayList();
        ListIterator i = elements.valueListIterator();
        while(i.hasNext()) {
            Object e = i.next();
            if (EMFUtils.has((EObject)e, "typeName")) {
                Object typeName = EMFUtils.get((EObject)e, "typeName");
                if (typeName != null) {
View Full Code Here

    @Override
    public void handle(Object request, RequestData data) {
        super.handle(request, data);
       
        //also determine the sub operation
        FeatureMap elements = (FeatureMap) EMFUtils.get((EObject)request, "group");
        if (elements == null) {
            return;
        }
       
        ListIterator<Object> i = elements.valueListIterator();
        int flag = 0;
        while(i.hasNext()) {
            Object e = i.next();
            if (e.getClass().getSimpleName().startsWith("Insert")) {
                flag |= 1;
View Full Code Here

    }
   
    @SuppressWarnings("unchecked")
    @Override
    public List<String> getLayers(Object request) {
        FeatureMap elements = (FeatureMap) EMFUtils.get((EObject)request, "group");
        if (elements == null) {
            return null;
        }
       
        List<String> layers = new ArrayList<String>();
        ListIterator<Object> i = elements.valueListIterator();
        while(i.hasNext()) {
            Object e = i.next();
            if (EMFUtils.has((EObject)e, "typeName")) {
                Object typeName = EMFUtils.get((EObject)e, "typeName");
                if (typeName != null) {
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

TOP

Related Classes of org.eclipse.emf.ecore.util.FeatureMap

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.