source: TraumaOntologies/src/main/java/tudelft/healthpsychology/traumaontologies/answerstate/OntologyNode.java

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

Added traumaontologies

File size: 1.4 KB
Line 
1package tudelft.healthpsychology.traumaontologies.answerstate;
2
3import java.util.Collection;
4import java.util.List;
5
6import org.semanticweb.owlapi.model.OWLClass;
7
8import tudelft.utilities.tree.TreeNode;
9
10/**
11 * This is a node (class) in the ontology. The ontology builds a tree of terms
12 * and subterms, eg "Apparatus" would be a term and "Vacuum cleaner" a subterm
13 * of it. The IRI contains eg "#Apparatus" and should refer properly to the IRIs
14 * in the ontology. <br>
15 * This class abstracts away all database querying and RDF stuff, facilitating
16 * testing and code readability.
17 *
18 * The nodes in the ontology graph have properties. These properties are
19 * questions to be filled in separately.
20 *
21 * We use a String as label of the nodes that are referring to {@link OWLClass}
22 * objects.
23 *
24 */
25public interface OntologyNode extends TreeNode<String, Collection<Property>> {
26
27 /**
28 * @param depth Must be positive or 0. 0 means node itself, 1 means direct
29 * children, 2 means children of the children, etc.
30 * @return list with only this node if this is a leaf node or depth=0. If
31 * this is not a leaf node, then returns a list joining all
32 * getChildren(depth-1) of each child.
33 */
34 List<OntologyNode> getChildren(int depth);
35
36 /**
37 * @return the parent of this node. Null if no such node eg if this is the
38 * root node.
39 */
40 OntologyNode getParent();
41
42}
Note: See TracBrowser for help on using the repository browser.