Examples of EntityHolder


Examples of org.gvt.util.EntityHolder

          {
            Node corresponding = (Node) actor.getLabel(BioPAXGraph.EXCISED_FROM);

            if (corresponding instanceof EntityAssociated)
            {
              EntityHolder entity = ((EntityAssociated) corresponding).getEntity();
              List<Node> nodeList = entityToNodeMap.get(entity);

              for (Node node : nodeList)
              {
                targets.add(node);
View Full Code Here

Examples of org.gvt.util.EntityHolder

    if (isLevel2())
    {
      for (physicalEntity pe : getOwlModel().getObjects(physicalEntity.class))
      {
        entities.add(new EntityHolder(pe));
      }
    }
    else if (isLevel3())
    {
      for (EntityReference er : getOwlModel().getObjects(EntityReference.class))
      {
        entities.add(new EntityHolder(er));
      }
      if (entities.isEmpty())
      {
        for (PhysicalEntity pe : getOwlModel().getObjects(PhysicalEntity.class))
        {
          entities.add(new EntityHolder(pe));
        }
      }
    }

    return entities;
View Full Code Here

Examples of org.gvt.util.EntityHolder

//    }
  }

  public EntityHolder getEntity()
  {
    return new EntityHolder(entity);
  }
View Full Code Here

Examples of org.gvt.util.EntityHolder

    return cmp;
  }

  public EntityHolder getEntity()
  {
    return new EntityHolder(cmp);
  }
View Full Code Here

Examples of org.gvt.util.EntityHolder

        for (String selected : selectionResult)
        {
          //search among all addedEntities
          for (int j = 0 ; j < addedEntities.size() ; j++)
          {
            EntityHolder entity = addedEntities.get(j);
           
            //if corresponding entity is found
            if (selected != null &&
              selected.equals(entity.getName()))
            {
              //remove entity from addedEntities ArrayList
              addedEntities.remove(j);
             
              //remove entity keyName from from List
View Full Code Here

Examples of org.gvt.util.EntityHolder

                for (String selected : selectionResult)
                {
                    //search among all addedEntities
                    for (int j = 0 ; j < addedEntities.size() ; j++)
                    {
                        EntityHolder entity = addedEntities.get(j);

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

                            //remove entity keyName from from List
View Full Code Here

Examples of org.gvt.util.EntityHolder

         * Could, and perhaps should, be done in a better way...
         * */
        boolean isProt = false;
        if (node instanceof Actor){
          Actor a = (Actor) node;
          EntityHolder holder = a.getEntity();
          isProt = holder.l3pe.getClass().toString().contains("tein");
         
        }

        if (data == null)
View Full Code Here

Examples of org.gvt.util.EntityHolder

//    }
  }

  public EntityHolder getEntity()
  {
    return new EntityHolder(entity);
  }
View Full Code Here

Examples of org.gvt.util.EntityHolder

         * Could, and perhaps should, be done in a better way...
         * */
        boolean isProt = false;
        if (node instanceof Actor){
          Actor a = (Actor) node;
          EntityHolder holder = a.getEntity();
          isProt = holder.l2pe.getClass().toString().contains("tein");
         
        }

        if (data == null)
View Full Code Here

Examples of org.gvt.util.EntityHolder

                for (String selected : selectionResult)
                {
                    //search among all sourceAddedEntities
                    for (int j = 0 ; j < sourceAddedEntities.size() ; j++)
                    {
                        EntityHolder entity = sourceAddedEntities.get(j);

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

                            //remove entity keyName from source entity 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 addEntityDialog
                AddEntityDialog addEntity =
                    new AddEntityDialog(new Shell(), allEntities);

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

                //if add button is pressed
                if (addPressed)
                {
                    //for each selected entity
                    for (EntityHolder entity : addEntity.getSelectedEntities())
                    {
                        //check if entity has been added before
                        if (!previouslyAdded(entity, targetAddedEntities))
                        {
                            //add entity keyName to target entity list
                            targetEntityList.add(entity.getName());

                            //add entity to targetAddedEntities ArrayList
                            targetAddedEntities.add(entity);
                        }
                    }
                }
            }
        });

        //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 = targetEntityList.getSelection();

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

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

                            //remove entity keyName from target entity list
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.