hok.model
Class ModelMediator

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

public class ModelMediator
extends java.lang.Object

The ModelMediator mediates between the ontology model and the sparql ast model. It provides methods to generate the AST from Sparql constraint rows which are configured by the user in the view and to use the ast to query the ontology.

Author:
holger

Field Summary
static java.lang.String ONT_PATH
           
static java.lang.String REASONER_URL
           
static java.lang.String RESOURCE_PATH
           
 
Constructor Summary
ModelMediator()
          Constructor.
 
Method Summary
 ITreeNode getConceptTree()
          Returns the concept tree.
 ITreeNode getPredicateTree()
          Returns the predicate tree.
 PatternModel queryModel(java.util.Vector<ConstraintRow> constraints)
          Queries the ontology model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_PATH

public static final java.lang.String RESOURCE_PATH
See Also:
Constant Field Values

REASONER_URL

public static final java.lang.String REASONER_URL
See Also:
Constant Field Values

ONT_PATH

public static final java.lang.String ONT_PATH
See Also:
Constant Field Values
Constructor Detail

ModelMediator

public ModelMediator()
Constructor. Calls the init methods to initialize the OWL and the Sparql model.

Method Detail

getConceptTree

public ITreeNode getConceptTree()
Returns the concept tree.

Returns:
the concept tree.

getPredicateTree

public ITreeNode getPredicateTree()
Returns the predicate tree.

Returns:
the predicate tree.

queryModel

public PatternModel queryModel(java.util.Vector<ConstraintRow> constraints)
                        throws QueryCreationFailedException,
                               OntElementNotFoundException
Queries the ontology model.

Parameters:
constraints - the collection of ConstraintRow from which to create the query.
Returns:
the pattern model containing the query result set.
Throws:
QueryCreationFailedException - is thrown if the query creatio has failed.
OntElementNotFoundException - is thrown if an ontology element is not found.