|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fuberlin.wiwiss.semmf.taxon.Taxonomy
public class Taxonomy
This class represents the hierarchical structure of concepts from a given ontology. The parent-child relationship between concepts must be indicated by the rdfs:subClassOf property !!! RESTRICTION: This class works properly for ontologies, where only BottomConcepts (concepts at the lowest haierarchy level, which do not have any children) are allowed to have multiple parents, e.g. to have more positions in the concept hierarchy.
Field Summary | |
---|---|
private java.util.Map |
concepts
A hash map storing all descendants of the root concept in the taxonomy provided to the constructor |
int |
deepestLevel
Index of the deepest level (= number of levels - 1) |
private java.lang.String |
ontURL
URL of the taxonomy file file |
private java.lang.String |
rootURI
URI of the root concept |
Constructor Summary | |
---|---|
Taxonomy(java.lang.String ontURL,
java.lang.String rootConceptURI)
This constructor uses the Jena2 API to read the ontology from an RDF document and create the hierarchy tree. |
Method Summary | |
---|---|
private void |
createHierarchyTree(com.hp.hpl.jena.rdf.model.Model model,
com.hp.hpl.jena.rdf.model.Resource r,
SuperConcept superC,
int level)
Creates the parent-child-relationship among concepts from this taxonomy |
SuperConcept |
findCCP(SuperConcept c1,
SuperConcept c2)
|
Concept |
getConcept(java.lang.String conceptURI)
For a given URI returns the Concept object inside this taxonomy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Map concepts
private java.lang.String ontURL
private java.lang.String rootURI
public int deepestLevel
Constructor Detail |
---|
public Taxonomy(java.lang.String ontURL, java.lang.String rootConceptURI)
ontURL
- location of the ontology filerootConceptURI
- URI of the root concept inside the ontologyMethod Detail |
---|
public Concept getConcept(java.lang.String conceptURI)
conceptURI
- URI of the conceptpublic SuperConcept findCCP(SuperConcept c1, SuperConcept c2)
private void createHierarchyTree(com.hp.hpl.jena.rdf.model.Model model, com.hp.hpl.jena.rdf.model.Resource r, SuperConcept superC, int level)
model
- Jena RDF modelr
- Jena Resource from this modelsuperC
- SuperConcept of rlevel
- hierarchy level
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |