WikipediaArticleResource extends AbstractResource { public Set<Entity> getChildren(Entity entity) throws LexicalSemanticResourceException { if (!this.containsEntity(entity)) { return Collections.emptySet(); } Page p = WikipediaArticleUtils.entityToPage(wiki, entity, isCaseSensitive); return WikipediaArticleUtils.pagesToEntities( wiki, p.getOutlinks(), isCaseSensitive); } WikipediaArticleResource(String host, String database, String user, String password, Language language);  WikipediaArticleResource(DatabaseConfiguration dbConfig);  WikipediaArticleResource(Wikipedia wiki); 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(); Set<String> getRelatedLexemes(String lexeme, PoS pos, String sense, LexicalRelation lexicalRelation); int getShortestPathLength(Entity e1, Entity e2); String getGloss(Entity entity); Set<Entity> getRelatedEntities(Entity entity, SemanticRelation semanticRelation); @Override Entity getRoot(); @Override Entity getRoot(PoS pos); @Override Entity getMostFrequentEntity(String lexeme); @Override Entity getMostFrequentEntity(String lexeme, PoS pos);  }
@Test public void testGetChildren() throws LexicalSemanticResourceException { wikiResource.setIsCaseSensitive(false); Set<Entity> children = wikiResource.getChildren(new Entity( "Torsten Zesch")); Set<String> expectedChildren = new HashSet<String>(); expectedChildren .add(new Entity( "Analyzing and Accessing Wikipedia as a Lexical Semantic Resource") .getId()); expectedChildren.add(new Entity("Wikipedia API").getId()); expectedChildren.add(getSirEntity().getId()); expectedChildren.add(new Entity("Demo of Wikipedia API").getId()); assertEquals(expectedChildren.size(), children.size()); for (Entity child : children) { assertTrue(child.toString(), expectedChildren.contains(child.toString())); } assertEquals(0, wikiResource.getChildren(new Entity("Niklas Jakob")) .size()); wikiResource.setIsCaseSensitive(true); children = wikiResource.getChildren(new Entity("torsten Zesch")); assertTrue(0 == children.size()); }