hok.model
Class TreeFactory

java.lang.Object
  extended by hok.model.TreeFactory

public class TreeFactory
extends java.lang.Object

The TreeFactory provides methods to generate a composite of ITreeNode . The generated tree is the model used by the TreeViewer of the ConstraintDialog to represent a tree of owl model instances.

Author:
holger

Field Summary
static java.lang.String ROOT_CONCEPT
          The root concept of the owl vocabulary to describe a design problem.
static java.lang.String ROOT_PREDICATE
          The root predicate of the owl vocabulary to describe a design problem.
 
Constructor Summary
TreeFactory(com.hp.hpl.jena.ontology.OntModel ontmodel)
          The Constructor.
 
Method Summary
 ITreeNode generateConceptTree(java.lang.String rootConcept)
          Generates the concept tree of the owl model starting with the given root concept.
 ITreeNode generatePredicateTree(java.lang.String rootPredicate)
          Generates the predicate tree of the owl model starting with the given root predicate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_CONCEPT

public static final java.lang.String ROOT_CONCEPT
The root concept of the owl vocabulary to describe a design problem.

See Also:
Constant Field Values

ROOT_PREDICATE

public static final java.lang.String ROOT_PREDICATE
The root predicate of the owl vocabulary to describe a design problem.

See Also:
Constant Field Values
Constructor Detail

TreeFactory

public TreeFactory(com.hp.hpl.jena.ontology.OntModel ontmodel)
            throws OntElementNotFoundException
The Constructor. It stores a Jena OntModel.

Parameters:
ontmodel - the owl model to store.
Throws:
OntElementNotFoundException - is thrown when the ontmodel is null.
Method Detail

generateConceptTree

public ITreeNode generateConceptTree(java.lang.String rootConcept)
                              throws OntElementNotFoundException
Generates the concept tree of the owl model starting with the given root concept.

Parameters:
rootConcept - the owl class from which to start constructing the tree.
Returns:
a composite tree representation of ITreeNode.
Throws:
OntElementNotFoundException - is thrown when the rootConcept does not exist in the ontology.

generatePredicateTree

public ITreeNode generatePredicateTree(java.lang.String rootPredicate)
                                throws OntElementNotFoundException
Generates the predicate tree of the owl model starting with the given root predicate.

Parameters:
rootPredicate - the owl root object property from which to start constructing the tree.
Returns:
a composite tree representation of ITreeNode.
Throws:
OntElementNotFoundException - is thrown when the rootPredicate does not exist in the ontology.