/** * 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; }
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)){
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)){
RelationType[] t = new RelationType[] { MdHelper.createRT(graph, "is_subset_of") }; Set<ONDEXConcept> propagatedTags = new HashSet<ONDEXConcept>(); for (Entry<JCheckBox, ONDEXConcept> ent : supersets.entrySet()) {