source: TraumaOntologies/src/main/java/tudelft/healthpsychology/traumaontologies/owltree/OwlTree.java

Last change on this file was 4, checked in by Bart Vastenhouw, 5 years ago

Added traumaontologies

File size: 668 bytes
RevLine 
[4]1package tudelft.healthpsychology.traumaontologies.owltree;
2
3import java.util.Collection;
4
5import tudelft.healthpsychology.traumaontologies.answerstate.OntologyNode;
6import tudelft.healthpsychology.traumaontologies.answerstate.Property;
7import tudelft.utilities.tree.Tree;
8
9/**
10 * Mechanism to fetch nodes with given label from the reasoner.
11 */
12public class OwlTree
13 implements Tree<String, Collection<Property>, OntologyNode> {
14
15 private final OwlTreeReasoner reasoner;
16
17 public OwlTree(OwlTreeReasoner reasoner) {
18 this.reasoner = reasoner;
19 }
20
21 @Override
22 public OntologyNode get(String id) {
23 return new OwlOntologyNode(reasoner.getObject(id), reasoner);
24 }
25
26}
Note: See TracBrowser for help on using the repository browser.