Package org.gvt.model.biopaxl3

Examples of org.gvt.model.biopaxl3.Compartment


        for (String selected : selectionResult)
        {
          //search among all sourceAddedCompartments
          for (int j = 0 ; j < sourceAddedCompartments.size() ; j++)
          {
            Compartment compartment = sourceAddedCompartments.get(j);

            //if corresponding compartment is found
            if (selected != null &&
              selected.equals(compartment.getName()))
            {
              //remove compartment from sourceAddedCompartments ArrayList
              sourceAddedCompartments.remove(j);

              //remove compartment name from source compartment list
              entityList.remove(selected);
            }
          }
         }
      }
    });

    //Target add button

    targetAddButton = new Button(shell, SWT.NONE);
    targetAddButton.setText("Add...");
    gridData = new GridData(GridData.END, GridData.BEGINNING, true, false);
    gridData.minimumWidth = 100;
    gridData.horizontalIndent = 5;
    targetAddButton.setLayoutData(gridData);
    targetAddButton.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent arg0)
      {
        //new addCompartmentDialog
        AddCompartmentDialog addCompartment =
          new AddCompartmentDialog(new Shell(), allCompartments);

        //open dialog
        boolean addPressed = addCompartment.open();

        //if add button is pressed
        if (addPressed)
        {
          //for each selected compartment
          for (Compartment compartment :
            addCompartment.getSelectedCompartments())
          {
            //check if compartment has been added before
            if (!previouslyAdded(compartment, targetAddedCompartments))
            {
              //add compartment name to target compartment list
              targetCompartmentList.add(compartment.getName());

              //add compartment to targetAddedCompartments ArrayList
              targetAddedCompartments.add(compartment);
            }
          }
        }
      }
    });

    //Target remove button

    targetRemoveButton = new Button(shell, SWT.NONE);
    targetRemoveButton.setText("Remove");
    gridData = new GridData(GridData.BEGINNING, GridData.BEGINNING,
      true, false);
    gridData.horizontalIndent = 5;
    gridData.minimumWidth = 100;
    targetRemoveButton.setLayoutData(gridData);
    targetRemoveButton.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent arg0)
      {
        String[] selectionResult = targetCompartmentList.getSelection();

        //for each selected string
        for (String selected : selectionResult)
        {
          //search among all targetAddedCompartments
          for (int j = 0 ; j < targetAddedCompartments.size() ; j++)
          {
            Compartment compartment = targetAddedCompartments.get(j);

            //if corresponding compartment is found
            if (selected != null &&
              selected.equals(compartment.getName()))
            {
              //remove compartment from targetAddedCompartments ArrayList
              targetAddedCompartments.remove(j);

              //remove compartment name from target compartment list
View Full Code Here


      {
        NodeModel model = (NodeModel) o;

        if (model instanceof Actor)
        {
          Actor actor = (Actor) model;

          System.out.println(actor.getEntity().l3pe.getRDFId());
        }
        else if (o instanceof ChbComplex)
        {
          ChbComplex cmp = (ChbComplex) o;
          System.out.println(cmp.getComplex().getRDFId());
View Full Code Here

          BioPAXL2Reader reader = new BioPAXL2Reader(model);
          reader.createGraph((BioPAXL2Graph) root);
        }
        else if (level == BioPAXLevel.L3)
        {
          root = new BioPAXL3Graph(model);
          BioPAXL3Reader reader = new BioPAXL3Reader(model);
          reader.createGraph((BioPAXL3Graph) root);
        }
      }
    }
View Full Code Here

          System.out.println(actor.getEntity().l3pe.getRDFId());
        }
        else if (o instanceof ChbComplex)
        {
          ChbComplex cmp = (ChbComplex) o;
          System.out.println(cmp.getComplex().getRDFId());
        }
      }
    }

  }
View Full Code Here

      for (GraphObject go : content)
      {
        if (go instanceof ChbConversion)
        {
          ChbConversion conv = (ChbConversion) go;
          org.biopax.paxtools.model.level3.Conversion cnv = conv.getConversion();
          convSet.add(cnv);
        }
      }

      Set<Process> components = l3p.getPathwayComponent();
View Full Code Here

TOP

Related Classes of org.gvt.model.biopaxl3.Compartment

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.