@Test public void testGetInstances() throws Exception { Set<String> expected = Sets.newHashSet("inst1678316326", "inst916200307", "inst223516483"); Set<Instance> instances = kb.getInstances(kb.getConcept("con985632540")); assertEquals(expected.size(), instances.size()); for(Instance instance : instances){ assertTrue(expected.contains(instance.getID())); } }
public Set<Instance> getInstances(Concept concept) { return ImmutableSet.copyOf(concept.getInstances()); }
WSCXMLKnowledgeBase implements HierarchicalKnowledgeBase, Serializable { public Set<Instance> getInstances(Concept concept) { return ImmutableSet.copyOf(concept.getInstances()); } }
WSCXMLKnowledgeBase implements HierarchicalKnowledgeBase, Serializable { public Set<Instance> getInstances(Concept concept) { return ImmutableSet.copyOf(concept.getInstances()); } WSCXMLKnowledgeBase(InputStream xmlTaxonomyStream);  WSCXMLKnowledgeBase(String xmlTaxonomy);  WSCXMLKnowledgeBase(File xmlTaxonomyFile);  WSCXMLKnowledgeBase(); }
WSCXMLKnowledgeBase implements HierarchicalKnowledgeBase, Serializable { public Set<Instance> getInstances(Concept concept) { return ImmutableSet.copyOf(concept.getInstances()); } WSCXMLKnowledgeBase(InputStream xmlTaxonomyStream);  WSCXMLKnowledgeBase(String xmlTaxonomy);  WSCXMLKnowledgeBase(File xmlTaxonomyFile);  WSCXMLKnowledgeBase(); @Override Concept getConcept(String id); @Override Instance getInstance(String id); @Override Set<Concept> getSubclasses(Concept concept); @Override Set<Concept> getSuperclasses(Concept concept); boolean equivalent(Concept x, Concept y); boolean isSubclass(Concept x, Concept y); boolean isSuperclass(Concept x, Concept y); @Override Concept resolveInstance(Instance instance); Set<Instance> getInstances(Concept concept); Set<Concept> getConcepts(); Set<Instance> getInstances(); }
WSCXMLKnowledgeBase implements HierarchicalKnowledgeBase, Serializable { public Set<Instance> getInstances(Concept concept) { return ImmutableSet.copyOf(concept.getInstances()); } WSCXMLKnowledgeBase(InputStream xmlTaxonomyStream);  WSCXMLKnowledgeBase(String xmlTaxonomy);  WSCXMLKnowledgeBase(File xmlTaxonomyFile);  WSCXMLKnowledgeBase(); @Override Concept getConcept(String id); @Override Instance getInstance(String id); @Override Set<Concept> getSubclasses(Concept concept); @Override Set<Concept> getSuperclasses(Concept concept); boolean equivalent(Concept x, Concept y); boolean isSubclass(Concept x, Concept y); boolean isSuperclass(Concept x, Concept y); @Override Concept resolveInstance(Instance instance); Set<Instance> getInstances(Concept concept); Set<Concept> getConcepts(); Set<Instance> getInstances();  }