@Override protected void processInput(String keggGeneId, String keggGeneRecord, Resource output) { Map<String, String> recordSections = KeggUtils.getSectionsFromKeggRecord(keggGeneRecord); StrTokenizer tokenizer = new StrTokenizer(); if (recordSections.containsKey(PATHWAY_RECORD_SECTION)) { for (String line : recordSections.get(PATHWAY_RECORD_SECTION).split("\\r?\\n")) { String keggPathwayId = tokenizer.reset(line).nextToken(); Resource keggPathwayNode = LSRNUtils.createInstance( output.getModel(), LSRNUtils.getClass(LSRN.Namespace.KEGG_PATHWAY), keggPathwayId); output.addProperty(SIO.is_participant_in, keggPathwayNode); } } }
@Override protected Resource getInputLSRNIdentifierType() { return LSRNUtils.getIdentifierClass(LSRN.Namespace.KEGG_GENE); }