WikipediaCategoryResource extends AbstractResource { public Iterable<Entity> getEntities() throws LexicalSemanticResourceException { return new WikipediaCategoryEntityIterable(wiki); } WikipediaCategoryResource(DatabaseConfiguration dbConfig);  WikipediaCategoryResource(Wikipedia wiki);  WikipediaCategoryResource(String host, String database, String user, String password, Language language); boolean containsEntity(Entity entity); boolean containsLexeme(String lexeme); Set<Entity> getEntity(String lexeme); Set<Entity> getEntity(String lexeme, PoS pos); Set<Entity> getEntity(String lexeme, PoS pos, String sense); Set<Entity> getParents(Entity entity); int getNumberOfEntities(); Iterable<Entity> getEntities(); Set<Entity> getChildren(Entity entity); String getResourceName(); String getResourceVersion(); int getShortestPathLength(Entity firstEntity, Entity secondEntity); @Override Entity getRoot(); @Override Entity getRoot(PoS pos); String getGloss(Entity entity); Set<String> getRelatedLexemes(String lexeme, PoS pos, String sense, LexicalRelation lexicalRelation); Set<Entity> getRelatedEntities(Entity entity, SemanticRelation semanticRelation); @Override Entity getMostFrequentEntity(String lexeme); @Override Entity getMostFrequentEntity(String lexeme, PoS pos);  }
@Test public void testGetEntities() throws Exception { wikiResource.setIsCaseSensitive(false); int i = 0; int j = 0; for (Entity entity : wikiResource.getEntities()) { Set<String> testLexemes = entity.getLexemes(); for (String t : testLexemes) { System.out.println(t + " " + entity.getSense(t)); System.out.println(entity.getPos()); } assertTrue(entity.toString(), wikiResource.containsEntity(entity)); i++; } wikiResource.setIsCaseSensitive(true); for (Entity entity : wikiResource.getEntities()) { Set<String> testLexemes = entity.getLexemes(); for (String t : testLexemes) { System.out.println(t + " " + entity.getSense(t)); System.out.println(entity.getPos()); } assertTrue(entity.toString(), wikiResource.containsEntity(entity)); j++; } assertEquals(i, j); }