@Test public void parseInteractions() throws IOException, StudyImporterException { InputStream first2 = getClass().getResourceAsStream("/org/eol/globi/data/dbatvir/dbatvir-first2.json"); List<Map<String, String>> links = new ArrayList<>(); InteractionListener interactionListener = links::add; DatasetImporterForDBatVir.parseInteractions(first2, interactionListener); assertThat(links.size(), Is.is(2)); assertThat(links.get(0).get(SOURCE_TAXON_NAME), Is.is("Hipposideros caffer")); assertThat(links.get(0).get(SOURCE_TAXON_ID), Is.is("NCBI:302402")); assertThat(links.get(0).get(SOURCE_TAXON_PATH), Is.is("Rhinolophidae | Hipposideros caffer")); assertThat(links.get(0).get(SOURCE_TAXON_PATH_IDS), Is.is(" | NCBI:302402")); assertThat(links.get(0).get(SOURCE_TAXON_PATH_NAMES), Is.is("family | species")); assertThat(links.get(0).get(INTERACTION_TYPE_ID), Is.is("http: assertThat(links.get(0).get(INTERACTION_TYPE_NAME), Is.is("hostOf")); assertThat(links.get(0).get(TARGET_TAXON_NAME), Is.is("BatCoV5743/KEN/Kwale")); assertThat(links.get(0).get(TARGET_TAXON_ID), Is.is("NCBI:1739614")); assertThat(links.get(0).get(TARGET_TAXON_PATH), Is.is("Coronaviridae | 229E-related bat coronavirus | BatCoV5743/KEN/Kwale")); assertThat(links.get(0).get(TARGET_TAXON_PATH_IDS), Is.is(" | NCBI:1739614 | ")); assertThat(links.get(0).get(TARGET_TAXON_PATH_NAMES), Is.is("family | species | strain")); assertThat(links.get(0).get(DatasetImporterForMetaTable.EVENT_DATE), Is.is("2016-03")); assertThat(links.get(0).get(LOCALITY_NAME), Is.is("Kenya")); assertThat(links.get(0).get(REFERENCE_ID), Is.is("http: assertThat(links.get(0).get(REFERENCE_URL), Is.is("http: assertThat(links.get(0).get(REFERENCE_CITATION), Is.is("Waruhiu C, Ommeh S, Obanda V, Agwanda B, Gakuya F, Ge XY, Yang XL, Wu LJ, Zohaib A, Hu B, Shi ZL, Molecular detection of viruses in Kenyan bats and discovery of novel astroviruses, caliciviruses and rotaviruses. Virol Sin 2017, 32(2):101-114.")); }
public static void parseInteractions(InputStream pageStream, InteractionListener interactionListener) throws IOException, StudyImporterException { ObjectMapper objectMapper = getLenientObjectMapper(); JsonNode jsonNode = objectMapper.readTree(new InputStreamReader(pageStream, StandardCharsets.ISO_8859_1)); if (jsonNode.has("data")) { JsonNode data = jsonNode.get("data"); Map<String, String> link = new TreeMap<>(); for (JsonNode interactionNode : data) { String strainName = textValueOrEmpty(interactionNode, "StrainName"); String virusName = textValueOrEmpty(interactionNode, "Virus"); if (StringUtils.isNotBlank(strainName)) { link.put(TARGET_TAXON_NAME, strainName); link.put(TARGET_TAXON_RANK, strainName); } else if (StringUtils.isNotBlank(virusName)) { if (StringUtils.isNotBlank(virusName)) { link.put(TARGET_TAXON_NAME, virusName); link.put(TARGET_TAXON_RANK, virusName); } } String targetTaxonId = getTaxonId(interactionNode, "v_tax"); if (StringUtils.isNotBlank(targetTaxonId)) { link.put(TARGET_TAXON_ID, targetTaxonId); } String targetTaxonPath = Stream.of( textValueOrEmpty(interactionNode, "v_family"), virusName, strainName) .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(TARGET_TAXON_PATH, targetTaxonPath); String targetTaxonPathNames = Stream.of( "family", "species", "strain") .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(TARGET_TAXON_PATH_NAMES, targetTaxonPathNames); String targetTaxonPathIds = Stream.of( "", targetTaxonId, "") .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(TARGET_TAXON_PATH_IDS, targetTaxonPathIds); setPropertyIfNotBlank(link, interactionNode, SOURCE_TAXON_NAME, "Bat"); String sourceTaxonId = getTaxonId(interactionNode, "b_tax"); if (StringUtils.isNotBlank(sourceTaxonId)) { link.put(SOURCE_TAXON_ID, sourceTaxonId); } String sourceTaxonPath = Stream.of( textValueOrEmpty(interactionNode, "b_family"), textValueOrEmpty(interactionNode, "Bat")) .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(SOURCE_TAXON_PATH, sourceTaxonPath); String sourceTaxonPathNames = Stream.of( "family", "species") .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(SOURCE_TAXON_PATH_NAMES, sourceTaxonPathNames); String sourceTaxonPathIds = Stream.of( "", sourceTaxonId) .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(SOURCE_TAXON_PATH_IDS, sourceTaxonPathIds); String value = JSONUtil.textValueOrNull(interactionNode, "CollectionDate"); if (StringUtils.isNotBlank(value)) { String replace = StringUtils.replace(value, "~", "/"); link.put(DatasetImporterForMetaTable.EVENT_DATE, replace); } String localityName = Stream.of(JSONUtil.textValueOrNull(interactionNode, "Country"), JSONUtil.textValueOrNull(interactionNode, "Location")) .filter(StringUtils::isNotBlank) .collect(Collectors.joining(" ")); if (StringUtils.isNotBlank(localityName)) { link.put(LOCALITY_NAME, localityName); } String refs = JSONUtil.textValueOrNull(interactionNode, "Refs"); if (StringUtils.isNotBlank(refs)) { link.put(REFERENCE_CITATION, scrubReferenceCitation(refs)); } String pubMedString = JSONUtil.textValueOrNull(interactionNode, "PubMed"); if (StringUtils.isNotBlank(pubMedString)) { String referenceId = extractFirstPubMedReferenceId(pubMedString); if (StringUtils.isNotBlank(referenceId)) { link.put(REFERENCE_ID, referenceId); link.put(REFERENCE_URL, referenceId); } } link.put(INTERACTION_TYPE_ID, InteractType.HOST_OF.getIRI()); link.put(INTERACTION_TYPE_NAME, InteractType.HOST_OF.getLabel()); interactionListener.newLink(link); } } }
DatasetImporterForDBatVir extends DatasetImporterWithListener { public static void parseInteractions(InputStream pageStream, InteractionListener interactionListener) throws IOException, StudyImporterException { ObjectMapper objectMapper = getLenientObjectMapper(); JsonNode jsonNode = objectMapper.readTree(new InputStreamReader(pageStream, StandardCharsets.ISO_8859_1)); if (jsonNode.has("data")) { JsonNode data = jsonNode.get("data"); Map<String, String> link = new TreeMap<>(); for (JsonNode interactionNode : data) { String strainName = textValueOrEmpty(interactionNode, "StrainName"); String virusName = textValueOrEmpty(interactionNode, "Virus"); if (StringUtils.isNotBlank(strainName)) { link.put(TARGET_TAXON_NAME, strainName); link.put(TARGET_TAXON_RANK, strainName); } else if (StringUtils.isNotBlank(virusName)) { if (StringUtils.isNotBlank(virusName)) { link.put(TARGET_TAXON_NAME, virusName); link.put(TARGET_TAXON_RANK, virusName); } } String targetTaxonId = getTaxonId(interactionNode, "v_tax"); if (StringUtils.isNotBlank(targetTaxonId)) { link.put(TARGET_TAXON_ID, targetTaxonId); } String targetTaxonPath = Stream.of( textValueOrEmpty(interactionNode, "v_family"), virusName, strainName) .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(TARGET_TAXON_PATH, targetTaxonPath); String targetTaxonPathNames = Stream.of( "family", "species", "strain") .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(TARGET_TAXON_PATH_NAMES, targetTaxonPathNames); String targetTaxonPathIds = Stream.of( "", targetTaxonId, "") .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(TARGET_TAXON_PATH_IDS, targetTaxonPathIds); setPropertyIfNotBlank(link, interactionNode, SOURCE_TAXON_NAME, "Bat"); String sourceTaxonId = getTaxonId(interactionNode, "b_tax"); if (StringUtils.isNotBlank(sourceTaxonId)) { link.put(SOURCE_TAXON_ID, sourceTaxonId); } String sourceTaxonPath = Stream.of( textValueOrEmpty(interactionNode, "b_family"), textValueOrEmpty(interactionNode, "Bat")) .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(SOURCE_TAXON_PATH, sourceTaxonPath); String sourceTaxonPathNames = Stream.of( "family", "species") .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(SOURCE_TAXON_PATH_NAMES, sourceTaxonPathNames); String sourceTaxonPathIds = Stream.of( "", sourceTaxonId) .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(SOURCE_TAXON_PATH_IDS, sourceTaxonPathIds); String value = JSONUtil.textValueOrNull(interactionNode, "CollectionDate"); if (StringUtils.isNotBlank(value)) { String replace = StringUtils.replace(value, "~", "/"); link.put(DatasetImporterForMetaTable.EVENT_DATE, replace); } String localityName = Stream.of(JSONUtil.textValueOrNull(interactionNode, "Country"), JSONUtil.textValueOrNull(interactionNode, "Location")) .filter(StringUtils::isNotBlank) .collect(Collectors.joining(" ")); if (StringUtils.isNotBlank(localityName)) { link.put(LOCALITY_NAME, localityName); } String refs = JSONUtil.textValueOrNull(interactionNode, "Refs"); if (StringUtils.isNotBlank(refs)) { link.put(REFERENCE_CITATION, scrubReferenceCitation(refs)); } String pubMedString = JSONUtil.textValueOrNull(interactionNode, "PubMed"); if (StringUtils.isNotBlank(pubMedString)) { String referenceId = extractFirstPubMedReferenceId(pubMedString); if (StringUtils.isNotBlank(referenceId)) { link.put(REFERENCE_ID, referenceId); link.put(REFERENCE_URL, referenceId); } } link.put(INTERACTION_TYPE_ID, InteractType.HOST_OF.getIRI()); link.put(INTERACTION_TYPE_NAME, InteractType.HOST_OF.getLabel()); interactionListener.newLink(link); } } } }
DatasetImporterForDBatVir extends DatasetImporterWithListener { public static void parseInteractions(InputStream pageStream, InteractionListener interactionListener) throws IOException, StudyImporterException { ObjectMapper objectMapper = getLenientObjectMapper(); JsonNode jsonNode = objectMapper.readTree(new InputStreamReader(pageStream, StandardCharsets.ISO_8859_1)); if (jsonNode.has("data")) { JsonNode data = jsonNode.get("data"); Map<String, String> link = new TreeMap<>(); for (JsonNode interactionNode : data) { String strainName = textValueOrEmpty(interactionNode, "StrainName"); String virusName = textValueOrEmpty(interactionNode, "Virus"); if (StringUtils.isNotBlank(strainName)) { link.put(TARGET_TAXON_NAME, strainName); link.put(TARGET_TAXON_RANK, strainName); } else if (StringUtils.isNotBlank(virusName)) { if (StringUtils.isNotBlank(virusName)) { link.put(TARGET_TAXON_NAME, virusName); link.put(TARGET_TAXON_RANK, virusName); } } String targetTaxonId = getTaxonId(interactionNode, "v_tax"); if (StringUtils.isNotBlank(targetTaxonId)) { link.put(TARGET_TAXON_ID, targetTaxonId); } String targetTaxonPath = Stream.of( textValueOrEmpty(interactionNode, "v_family"), virusName, strainName) .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(TARGET_TAXON_PATH, targetTaxonPath); String targetTaxonPathNames = Stream.of( "family", "species", "strain") .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(TARGET_TAXON_PATH_NAMES, targetTaxonPathNames); String targetTaxonPathIds = Stream.of( "", targetTaxonId, "") .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(TARGET_TAXON_PATH_IDS, targetTaxonPathIds); setPropertyIfNotBlank(link, interactionNode, SOURCE_TAXON_NAME, "Bat"); String sourceTaxonId = getTaxonId(interactionNode, "b_tax"); if (StringUtils.isNotBlank(sourceTaxonId)) { link.put(SOURCE_TAXON_ID, sourceTaxonId); } String sourceTaxonPath = Stream.of( textValueOrEmpty(interactionNode, "b_family"), textValueOrEmpty(interactionNode, "Bat")) .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(SOURCE_TAXON_PATH, sourceTaxonPath); String sourceTaxonPathNames = Stream.of( "family", "species") .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(SOURCE_TAXON_PATH_NAMES, sourceTaxonPathNames); String sourceTaxonPathIds = Stream.of( "", sourceTaxonId) .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(SOURCE_TAXON_PATH_IDS, sourceTaxonPathIds); String value = JSONUtil.textValueOrNull(interactionNode, "CollectionDate"); if (StringUtils.isNotBlank(value)) { String replace = StringUtils.replace(value, "~", "/"); link.put(DatasetImporterForMetaTable.EVENT_DATE, replace); } String localityName = Stream.of(JSONUtil.textValueOrNull(interactionNode, "Country"), JSONUtil.textValueOrNull(interactionNode, "Location")) .filter(StringUtils::isNotBlank) .collect(Collectors.joining(" ")); if (StringUtils.isNotBlank(localityName)) { link.put(LOCALITY_NAME, localityName); } String refs = JSONUtil.textValueOrNull(interactionNode, "Refs"); if (StringUtils.isNotBlank(refs)) { link.put(REFERENCE_CITATION, scrubReferenceCitation(refs)); } String pubMedString = JSONUtil.textValueOrNull(interactionNode, "PubMed"); if (StringUtils.isNotBlank(pubMedString)) { String referenceId = extractFirstPubMedReferenceId(pubMedString); if (StringUtils.isNotBlank(referenceId)) { link.put(REFERENCE_ID, referenceId); link.put(REFERENCE_URL, referenceId); } } link.put(INTERACTION_TYPE_ID, InteractType.HOST_OF.getIRI()); link.put(INTERACTION_TYPE_NAME, InteractType.HOST_OF.getLabel()); interactionListener.newLink(link); } } } DatasetImporterForDBatVir(ParserFactory parserFactory, NodeFactory nodeFactory); }
DatasetImporterForDBatVir extends DatasetImporterWithListener { public static void parseInteractions(InputStream pageStream, InteractionListener interactionListener) throws IOException, StudyImporterException { ObjectMapper objectMapper = getLenientObjectMapper(); JsonNode jsonNode = objectMapper.readTree(new InputStreamReader(pageStream, StandardCharsets.ISO_8859_1)); if (jsonNode.has("data")) { JsonNode data = jsonNode.get("data"); Map<String, String> link = new TreeMap<>(); for (JsonNode interactionNode : data) { String strainName = textValueOrEmpty(interactionNode, "StrainName"); String virusName = textValueOrEmpty(interactionNode, "Virus"); if (StringUtils.isNotBlank(strainName)) { link.put(TARGET_TAXON_NAME, strainName); link.put(TARGET_TAXON_RANK, strainName); } else if (StringUtils.isNotBlank(virusName)) { if (StringUtils.isNotBlank(virusName)) { link.put(TARGET_TAXON_NAME, virusName); link.put(TARGET_TAXON_RANK, virusName); } } String targetTaxonId = getTaxonId(interactionNode, "v_tax"); if (StringUtils.isNotBlank(targetTaxonId)) { link.put(TARGET_TAXON_ID, targetTaxonId); } String targetTaxonPath = Stream.of( textValueOrEmpty(interactionNode, "v_family"), virusName, strainName) .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(TARGET_TAXON_PATH, targetTaxonPath); String targetTaxonPathNames = Stream.of( "family", "species", "strain") .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(TARGET_TAXON_PATH_NAMES, targetTaxonPathNames); String targetTaxonPathIds = Stream.of( "", targetTaxonId, "") .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(TARGET_TAXON_PATH_IDS, targetTaxonPathIds); setPropertyIfNotBlank(link, interactionNode, SOURCE_TAXON_NAME, "Bat"); String sourceTaxonId = getTaxonId(interactionNode, "b_tax"); if (StringUtils.isNotBlank(sourceTaxonId)) { link.put(SOURCE_TAXON_ID, sourceTaxonId); } String sourceTaxonPath = Stream.of( textValueOrEmpty(interactionNode, "b_family"), textValueOrEmpty(interactionNode, "Bat")) .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(SOURCE_TAXON_PATH, sourceTaxonPath); String sourceTaxonPathNames = Stream.of( "family", "species") .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(SOURCE_TAXON_PATH_NAMES, sourceTaxonPathNames); String sourceTaxonPathIds = Stream.of( "", sourceTaxonId) .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(SOURCE_TAXON_PATH_IDS, sourceTaxonPathIds); String value = JSONUtil.textValueOrNull(interactionNode, "CollectionDate"); if (StringUtils.isNotBlank(value)) { String replace = StringUtils.replace(value, "~", "/"); link.put(DatasetImporterForMetaTable.EVENT_DATE, replace); } String localityName = Stream.of(JSONUtil.textValueOrNull(interactionNode, "Country"), JSONUtil.textValueOrNull(interactionNode, "Location")) .filter(StringUtils::isNotBlank) .collect(Collectors.joining(" ")); if (StringUtils.isNotBlank(localityName)) { link.put(LOCALITY_NAME, localityName); } String refs = JSONUtil.textValueOrNull(interactionNode, "Refs"); if (StringUtils.isNotBlank(refs)) { link.put(REFERENCE_CITATION, scrubReferenceCitation(refs)); } String pubMedString = JSONUtil.textValueOrNull(interactionNode, "PubMed"); if (StringUtils.isNotBlank(pubMedString)) { String referenceId = extractFirstPubMedReferenceId(pubMedString); if (StringUtils.isNotBlank(referenceId)) { link.put(REFERENCE_ID, referenceId); link.put(REFERENCE_URL, referenceId); } } link.put(INTERACTION_TYPE_ID, InteractType.HOST_OF.getIRI()); link.put(INTERACTION_TYPE_NAME, InteractType.HOST_OF.getLabel()); interactionListener.newLink(link); } } } DatasetImporterForDBatVir(ParserFactory parserFactory, NodeFactory nodeFactory); static String scrubReferenceCitation(String refs); @Override void importStudy(); int getTotalCount(); static void parseInteractions(InputStream pageStream, InteractionListener interactionListener); static ObjectMapper getLenientObjectMapper(); }
DatasetImporterForDBatVir extends DatasetImporterWithListener { public static void parseInteractions(InputStream pageStream, InteractionListener interactionListener) throws IOException, StudyImporterException { ObjectMapper objectMapper = getLenientObjectMapper(); JsonNode jsonNode = objectMapper.readTree(new InputStreamReader(pageStream, StandardCharsets.ISO_8859_1)); if (jsonNode.has("data")) { JsonNode data = jsonNode.get("data"); Map<String, String> link = new TreeMap<>(); for (JsonNode interactionNode : data) { String strainName = textValueOrEmpty(interactionNode, "StrainName"); String virusName = textValueOrEmpty(interactionNode, "Virus"); if (StringUtils.isNotBlank(strainName)) { link.put(TARGET_TAXON_NAME, strainName); link.put(TARGET_TAXON_RANK, strainName); } else if (StringUtils.isNotBlank(virusName)) { if (StringUtils.isNotBlank(virusName)) { link.put(TARGET_TAXON_NAME, virusName); link.put(TARGET_TAXON_RANK, virusName); } } String targetTaxonId = getTaxonId(interactionNode, "v_tax"); if (StringUtils.isNotBlank(targetTaxonId)) { link.put(TARGET_TAXON_ID, targetTaxonId); } String targetTaxonPath = Stream.of( textValueOrEmpty(interactionNode, "v_family"), virusName, strainName) .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(TARGET_TAXON_PATH, targetTaxonPath); String targetTaxonPathNames = Stream.of( "family", "species", "strain") .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(TARGET_TAXON_PATH_NAMES, targetTaxonPathNames); String targetTaxonPathIds = Stream.of( "", targetTaxonId, "") .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(TARGET_TAXON_PATH_IDS, targetTaxonPathIds); setPropertyIfNotBlank(link, interactionNode, SOURCE_TAXON_NAME, "Bat"); String sourceTaxonId = getTaxonId(interactionNode, "b_tax"); if (StringUtils.isNotBlank(sourceTaxonId)) { link.put(SOURCE_TAXON_ID, sourceTaxonId); } String sourceTaxonPath = Stream.of( textValueOrEmpty(interactionNode, "b_family"), textValueOrEmpty(interactionNode, "Bat")) .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(SOURCE_TAXON_PATH, sourceTaxonPath); String sourceTaxonPathNames = Stream.of( "family", "species") .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(SOURCE_TAXON_PATH_NAMES, sourceTaxonPathNames); String sourceTaxonPathIds = Stream.of( "", sourceTaxonId) .map(StringUtils::trim) .collect(Collectors.joining(CharsetConstant.SEPARATOR)); link.put(SOURCE_TAXON_PATH_IDS, sourceTaxonPathIds); String value = JSONUtil.textValueOrNull(interactionNode, "CollectionDate"); if (StringUtils.isNotBlank(value)) { String replace = StringUtils.replace(value, "~", "/"); link.put(DatasetImporterForMetaTable.EVENT_DATE, replace); } String localityName = Stream.of(JSONUtil.textValueOrNull(interactionNode, "Country"), JSONUtil.textValueOrNull(interactionNode, "Location")) .filter(StringUtils::isNotBlank) .collect(Collectors.joining(" ")); if (StringUtils.isNotBlank(localityName)) { link.put(LOCALITY_NAME, localityName); } String refs = JSONUtil.textValueOrNull(interactionNode, "Refs"); if (StringUtils.isNotBlank(refs)) { link.put(REFERENCE_CITATION, scrubReferenceCitation(refs)); } String pubMedString = JSONUtil.textValueOrNull(interactionNode, "PubMed"); if (StringUtils.isNotBlank(pubMedString)) { String referenceId = extractFirstPubMedReferenceId(pubMedString); if (StringUtils.isNotBlank(referenceId)) { link.put(REFERENCE_ID, referenceId); link.put(REFERENCE_URL, referenceId); } } link.put(INTERACTION_TYPE_ID, InteractType.HOST_OF.getIRI()); link.put(INTERACTION_TYPE_NAME, InteractType.HOST_OF.getLabel()); interactionListener.newLink(link); } } } DatasetImporterForDBatVir(ParserFactory parserFactory, NodeFactory nodeFactory); static String scrubReferenceCitation(String refs); @Override void importStudy(); int getTotalCount(); static void parseInteractions(InputStream pageStream, InteractionListener interactionListener); static ObjectMapper getLenientObjectMapper();  }