/** * Return an array of ConceptClasses that correspond to the ids in the metadata. * * @param graph - ondex graph * @param strIds - array of ids * @return */ public static ConceptClass[] convertConceptClasses(final ONDEXGraph graph, final String[] strIds) { ConceptClass[] result = new ConceptClass[strIds.length]; for (int i = 0; i < strIds.length; i++) { result[i] = createCC(graph, strIds[i]); } return result; }
/** * Return an array of relation types that correspond to the ids in the metadata. * * @param graph - ondex graph * @param strRts - array of ids * @return */ public static RelationType[] convertRelationTypes(final ONDEXGraph graph, final String[] strRts) { RelationType[] result = new RelationType[strRts.length]; for (int i = 0; i < strRts.length; i++) { result[i] = createRT(graph, strRts[i]); } return result; }
/** * Return an array of EvidenceTypes that correspond to the ids in the metadata. * * @param graph - ondex graph * @param strIds - array of ids * @return */ public static AttributeName[] convertAttributeNames(final ONDEXGraph graph, final String[] strIds, final Class cls) { final AttributeName[] result = new AttributeName[strIds.length]; for (int i = 0; i < strIds.length; i++) { result[i] = createAttName(graph, strIds[i], cls); } return result; }
AttributeName [] ans = new AttributeName[title.length]; for(int i =2; i < cls.length; i++){ ans[i] = MdHelper.createAttName(graph, title[i], cls[i]); ConceptClass cc1 = null; DataSource cv1 = null; DataSource uc = MdHelper.createDataSource(graph, "UC"); EvidenceType ev = MdHelper.createEvidence(graph, "IMPD"); cc = MdHelper.createCC(graph, txtEdgesNodeType.getText().trim()); cc = MdHelper.createCC(graph, "Thing"); cc1 = MdHelper.createCC(graph, txtEdgesNodeType1.getText().trim()); cc1 = MdHelper.createCC(graph, "Thing"); cv = MdHelper.createDataSource(graph, txtEdgesNodesCV.getText().trim()); cv = MdHelper.createDataSource(graph, "UC"); cv1 = MdHelper.createDataSource(graph, txtEdgesNodesCV1.getText().trim()); cv1 = MdHelper.createDataSource(graph, "UC"); tag = graph.getFactory().createConcept(jTextField1.getText().trim(), uc, MdHelper.createCC(graph, "Subset"), ev); tag.createConceptName(jTextField1.getText().trim(), true); rt = MdHelper.createRT(graph, txtEdgesEdgesType.getText().trim());
private static void listOfSpecies(XMLStreamWriter xmlw, ONDEXGraph graph, boolean nameAsId, boolean mnotes) throws Exception{ Set<ONDEXConcept> processed = new HashSet<ONDEXConcept>(); xmlw.writeStartElement(LISTOFSPECIES); RelationType prod_by = MdHelper.createRT(graph, "pd_by"); RelationType cons_by = MdHelper.createRT(graph, "cs_by"); RelationType cat_by = MdHelper.createRT(graph, "ca_by"); RelationType is_a = MdHelper.createRT(graph, "is_a"); RelationType en_by = MdHelper.createRT(graph, "en_by"); ConceptClass reaction = MdHelper.createCC(graph, "Reaction"); for(ONDEXConcept c : graph.getConceptsOfConceptClass(reaction)){ for(ONDEXConcept c1 : StandardFunctions.getOtherNodes(graph, c, prod_by, cons_by)){
public static final void showGOClusters(OVTK2PropertiesAggregator viewer, String ontoCls, String name, String entityCls, String clsuterAtt) { ONDEXJUNGGraph graph = viewer.getONDEXJUNGGraph(); AttributeName att = MdHelper.createAttName(graph, clsuterAtt, Integer.class); Map<Object, Set<ONDEXConcept>> clusterIndex = new HashMap<Object, Set<ONDEXConcept>>(); SetMapBuilder<Object, ONDEXConcept> sb = new SetMapBuilder<Object, ONDEXConcept>(clusterIndex); ConceptClass cls = MdHelper.createCC(graph, ontoCls); for (ONDEXConcept c : graph.getConceptsOfConceptClass(cls)) { for (ConceptName n : c.getConceptNames()) {
/** * Return an array of DataSources that correspond to the ids in the metadata. * * @param graph - ondex graph * @param strIds - array of ids * @return */ public static DataSource[] convertDataSources(final ONDEXGraph graph, final String[] strIds) { final DataSource[] result = new DataSource[strIds.length]; for (int i = 0; i < strIds.length; i++) { result[i] = createDataSource(graph, strIds[i]); } return result; }
/** * Return an array of EvidenceTypes that correspond to the ids in the metadata. * * @param graph - ondex graph * @param strIds - array of ids * @return */ public static EvidenceType[] convertEvidenceTypes(final ONDEXGraph graph, final String[] strIds) { final EvidenceType[] result = new EvidenceType[strIds.length]; for (int i = 0; i < strIds.length; i++) { result[i] = createEvidence(graph, strIds[i]); } return result; }
/** * Return an array of Concept Classes that correspond to the ids in the metadata. * * @param graph - ondex graph * @param strIds - collection of ids * @return */ public static ConceptClass[] convertConceptClasses(final ONDEXGraph graph, final Collection<String> strIds) { return convertConceptClasses(graph, strIds.toArray(new String[strIds.size()])); }
/** * Return an array of AttributeNames that correspond to the ids in the metadata. * * @param graph - ondex graph * @param strIds - collection of ids * @return */ public static AttributeName[] convertAttributeNames(final ONDEXGraph graph, final Collection<String> strIds, final Collection<Class> classes) { if (strIds.size() != classes.size()) throw new RuntimeException("convertAttributeNames - arument error. The number of classes supplied is not the same as the nubmer of ids."); return convertAttributeNames(graph, strIds.toArray(new String[strIds.size()]), classes.toArray(new Class[classes.size()])); }
AttributeName [] ans = new AttributeName[title.length]; for(int i =1; i < cls.length; i++){ ans[i] = MdHelper.createAttName(graph, title[i], cls[i]); DataSource uc = MdHelper.createDataSource(graph, "UC"); EvidenceType ev = MdHelper.createEvidence(graph, "IMPD"); if(chkNodesCreate.isSelected()){ if(!txtNodesType.getText().trim().equals("")){ cc = MdHelper.createCC(graph, txtNodesType.getText()); cc = MdHelper.createCC(graph, "Thing"); cv = MdHelper.createDataSource(graph, txtNodesCV.getText().trim()); cv = MdHelper.createDataSource(graph, "UC"); for(String s : ent.getValue()){ String name = String.valueOf(header[ent.getKey()])+"_"+s; ONDEXConcept tag1 = graph.getFactory().createConcept(name, uc, MdHelper.createCC(graph, "Subset"), ev); tag1.createConceptName(name, true); tags.put(new ArrayKey<Object>(new Object[]{ent.getKey(), s}), tag1); tag = graph.getFactory().createConcept(jTextField2.getText().trim(), uc, MdHelper.createCC(graph, "Subset"), ev); tag.createConceptName(jTextField2.getText().trim(), true);
private static void listOfReactions(XMLStreamWriter xmlw, ONDEXGraph graph, boolean nameAsId, boolean mnotes) throws Exception{ xmlw.writeStartElement(LISTOFREACTIONS); RelationType prod_by = MdHelper.createRT(graph, "pd_by"); RelationType cons_by = MdHelper.createRT(graph, "cs_by"); RelationType cat_by = MdHelper.createRT(graph, "ca_by"); RelationType en_by = MdHelper.createRT(graph, "en_by"); RelationType is_a = MdHelper.createRT(graph, "is_a"); ConceptClass reaction = MdHelper.createCC(graph, "Reaction"); for(ONDEXConcept c : graph.getConceptsOfConceptClass(reaction)){
ConceptClass cc = createCC(graph, entityCls); ONDEXConcept seed = null; ConceptClass cls = MdHelper.createCC(graph, ontoCls); for (ONDEXConcept c : graph.getConceptsOfConceptClass(cls)) { for (ConceptName n : c.getConceptNames()) {
/** * Return an array of EvidenceTypes that correspond to the ids in the metadata. * * @param graph - ondex graph * @param strIds - array of ids * @return */ public static AttributeName[] convertAttributeNames(final ONDEXGraph graph, final String[] strIds, final Class[] classes) { if (strIds.length != classes.length) throw new RuntimeException("convertAttributeNames - arument error. The number of classes supplied is not the same as the nubmer of ids."); final AttributeName[] result = new AttributeName[strIds.length]; for (int i = 0; i < strIds.length; i++) { result[i] = createAttName(graph, strIds[i], classes[i]); } return result; }
RelationType[] t = new RelationType[] { MdHelper.createRT(graph, "is_subset_of") }; Set<ONDEXConcept> propagatedTags = new HashSet<ONDEXConcept>(); for (Entry<JCheckBox, ONDEXConcept> ent : supersets.entrySet()) {
/** * 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."); }
return; AttributeName att = MdHelper.createAttName(graph, "URI", String.class); Set<ONDEXConcept> cs = viewer.getPickedNodes(); if (n != null) {
Color color = new Color(r, g, b); ONDEXConcept seed = null; ConceptClass cls = MdHelper.createCC(graph, ontoCls); for (ONDEXConcept c : graph.getConceptsOfConceptClass(cls)) { for (ConceptName n : c.getConceptNames()) {
return; AttributeName att = MdHelper.createAttName(graph, "URI", String.class); AttributeName attType = MdHelper.createAttName(graph, "TYPE_URI", String.class);