/** * @param id * @return * @see net.sourceforge.ondex.core.ONDEXGraph#deleteConcept(int) */ public boolean deleteConcept(int id) { return og.deleteConcept(id); }
/** * Updates the graph with the new concept and all tables with it. * * @param newRelation * ONDEXConcept newly created */ private void updateRelationInGraph(ONDEXRelation newRelation) { // update all linked tables GraphTableEditor.updateRelationInTables(newRelation, row); // delete old relation from graph graph.deleteConcept(relation.getId()); }
/** * Updates the graph with the new concept and all tables with it. * * @param newConcept * ONDEXConcept newly created */ private void updateConceptInGraph(ONDEXConcept newConcept) { // update all linked tables GraphTableEditor.updateConceptInTables(newConcept, row); // delete old concept from graph, also deletes relations etc graph.deleteConcept(concept.getId()); }
public static void goFilter(OVTK2PropertiesAggregator viewer) { ONDEXGraph graph = viewer.getONDEXJUNGGraph(); Set<ONDEXConcept> del = new HashSet<ONDEXConcept>(); for (ONDEXConcept c : graph.getConcepts()) { if (c.getPID().equals("GO:0008150")) { System.err.println("Found: GO:0008150"); del.add(c); } else if (c.getPID().equals("GO:0005575")) { System.err.println("Found: GO:0005575"); del.add(c); } else if (c.getPID().equals("GO:0003674")) { System.err.println("Found: GO:0003674"); del.add(c); } } for (ONDEXConcept c : del) { graph.deleteConcept(c.getId()); } }
public void filter(Set<ONDEXConcept> ov) throws NullValueException, EmptyStringException, AccessDeniedException{ for(ONDEXConcept c : ov){ boolean addToset = true; for(ConceptAttributeChecker chk :conditions.values()){ if(!chk.check(c)){ addToset = false; break; } } System.err.println("Deleted: "+c.getConceptName().getName()); if(addToset)graph.deleteConcept(c.getId()); } } }
private void mergeConcepts(final Set<Integer> cluster) { Iterator<Integer> it = cluster.iterator(); ONDEXConcept toKeep = graph.getConcept(it.next()); while (it.hasNext()) { ONDEXConcept toMerge = graph.getConcept(it.next()); for (ONDEXRelation r : graph.getRelationsOfConcept(toMerge)) { boolean retainId = false; if (this.relations.contains(r)) { relations.remove(r); retainId = true; } if (retainId) { relations.add(GraphElementManipulation.changeRelationVertex(graph, toMerge, toKeep, r)); } else { GraphElementManipulation.changeRelationVertex(graph, toMerge, toKeep, r); } } GraphElementManipulation.copyConceptAttributes(toMerge, toKeep); int cId = toMerge.getId(); concepts.add(toMerge); if (graph.getConcept(cId) != null) graph.deleteConcept(cId); } }
graph.deleteConcept(c.getId());
realTarget = copyConcept(graph, target, newClass, newDataSource); copyRelations(graph, target, realTarget); graph.deleteConcept(target.getId());
graph.deleteConcept(c.getId());
/** * Merges concept toMerge with concept toKeep. All relations and attributes * are copied across. * * @param graph * - graph * @param toKeep * - concept that will be retained and added to * @param toMerge * - concept that will be merged * @return merged concept * @throws AccessDeniedException * @throws NullValueException * @throws EmptyStringException */ public static ONDEXConcept mergeConcepts(ONDEXGraph graph, ONDEXConcept toKeep, ONDEXConcept toMerge) throws NullValueException, AccessDeniedException, EmptyStringException { for (ONDEXRelation r : graph.getRelationsOfConcept(toMerge)) { changeRelationVertex(graph, toMerge, toKeep, r); } copyConceptAttributes(toMerge, toKeep); graph.deleteConcept(toMerge.getId()); return toKeep; }
d.createAttribute(an, value, false); graph.deleteConcept(c.getId());
graph.deleteConcept(c.getId()); } else { Set<AttributeName> thisAttNames = new HashSet<AttributeName>();
graph.deleteConcept(rId); graph.deleteConcept(rId);
graphInput.deleteConcept(concept.getId());
Set<ONDEXConcept> remove = BitSetFunctions.andNot(all, concepts); for (ONDEXConcept c : remove) { graph.deleteConcept(c.getId());
graphInput.deleteConcept(concept.getId());
graph.deleteConcept(prot.getId()); numRemovedProteins++;
graph.deleteConcept(c.getId());
graphInput.deleteRelation(relation.getId()); graphInput.deleteConcept(concept.getId());
graph.deleteConcept(c.getId());