@Test public void testCandidatesAreReturned() { Collection<Candidate> candidates = dbPediaOrganisationCandidateSupplier.getCandidates(mockEntityInformation); assertEquals("Should be 2 candidates", 2, candidates.size()); }
@Override public Collection<Candidate> getCandidates(EntityInformation<Organisation> entityInformation) { Collection<Organisation> organisations = entityInformation.getMentions(); Collection<Candidate> candidates = new HashSet<>(); for (Organisation organisation : organisations) { try { candidates.addAll(queryByNameContains(organisation.getValue())); } catch (ParseException e) { LOGGER.error(e.getMessage()); } } return candidates; }
DBPediaOrganisationCandidateSupplier extends DBPediaCandidateSupplier<Organisation> { @Override public Collection<Candidate> getCandidates(EntityInformation<Organisation> entityInformation) { Collection<Organisation> organisations = entityInformation.getMentions(); Collection<Candidate> candidates = new HashSet<>(); for (Organisation organisation : organisations) { try { candidates.addAll(queryByNameContains(organisation.getValue())); } catch (ParseException e) { LOGGER.error(e.getMessage()); } } return candidates; } }
DBPediaOrganisationCandidateSupplier extends DBPediaCandidateSupplier<Organisation> { @Override public Collection<Candidate> getCandidates(EntityInformation<Organisation> entityInformation) { Collection<Organisation> organisations = entityInformation.getMentions(); Collection<Candidate> candidates = new HashSet<>(); for (Organisation organisation : organisations) { try { candidates.addAll(queryByNameContains(organisation.getValue())); } catch (ParseException e) { LOGGER.error(e.getMessage()); } } return candidates; } DBPediaOrganisationCandidateSupplier(DBPediaService dbPediaService, int resultsLimit);  DBPediaOrganisationCandidateSupplier(); }
DBPediaOrganisationCandidateSupplier extends DBPediaCandidateSupplier<Organisation> { @Override public Collection<Candidate> getCandidates(EntityInformation<Organisation> entityInformation) { Collection<Organisation> organisations = entityInformation.getMentions(); Collection<Candidate> candidates = new HashSet<>(); for (Organisation organisation : organisations) { try { candidates.addAll(queryByNameContains(organisation.getValue())); } catch (ParseException e) { LOGGER.error(e.getMessage()); } } return candidates; } DBPediaOrganisationCandidateSupplier(DBPediaService dbPediaService, int resultsLimit);  DBPediaOrganisationCandidateSupplier(); @Override Collection<Candidate> getCandidates(EntityInformation<Organisation> entityInformation); }
DBPediaOrganisationCandidateSupplier extends DBPediaCandidateSupplier<Organisation> { @Override public Collection<Candidate> getCandidates(EntityInformation<Organisation> entityInformation) { Collection<Organisation> organisations = entityInformation.getMentions(); Collection<Candidate> candidates = new HashSet<>(); for (Organisation organisation : organisations) { try { candidates.addAll(queryByNameContains(organisation.getValue())); } catch (ParseException e) { LOGGER.error(e.getMessage()); } } return candidates; } DBPediaOrganisationCandidateSupplier(DBPediaService dbPediaService, int resultsLimit);  DBPediaOrganisationCandidateSupplier(); @Override Collection<Candidate> getCandidates(EntityInformation<Organisation> entityInformation); static final String ORGANISATION_ID_FIELD; static final String NAME_FIELD; }