@Override public ConceptName getConceptName(String name) throws NullValueException, EmptyStringException { return parent.getConceptName(name); }
ConceptName cn = concept.getConceptName(); if (cn != null) { defaultName = cn.getName();
@Override public ConceptName getConceptName() { return parent.getConceptName(); }
ConceptName cn = concept.getConceptName(); if (cn != null) name = concept.getConceptName().getName(); else {
public static String getName(ONDEXConcept c, String prefix){ String name; ConceptName cn = c.getConceptName(); if(cn != null ){ name = c.getConceptName().getName(); if(name == null || name.trim().equals("")){ name = prefix+c.getId(); } } else{ name = prefix+c.getId(); } return name; }
/** * helper method to extract a usable concept name. * * @param c * a concept. * @return a usable name. */ private String extractName(ONDEXConcept c) { String str = ""; if (c.getConceptName() != null) str = c.getConceptName().getName(); if (str.trim().length() == 0) str = c.getPID(); if (str.trim().length() == 0) str = c.getId() + ""; return str; }
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()); } } }
ConceptName name = abstractConcept.getConceptName(); if (name != null) { builder.append(name.getName());
/** * Returns a JLabel for the concept */ @Override public Object getElementAt(int index) { JLabel label = null; if (index > -1) { ONDEXConcept ac = concepts.get(index); String name = null; ConceptName cn = ac.getConceptName(); if (cn != null) name = cn.getName(); else name = String.valueOf(ac.getId()); label = new JLabel(name); label.setName(String.valueOf(ac.getId())); label.setToolTipText("(" + ac.getId() + ") " + ac.getDescription()); } return label; }
/** * Creates a name on concept only if it does not already exists * * @param target * - relation * @param newName * - attribute to create * @throws AccessDeniedException * @throws EmptyStringException * @throws NullValueException */ public static void addNewName(ONDEXConcept target, ConceptName newName) throws NullValueException, EmptyStringException, AccessDeniedException { if (target.getConceptName(newName.getName()) == null) target.createConceptName(newName.getName(), false); }
/** * Create a name for concepts * * @param c * ONDEXConcept * @return normalised name */ private String getDefaultNameForConcept(ONDEXConcept c) { String name = null; // this is the preferred concept name ConceptName cn = c.getConceptName(); // use accessions as alternatives Set<ConceptAccession> accs = c.getConceptAccessions(); if (cn != null && cn.getName().trim().length() > 0) name = cn.getName().trim(); else if (accs.size() > 0) for (ConceptAccession acc : accs) { if (acc.getAccession().trim().length() > 0) { if (acc.getElementOf().equals(c.getElementOf())) { // prefer native accession name = acc.getAccession().trim(); break; } name = acc.getAccession().trim(); } } else name = "null"; return name; }
@Override public Object getCellEditorValue() { // this is value returned by default editor String newName = super.getCellEditorValue().toString(); if (name == null) { // construct new CN with defaults if (newName.trim().length() > 0) name = concept.createConceptName(newName, false); } else { // existing CN check name update if (!newName.equals(name.getName())) { // delete old one ConceptName old = concept.getConceptName(name.getName()); concept.deleteConceptName(name.getName()); // keep preferred setting and create non empty name if (newName.trim().length() > 0) name = concept.createConceptName(newName, old.isPreferred()); else // clear existing concept name from table name = null; } } // return concept name instead of string return name; }
ConceptName cn = c.getConceptName();
ConceptName cn = c.getConceptName();
/** * Tries to get the most worthwhile identifier for the concept * * @param c * - concept * @return - some id (in order of decreasing preference: name, pid, * description, concepts class+is) */ private static String getSomething(ONDEXConcept c) { if (c.getConceptName() != null) { return c.getConceptName().getName(); } if (c.getPID() != null && c.getPID().equals("")) { return c.getPID(); } if (c.getDescription() != null && c.getDescription().equals("")) { return c.getDescription(); } return "[" + c.getOfType().getId() + " " + c.getId() + "]"; }
/** * Constructs the local name of a given concept. * * @param c * ONDEXConcept * @return String */ private String getLocalName(ONDEXConcept c) { String local = String.valueOf(c.getId()); if (concat) { // check if preferred name is present ConceptName preferredName = c.getConceptName(); if (preferredName != null) { local = local + ": " + quote(preferredName.getName()); } else { // use PID as fall-back local = local + ": " + quote(c.getPID()); } } return local; }
if(ac.getConceptName(symbol) == null){ ac.createConceptName(symbol, true);
if(ac.getConceptName(symbol) == null){ ac.createConceptName(symbol, true);
/** * Creates new form NewJFrame1 */ public SetSelector() throws Exception { if (OVTK2Desktop.getDesktopResources().getSelectedViewer() == null) { return; } OVTK2Desktop.getInstance().getDesktopResources().getParentPane().add(this); graph = OVTK2Desktop.getDesktopResources().getSelectedViewer().getONDEXJUNGGraph(); initComponents(); this.setVisible(true); this.setTitle("Show tagget sets for members"); DefaultListModel listModel = new DefaultListModel(); lSets.setModel(listModel); for (ONDEXConcept c : graph.getConceptsOfConceptClass(MdHelper.createCC(graph, "Superset"))) { JCheckBox check = new JCheckBox(c.getConceptName().getName()); supersets.put(check, c); listModel.addElement(check); } System.err.println("Set selectior initialized."); }
String value = c.getConceptName().getName(); for (ONDEXConcept d : cluster) { d.createAttribute(an, value, false);