@Override protected AttributeName retrieveAttributeName(String id) { return parent.getAttributeName(id); }
/** * Check for selection of an AttributeName. */ public void actionPerformed(ActionEvent arg0) { ONDEXJUNGGraph aog = (ONDEXJUNGGraph) graph; JComboBox box = (JComboBox) arg0.getSource(); String name = (String) box.getSelectedItem(); an = aog.getMetaData().getAttributeName(name); }
@Override protected AttributeName resolveExternally(String id) { return og.getMetaData().getAttributeName(id); } };
/** * Constructor. */ public StructurePlugin(ONDEXGraph aog) { super(aog); an = aog.getMetaData().getAttributeName("structure"); }
/** * Constructor. */ public URIPlugin(ONDEXGraph aog) { super(aog); uri_an = aog.getMetaData().getAttributeName("URI"); url_an = aog.getMetaData().getAttributeName("URL"); }
/** * Constructor. */ public TaxidPlugin(ONDEXGraph aog) { super(aog); taxid_an = aog.getMetaData().getAttributeName("TAXID"); }
/** * @param s * @param aog */ public HierarchyPlugin(ONDEXGraph aog) { super(aog); an_theta = aog.getMetaData().getAttributeName("THETA"); an_logl = aog.getMetaData().getAttributeName("LOGL"); }
@Override public AttributeName getSpecialisationOf() { String aName = MetaDataHelper.fetchString(sg, tableName, "specOf", mid); if (aName == null || aName.isEmpty()) { return null; } return sg.getMetaData().getAttributeName(aName); }
protected static AttributeName createAttName(ONDEXGraphMetaData meta, String type, Class<?> cls) throws NullValueException, EmptyStringException{ AttributeName att = meta.getAttributeName(type); if(att == null)att = meta.getFactory().createAttributeName(type, cls); return att; } }
public AttributeName safeFetchAttributeName(String id, Class<?> type) { AttributeName an = metaData.getAttributeName(id); if (an == null) { an = metaData.getFactory().createAttributeName(id, type); } return an; }
protected static AttributeName createAttName(ONDEXGraphMetaData meta, String type, Class<?> cls) throws NullValueException, EmptyStringException{ AttributeName att = meta.getAttributeName(type); if(att == null)att = meta.getFactory().createAttributeName(type, cls); return att; } }
/** * fetches the required metadata or throws a respective runtime * exception if it doesn't exist. * * @param id the id of the metadata object. */ public AttributeName requireAttributeName(String id) throws AttributeNameMissingException { AttributeName a = graph.getMetaData().getAttributeName(id); if (a == null) throw new AttributeNameMissingException("Attribute Name " + id + " missing"); else return a; }
public static void initialiseMetaData(ONDEXGraph g) { graph = g; ONDEXGraphMetaData metaData = graph.getMetaData(); // required metadata for a publication dataSource = metaData.getFactory().createDataSource("OGLYCBASE", "o-linked glycoprotein database"); nlm = metaData.getDataSource("NLM"); cc = metaData.getConceptClass("Publication"); // see entries of et = metaData.getEvidenceType("IMPD"); // Attributes for publication authorsAttributeName = metaData.getAttributeName("AUTHORS"); citationAttributeName = metaData.getAttributeName("JOURNAL_REF"); yearPublishedAttributeName = metaData.getAttributeName("YEAR"); }
@Override public AttributeName getOfType() { String anId = SubCompHelper.fetchString(sg, tableName, "attrName", gdsno); return sg.getMetaData().getAttributeName(anId); }
/** * fetches the required metadata or throws a respective runtime * exception if it doesn't exist. * * @param id the id of the metadata object. */ public AttributeName requireAttributeName(String id) throws AttributeNameMissingException { AttributeName a = graph.getMetaData().getAttributeName(id); if (a == null) throw new AttributeNameMissingException("Attribute Name " + id + " missing"); else return a; }
public static void assignBlastWeight(ONDEXGraph graph) { AttributeName an = graph.getMetaData().getFactory().createAttributeName("BLAST_WEIGHT", Double.class); for (ONDEXRelation r : graph.getRelations()) { Attribute attribute = r.getAttribute(graph.getMetaData().getAttributeName("BLEV")); if (attribute == null) continue; Float score = (float) (double) (Double) attribute.getValue(); Double value = (double) 1f / (1f + (float) Math.exp(((((float) Math.log10(score) + 3f) * 6.66667f) + 10f))); r.createAttribute(an, value, false); } }
private static void assignCoexWeight(ONDEXGraph graph) { AttributeName an = graph.getMetaData().getFactory().createAttributeName("COEX_WEIGHT", Double.class); for (ONDEXRelation r : graph.getRelations()) { Attribute attribute = r.getAttribute(graph.getMetaData().getAttributeName("Correlation")); if (attribute == null) continue; Double score = (Double) attribute.getValue(); r.createAttribute(an, (Math.abs(score) - 0.6) / 0.4, false); } }
@Override public void init(OVTK2PropertiesAggregator v, Set<ONDEXConcept> e) { super.init(v, e); ONDEXJUNGGraph graph = this.viewer.getONDEXJUNGGraph(); anFlag = graph.getMetaData().getAttributeName(AppearanceSynchronizer.FLAGGED); if (anFlag == null) anFlag = graph.getMetaData().getFactory().createAttributeName(AppearanceSynchronizer.FLAGGED, "flagged concept", Boolean.class); }
public static void initialiseMetaData(ONDEXGraph g) { graph = g; ONDEXGraphMetaData metaData = graph.getMetaData(); dataSource = metaData.getFactory().createDataSource("BCSDB", "bacterial carbohydrate structure database"); cc = metaData.getConceptClass("Taxon"); et = metaData.getEvidenceType("IMPD"); external = metaData.getDataSource("TX"); // as used by NCBI Taxonomy parser taxidAttributeName = metaData.getAttributeName("TAXID"); }
@Override public void init(OVTK2PropertiesAggregator v, Set<ONDEXConcept> e) { super.init(v, e); ONDEXJUNGGraph graph = this.viewer.getONDEXJUNGGraph(); anFlag = graph.getMetaData().getAttributeName(AppearanceSynchronizer.FLAGGED); if (anFlag == null) anFlag = graph.getMetaData().getFactory().createAttributeName(AppearanceSynchronizer.FLAGGED, "flagged concept", Boolean.class); }