uk.co.agena.minerva.model.querymodel
Class ClassQueryModel

java.lang.Object
  extended by uk.co.agena.minerva.model.querymodel.ClassQueryModel

public class ClassQueryModel
extends java.lang.Object

The root class of the Class/query model. It maintains the list of data sources, class to query attachments, and master queries.

Author:
hearty

Field Summary
static ClassQueryModel classQueryModel
           
 
Constructor Summary
ClassQueryModel(uk.co.agena.minervaapps.basicminerva.MinervaMainFrame mmf)
          Constructor.
 
Method Summary
 void closeDatabaseConnections()
          Closes all database connections.
 QueryInstance findMasterQuery(java.lang.String queryName)
          Finds a named query instance in the master query list.
 QueryInstance findMasterUpdate(java.lang.String queryName)
           
 java.util.Vector getDataSources()
           
 java.util.Vector getMasterQueries()
           
 java.util.Vector getMasterUpdates()
           
 StructureElement getStructureRoot()
           
 Substitution getSubstitution(java.lang.String name)
           
 void loadModel(Model model, java.lang.String filename)
          A base model is used as a template to define a hierarchy of types and the BNs used to instantiate those types.
 void loadUsingModel(Model model, java.lang.String filename)
           
 void runStructureQueries()
           
 void setDataSources(java.util.Vector dataSources)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classQueryModel

public static ClassQueryModel classQueryModel
Constructor Detail

ClassQueryModel

public ClassQueryModel(uk.co.agena.minervaapps.basicminerva.MinervaMainFrame mmf)
Constructor.

Method Detail

getSubstitution

public Substitution getSubstitution(java.lang.String name)
                             throws QueryException
Throws:
QueryException

findMasterQuery

public QueryInstance findMasterQuery(java.lang.String queryName)
Finds a named query instance in the master query list.

Parameters:
queryName -
Returns:

findMasterUpdate

public QueryInstance findMasterUpdate(java.lang.String queryName)

loadModel

public void loadModel(Model model,
                      java.lang.String filename)
               throws QueryException
A base model is used as a template to define a hierarchy of types and the BNs used to instantiate those types.

An XML file is then used to specify database queries which can be used to create specific instances of each type and to populate nodes with data.

Parameters:
model - The base model being loaded.
filename - XML file defining queries to create instance of model.
Throws:
java.lang.Exception
java.io.IOException
QueryException

loadUsingModel

public void loadUsingModel(Model model,
                           java.lang.String filename)
                    throws QueryException
Throws:
QueryException

closeDatabaseConnections

public void closeDatabaseConnections()
Closes all database connections.


runStructureQueries

public void runStructureQueries()
                         throws QueryException
Throws:
QueryException

getDataSources

public java.util.Vector getDataSources()

setDataSources

public void setDataSources(java.util.Vector dataSources)

getMasterQueries

public java.util.Vector getMasterQueries()

getMasterUpdates

public java.util.Vector getMasterUpdates()

getStructureRoot

public StructureElement getStructureRoot()


Copyright © 2006 Agena Ltd. All Rights Reserved.