@Override public Set<EvidenceType> getEvidence() { return parent.getEvidence(); }
private static boolean hasEvidenceType(ONDEXConcept candidate, EvidenceType ev) { boolean result = false; for (EvidenceType et : candidate.getEvidence()) { if (et.equals(ev)) { result = true; break; } } return result; }
/** * Creates an evidence type on concept only if it does not already exists * * @param target * - relation * @param newEv * - attribute to create * @throws AccessDeniedException * @throws NullValueException */ public static void addNewEvidence(ONDEXConcept target, EvidenceType newEv) throws NullValueException, AccessDeniedException { if (!target.getEvidence().contains(newEv)) target.addEvidenceType(newEv); }
break; case EVIDENCETYPE: Color[] etcolors = new Color[node.getEvidence().size()]; int i = 0; for (EvidenceType et : node.getEvidence()) { etcolors[i] = Config.getColorForEvidenceType(et); i++;
for (EvidenceType et : c.getEvidence()) evidence.add(et);
if (c.getDescription() != null) desc = c.getDescription(); for (EvidenceType et : c.getEvidence()) { clause.delete(0, clause.length());
@Override protected void doAction() { for (ONDEXConcept vertex : entities) { ONDEXConcept c = vertex; for (EvidenceType et : c.getEvidence()) { for (ONDEXConcept oc : viewer.getONDEXJUNGGraph().getConceptsOfEvidenceType(et)) { viewer.getONDEXJUNGGraph().setVisibility(oc, false); } } } }
for (EvidenceType et : concept.getEvidence()) { if (currentEts == null) { currentEts = et.getId();
if (!concept.getEvidence().contains(newET)) { if (concept.getEvidence().size() > 1) concept.removeEvidenceType(newET); return concept.getEvidence(); default: System.out.println("unknown state for updating cell editor value");
writeList(extract(c.getEvidence()), "Evidence: ", b);
/** * Clone concept with having a new DataSource. * * @param oldC * old ONDEXConcept * @param newDataSource * new DataSource to use * @return new ONDEXConcept */ public ONDEXConcept clone(ONDEXConcept oldC, DataSource newDataSource) { // first clone concept with new DataSource ONDEXConcept newC = graph.createConcept(oldC.getPID(), oldC.getAnnotation(), oldC.getDescription(), newDataSource, oldC.getOfType(), oldC.getEvidence()); // copies everything else copyEverythingElse(oldC, newC); return newC; }
/** * Clone concept with having a new PID. * * @param oldC * old ONDEXConcept * @param newPID * new PID to use * @return new ONDEXConcept */ public ONDEXConcept clone(ONDEXConcept oldC, String newPID) { // first clone concept with new PID ONDEXConcept newC = graph.createConcept(newPID, oldC.getAnnotation(), oldC.getDescription(), oldC.getElementOf(), oldC.getOfType(), oldC.getEvidence()); // copies everything else copyEverythingElse(oldC, newC); return newC; }
/** * Clone concept with having a new ConceptClass. * * @param oldC * old ONDEXConcept * @param newCC * new ConceptClass to use * @return new ONDEXConcept */ public ONDEXConcept clone(ONDEXConcept oldC, ConceptClass newCC) { // first clone concept with new ConceptClass ONDEXConcept newC = graph.createConcept(oldC.getPID(), oldC.getAnnotation(), oldC.getDescription(), oldC.getElementOf(), newCC, oldC.getEvidence()); // copies everything else copyEverythingElse(oldC, newC); return newC; }
/** * Initialises table data with the given ONDEXGraph. * * @param graph * ONDEXGraph to extract concepts from */ public ConceptPanel(ONDEXGraph graph) { Object[][] data = new Object[graph.getConcepts().size()][]; int i = 0; for (ONDEXConcept concept : graph.getConcepts()) { // first entry in table row is concept itself Object[] row = { concept, concept.getPID(), concept.getAnnotation(), concept.getDescription(), concept.getElementOf(), concept.getOfType(), concept.getEvidence() }; data[i] = row; i++; } // initialise table model and populate table DefaultTableModel model = new DefaultTableModel(); model.setDataVector(data, header); table = new ConceptTable(model, graph); // add table to panel this.setLayout(new GridLayout(1, 1)); this.add(new JScrollPane(table)); Util.calcColumnWidths(table, 150); }
Set<EvidenceType> evidenceTypes= con.getEvidence();
for (EvidenceType evidence : conceptToClone.getEvidence()) { ets.add(nomd.getEvidenceType(evidence.getId()));
EmptyStringException { Collection<EvidenceType> evidence = new ArrayList<EvidenceType>(); for (EvidenceType et : c.getEvidence()) evidence.add(et);
/** * Copies all of the attributes from one concept to another (only if they do * not already exist at target) * * @param from * - concept to copy from * @param to * - concept to copy to * @throws AccessDeniedException * @throws NullValueException * @throws EmptyStringException */ public static void copyConceptAttributes(ONDEXConcept from, ONDEXConcept to) throws NullValueException, AccessDeniedException, EmptyStringException { for (EvidenceType et : from.getEvidence()) addNewEvidence(to, et); for (ConceptAccession ca : from.getConceptAccessions()) addNewAccession(to, ca); for (ConceptName cn : from.getConceptNames()) addNewName(to, cn); for (Attribute attribute : from.getAttributes()) addNewAttribute(to, attribute); if (from.getAnnotation() != null && to.getDescription() == null) to.setAnnotation(from.getAnnotation()); if (from.getDescription() != null && to.getDescription() == null) to.setDescription(from.getDescription()); }
for (EvidenceType et : copySourceConcept.getEvidence()) { copyTargetConcept.addEvidenceType(et);
Set<EvidenceType> et = c.getEvidence(); if (prettyPrint) xmlw.writeCharacters(newline);