Package org.emftrace.metamodel.QUARCModel.GSS

Examples of org.emftrace.metamodel.QUARCModel.GSS.Element


  /**
   * deselect all parents of the node
   * @param sourceNode a GraphNode
   */
  private void deselectTargets(GraphNode sourceNode) {
    Element sourceElement = getElementForNode((GSSElementGraphNode) sourceNode);
    cacheManager.markSelectedGoalAsToRemove((Goal) sourceElement);
   
  for (Object outgoingConnection : sourceNode.getSourceConnections()){
   
   

    GraphNode destinationNode = ((GraphConnection)outgoingConnection).getDestination();
   
    Element destinationElement = getElementForNode((GSSElementGraphNode) destinationNode);
   
    Decomposition decomposition = cacheManager.getDecompositionBetween(sourceElement, destinationElement);
    cacheManager.markSelectedGoalDecompositionAsToRemove(decomposition);
   
    cacheManager.markSelectedGoalDecompositionAsToRemove(decomposition);
View Full Code Here


    // create a node for each applicable Element
    for (Entry<ApplicableElement, Element> cacheEntrySet : cacheManager
        .getApplicableElementsSet()) {

      // ApplicableElement applicableElement = cacheEntrySet.getKey();
      Element element = cacheEntrySet.getValue();

      int level = cacheManager.getLevel(element);
      int sublevel = cacheManager.getSublevel(element);

      GSSElementGraphNode node = createNode(zestGraph, SWT.NONE, element,
View Full Code Here

   *
   * @param relation
   *            a Relation between Elements
   */
  protected GraphConnection createConnection(final Relation relation) {
    Element target = cacheManager.getTargetOfRelation(relation);
    Element source = cacheManager.getSourceOfRelation(relation);
    GraphNode targetNode = getNodeForElement(target);
   
    if (targetNode == null)
      new Exception(relation + " has no vaild traget").printStackTrace();
 
View Full Code Here

   * @generated NOT
   */
  @Override
  public String getText(Object object) {
   
    Element source = ((Rating)object).getSource();
    String sourceName = source == null ? "" : source.getName();
    Element target = ((Rating)object).getTarget();
    String targetName = target == null ? "" : target.getName();
   
    String label = "\"" + (sourceName == null || sourceName.isEmpty() && source != null ? source.eClass().getName() : sourceName) + "\" ";

    Object weight = ((Rating)object).getWeight();
    label += "-(" + (weight == null ? "" : weight.toString()) + ")";
   
    label += "-> \""+ (targetName == null || targetName.isEmpty() && target != null ? target.eClass().getName() : targetName) + "\"";
    return getString("_UI_Rating_type"+label;
  }
View Full Code Here

   */
  @Override
  public String getText(Object object) {
 
    String globalPriorityStr = ((PrioritizedElement)object).getGlobalPriority();
    Element element = ((PrioritizedElement)object).getElement();
    String goalNameStr = element != null? "\""+element.getName()+"\"" : "none";
    return   getString("_UI_PrioritizedElement_type") + " " + goalNameStr + " " +" ("+globalPriorityStr+")";
  }
View Full Code Here

  @Override
  public String getText(Object object) {
    Decomposition decomposition = ((PrioritizedDecomposition)object).getDecompostion();
    String label = "";
    if (decomposition != null ){
    Element source = decomposition.getSource();
    String sourceName = source == null ? "" : source.getName();
    Element target = decomposition.getTarget();
    String targetName = target == null ? "" : target.getName();
   
    label += "\"" + (sourceName == null || sourceName.isEmpty() && source != null ? source.eClass().getName() : sourceName) + "\" ";

    String weight = ((PrioritizedDecomposition)object).getWeight();
    if (weight!= null)
      label+= " ("+weight+")";
   
    label += "-> \""+ (targetName == null || targetName.isEmpty() && target != null ? target.eClass().getName() : targetName) + "\"";
    }
    return
      getString("_UI_PrioritizedDecomposition_type") + " " + label;
  }
View Full Code Here

      LinkedHashMap<Element, Float> columnVerctorB) {
   
    float result = 0f;

    for (Entry<Element, Float> entry : columnVectorA.entrySet()) {
      Element element = entry.getKey();
      float valueA = entry.getValue();

      // valueB = 0 if no value in columVectorA for element exists
      float valueB = 0f;
      if (columnVerctorB.containsKey(element))
View Full Code Here

    for (Element goal : cacheManager
        .getLeafApplicableElementElements(GSSLayer.layer1)) {

      for (Relation impact : cacheManager
          .getApplicableIncomingImpactRelations(goal)) {
        Element source = cacheManager.getSourceOfRelation(impact);
        @SuppressWarnings("static-access")
        int layer = cacheManager.getGSSLayer(source);
        // impacts from layer 3 to 2 & 1 only
        if (layer == GSSLayer.layer3){
       
View Full Code Here

  @Override
  protected void doRun() {
    if (rowKeyContaintsSourcesOfRelation){
   
      for (Entry<Element, LinkedHashMap<Element, Float>> columnEntry : ratingsMatrix.getColumnEntrySet()){
        Element sourceElement = columnEntry.getKey();
        for (Entry<Element, Float> entry: columnEntry.getValue().entrySet() ){
          // key = target Element
          // value = weight
          cacheManager.createRatingRelation(sourceElement, entry.getKey(), entry.getValue());
        }
      }
    }
    else {
      for (Entry<Element, LinkedHashMap<Element, Float>> columnEntry : ratingsMatrix.getColumnEntrySet()){
        Element targetElement = columnEntry.getKey();
        for (Entry<Element, Float> entry: columnEntry.getValue().entrySet() ){
          // key = target Element
          // value = weight
          cacheManager.createRatingRelation(entry.getKey(), targetElement, entry.getValue());
        }
View Full Code Here

        outgoingRelationList.add(cacheManager.getApplicableOutgoingIsARelations(element));
      outgoingRelationList.addAll(cacheManager.getApplicableOutgoingImpactRelations(element));
     
      for ( Relation outgoingRelation: (outgoingRelationList)){

        Element target = cacheManager.getTargetOfRelation(outgoingRelation);
        checkNodeForIndirectRelationToSolutionInstrument(target);
     
    }
  }
View Full Code Here

TOP

Related Classes of org.emftrace.metamodel.QUARCModel.GSS.Element

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.