@Override public Set<Attribute> getAttributes() { return parent.getAttributes(); }
/** * Return all of attribute names of the concepts * contained in the collection * * @param cs * @return set of attribute names */ public static Set<AttributeName> getConceptAttNames(Collection<ONDEXConcept> cs) { Set<AttributeName> result = new HashSet<AttributeName>(); for (ONDEXConcept c : cs) { for (Attribute g : c.getAttributes()) { result.add(g.getOfType()); } } return result; }
/** * Return all of attribute names of the concepts * contained in the collection * * @param cs * @return set of attribute names */ public static Set<AttributeName> getConceptAttNames(Collection<ONDEXConcept> cs) { Set<AttributeName> result = new HashSet<AttributeName>(); for (ONDEXConcept c : cs) { for (Attribute g : c.getAttributes()) { result.add(g.getOfType()); } } return result; }
private void step() { boolean match = false; next = null; while (!match && view.hasNext()) { ONDEXConcept r = view.next(); List<String> gds = new ArrayList<String>(); for (Attribute g : r.getAttributes()) { String name = g.getOfType().getId(); if (validArgs.contains(name)) gds.add(name); } if (gds.size() > 0) { match = true; next = gds.toArray(new String[gds.size()]); } } } }
/** * Populates given combo box with list of AttributeNames for visible * concepts. * * @param box * JComboBox to fill */ private void populateComboBox(JComboBox box) { Set<AttributeName> ans = new HashSet<AttributeName>(); for (ONDEXConcept n : graph.getVertices()) { for (Attribute g : n.getAttributes()) { if (!AppearanceSynchronizer.attr .contains(g.getOfType().getId())) ans.add(g.getOfType()); } } box.removeAllItems(); box.addItem("None"); if (ans.size() > 0) { AttributeName[] array = ans.toArray(new AttributeName[0]); Arrays.sort(array); for (AttributeName an : array) { box.addItem(an); } box.revalidate(); } }
Set<Attribute> attributes = ac.getAttributes();
for (Attribute attribute : c.getAttributes()) { ArrayKey<Object> accessionKey = new ArrayKey<Object>(new Object[]{attribute.getOfType(), attribute.getValue()}); gdsToConceptIndexBuider.addEntry(accessionKey, c.getId());
/** * Copies all Attribute from old concept to new concept. * * @param oldC * old ONDEXConcept * @param newC * new ONDEXConcept */ private void copyGDS(ONDEXConcept oldC, ONDEXConcept newC) { // iterate over all old Attribute for (Attribute attribute : oldC.getAttributes()) { // clone old Attribute on new concept newC.createAttribute(attribute.getOfType(), attribute.getValue(), attribute.isDoIndex()); } }
public void run() { // just being paranoid cleanPopups(); if (showMouseOver && vv.isShowing() && onNode && n.equals(currentNode) && !activePopups.containsKey(n)) { ConceptClass cc = n.getOfType(); if (cc.getId().equals("Comp") || (cc.getSpecialisationOf() != null && cc.getSpecialisationOf().getId().equals("Comp"))) { for (Attribute attr : n.getAttributes()) { Object o = attr.getValue(); if (o instanceof ChemicalStructure) { // use Attribute Editor as a hack JComponent c = AttributePanel.findEditor(attr); if (c != null) { c.setBorder(BorderFactory.createEtchedBorder()); c.setPreferredSize(new Dimension(150, 150)); Point location = calculatePopupLocation(c); // show popup PopupFactory popupFactory = PopupFactory.getSharedInstance(); Popup popup = popupFactory.getPopup(vv, c, location.x, location.y); // just being paranoid if (!activePopups.containsKey(n)) { activePopups.put(n, popup); popup.show(); } } } } } } } }, 500);
for (ONDEXConcept concept : graph.getConcepts()) { for (Attribute attribute : concept.getAttributes()) {
public void parseLine(String[] data) throws FileNotFoundException, IOException { ONDEXConcept exp = lookup.lookupExperiment(data[0]); if (exp.getAttributes().size() == 0) { exp.createAttribute(ecoCont, data[1], false); exp.createAttribute(ecoTest, data[2], false); exp.createAttribute(cell, data[3], false); exp.createAttribute(age, data[5], false); exp.createAttribute(treatments, data[8], false); exp.createAttribute(description, data[7], false); exp.createAttribute(hormoneTreat, data[4], false); exp.createAttribute(hormoneConc, data[6], false); } createHormoneContext(data[4], exp); }
for (Attribute attribute : c.getAttributes()) { if (attribute.getOfType().equals(at)) { propagate(toKeep, c, 0);
for (Attribute attribute : ac.getAttributes()) { if(attribute.getOfType().getId().equals("AA") || attribute.getOfType().getId().equals("NA")){
for (Attribute attribute : ac.getAttributes()) { if(attribute.getOfType().getId().equals("AA") || attribute.getOfType().getId().equals("NA")){
for (Attribute attribute : concept.getAttributes()) { if(attribute.getOfType().getId().equals("AA") || attribute.getOfType().getId().equals("NA")){
for (Attribute attribute : conceptToClone.getAttributes()) { AttributeName att = attribute.getOfType(); AttributeName newAtt = nomd.getAttributeName(att.getId());
for (Attribute attribute : c.getAttributes()) { nc.createAttribute(attribute.getOfType(), attribute.getValue(), attribute.isDoIndex());
/** * 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 (Attribute attribute : copySourceConcept.getAttributes()) { copyTargetConcept.createAttribute(attribute.getOfType(), attribute.getValue(), attribute.isDoIndex());
Set<Attribute> attribute = c.getAttributes(); if (prettyPrint) xmlw.writeCharacters(newline);