@Test public void testGetSuperclasses() throws Exception { Set<String> expected = Sets.newHashSet("con464583682", "con1226699739", "con1988815758"); Set<Concept> superclasses = kb.getSuperclasses(kb.getConcept("con2025477491")); assertEquals(expected.size(), superclasses.size()); for(Concept subclass : superclasses){ assertTrue(expected.contains(subclass.getID())); } }
@Override public Set<Concept> getSuperclasses(Concept concept) { return ImmutableSet.copyOf(this.superclasses.get(concept)); }
WSCXMLKnowledgeBase implements HierarchicalKnowledgeBase, Serializable { @Override public Set<Concept> getSuperclasses(Concept concept) { return ImmutableSet.copyOf(this.superclasses.get(concept)); } }
WSCXMLKnowledgeBase implements HierarchicalKnowledgeBase, Serializable { @Override public Set<Concept> getSuperclasses(Concept concept) { return ImmutableSet.copyOf(this.superclasses.get(concept)); } WSCXMLKnowledgeBase(InputStream xmlTaxonomyStream);  WSCXMLKnowledgeBase(String xmlTaxonomy);  WSCXMLKnowledgeBase(File xmlTaxonomyFile);  WSCXMLKnowledgeBase(); }
WSCXMLKnowledgeBase implements HierarchicalKnowledgeBase, Serializable { @Override public Set<Concept> getSuperclasses(Concept concept) { return ImmutableSet.copyOf(this.superclasses.get(concept)); } 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 { @Override public Set<Concept> getSuperclasses(Concept concept) { return ImmutableSet.copyOf(this.superclasses.get(concept)); } 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();  }