/** * @see net.sourceforge.ondex.filter.ONDEXFilter#getVisibleConcepts() */ @Override public Set<ONDEXConcept> getVisibleConcepts() { return graph.getConcepts(); }
/** * @return * @see net.sourceforge.ondex.core.ONDEXGraph#getConcepts() */ public Set<ONDEXConcept> getConcepts() { return og.getConcepts(); }
/** * @see net.sourceforge.ondex.filter.ONDEXFilter#getVisibleConcepts() */ public Set<ONDEXConcept> getVisibleConcepts() { return graph.getConcepts(); }
@Override protected Set<ONDEXConcept> retrieveConceptAll() { return parent.getConcepts(); }
@Override public Set<ONDEXConcept> getVisibleConcepts() { return graph.getConcepts(); }
@Override public void start() throws Exception { int number_Of_Nodes = graph.getConcepts().size(); } }
/** * Triggers update of concept drop-down boxes. * * @param graph * current ONDEXGraph */ public static void updateConceptLists() { fromComboBox = new JComboBox(graph.getConcepts().toArray(new ONDEXConcept[0])); toComboBox = new JComboBox(graph.getConcepts().toArray(new ONDEXConcept[0])); qualComboBox = new JComboBox(graph.getConcepts().toArray(new ONDEXConcept[0])); }
/** * the constructor. */ public DataExtractor(ONDEXGraph aog) { this.aog = aog; clearAllFilters(); max_progress = aog.getConcepts().size() + aog.getRelations().size(); }
/** * @see net.sourceforge.ondex.filter.ONDEXFilter#copyResultsToNewGraph(net.sourceforge.ondex.core.base.AbstractONDEXGraph) */ public void copyResultsToNewGraph(ONDEXGraph exportGraph) { ONDEXGraphCloner graphCloner = new ONDEXGraphCloner(graph, exportGraph); for (ONDEXConcept c : graph.getConcepts()) { graphCloner.cloneConcept(c); } Iterator<Integer> it = relationBitSet.iterator(); while (it.hasNext()) { graphCloner.cloneRelation(it.next()); } }
/** * Filters the graph and constructs the lists for visible concepts and * relations. */ public void start() throws InvalidPluginArgumentException { filterOnGraph(graph.getConcepts(), graph.getRelations()); }
/** * @return Object2DoubleOpenHashMap<ONDEXConcept> * @throws AccessDeniedException * @throws NullValueException * @author taubertj Calculates betweenness centrality on the ONDEX graph. * Result returned as a map of concept to its betweennes centrality * value. */ public static final Map<ONDEXConcept, Double> getBetweenessCentrality(ONDEXGraph aog) throws NullValueException, AccessDeniedException { return getBetweenessCentrality(aog.getConcepts(), aog.getRelations(), aog); }
/** * Calculates degree centrality on the ONDEX graph. Result returned as a map * of concept to its degree centrality value. * * @return Object2DoubleOpenHashMap<ONDEXConcept> * @throws AccessDeniedException * @throws NullValueException */ public static final Map<ONDEXConcept, Double> getDegreeCentrality(ONDEXGraph aog) throws NullValueException, AccessDeniedException { return getDegreeCentrality(aog.getConcepts(), aog.getRelations(), aog); }
/** * NB if you make a clone request here and metadata has not been cloned, * then this will be done */ public void cloneAllConcepts() { if (!metaDataHasBeenCloned) { cloneMetaData(); } if (conceptsHaveBeenCloned) { System.err .println("Concepts have already been cloned: Ignoring request"); return; } conceptsHaveBeenCloned = true; for (ONDEXConcept c : origGraph.getConcepts()) { cloneConcept(c); } }
public static void setAllToGrey(OVTK2PropertiesAggregator viewer) { ONDEXGraph graph = viewer.getONDEXJUNGGraph(); for (ONDEXConcept c : graph.getConcepts()) { Annotation.setColor(viewer, c, Color.darkGray); } for (ONDEXRelation r : graph.getRelations()) { Annotation.setColor(viewer, r, Color.darkGray); } }
/** * searches for paths. */ public void search() { for (ONDEXConcept c : og.getConcepts()) { if (!instanceOf(ccs[0], c)) { continue; } PathNode pn = new PathNode(c.getId()); searchRelations(c, pn, 1, false); } }
@Override public void copyResultsToNewGraph(ONDEXGraph exportGraph) { ONDEXGraphCloner graphCloner = new ONDEXGraphCloner(graph, exportGraph); for (ONDEXConcept c : graph.getConcepts()) { graphCloner.cloneConcept(c); } for (ONDEXRelation r : graph.getRelations()) { graphCloner.cloneRelation(r); } }
public static void createContext(OVTK2PropertiesAggregator viewer, String name) { ONDEXGraph graph = viewer.getONDEXJUNGGraph(); ONDEXConcept context = graph.getFactory().createConcept(name, createDataSource(graph, "unknown"), createCC(graph, "Thing"), createEvidence(graph, "manual")); context.createConceptName(name, true); for (ONDEXConcept c : graph.getConcepts()) { c.addTag(context); } }
/** * Builds a complete ONDEX XML exchange format document. * * @param xmlw * streamwriter to write the document in * @param graph * a ONDEXGraph which contains the data * @throws XMLStreamException * if xml writing fails * @throws javax.xml.bind.JAXBException * if writing Attribute values fails */ public void buildDocument(XMLStreamWriter2 xmlw, ONDEXGraph graph) throws XMLStreamException, JAXBException { this.graph = graph; xmlw.writeStartDocument(CharsetNames.CS_UTF8, "1.0"); buildOndexDataTag(xmlw, filterConcepts(graph.getConcepts()), filterRelations(graph.getRelations())); xmlw.writeEndDocument(); }
@Override public void start() throws Exception { String conceptClass = (String) args.getUniqueValue(CC); String name = (String) args.getUniqueValue(NAME); Set<ONDEXConcept> cs = graph.getConcepts(); Set<ONDEXRelation> rs = graph.getRelations(); ONDEXConcept c = graph.getFactory().createConcept(name, createDataSource(graph, "UC"), createCC(graph, conceptClass), createEvidence(graph, "M")); c.createConceptName(name, true); for (ONDEXConcept co : cs) { co.addTag(c); } for (ONDEXRelation re : rs) { re.addTag(c); } }
public Model createModel(ONDEXGraph og) { Model instanceModel = ModelFactory.createDefaultModel(); for (ONDEXConcept concept : og.getConcepts()) { Resource classOfConcept = instanceModel.createResource(urlPrefixMetaData + concept.getOfType().getId()); instanceModel.createResource(urlPrefixInstances + concept.getId(), classOfConcept); } for (ONDEXRelation or : og.getRelations()) { Property propertyOfPredicate = instanceModel.createProperty(urlPrefixMetaData, or.getOfType().getId()); Resource fromConcept = instanceModel.getResource(urlPrefixInstances + or.getFromConcept().getId()); Resource toConcept = instanceModel.getResource(urlPrefixInstances + or.getToConcept().getId()); instanceModel.createStatement(toConcept, propertyOfPredicate, fromConcept); } return instanceModel; }