Last change
on this file since 5 was 4, checked in by Bart Vastenhouw, 5 years ago |
Added traumaontologies
|
File size:
668 bytes
|
Line | |
---|
1 | package tudelft.healthpsychology.traumaontologies.owltree;
|
---|
2 |
|
---|
3 | import java.util.Collection;
|
---|
4 |
|
---|
5 | import tudelft.healthpsychology.traumaontologies.answerstate.OntologyNode;
|
---|
6 | import tudelft.healthpsychology.traumaontologies.answerstate.Property;
|
---|
7 | import tudelft.utilities.tree.Tree;
|
---|
8 |
|
---|
9 | /**
|
---|
10 | * Mechanism to fetch nodes with given label from the reasoner.
|
---|
11 | */
|
---|
12 | public 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.