org.gusdb.wdk.model
Class WdkModel

java.lang.Object
  extended by org.gusdb.wdk.model.WdkModel

public class WdkModel
extends java.lang.Object


Field Summary
static WdkModel INSTANCE
           
static java.lang.Integer TRUNCATE_DEFAULT
           
 
Constructor Summary
WdkModel()
          Default constructor
 
Method Summary
 void addParamSet(ParamSet paramSet)
           
 void addQuerySet(ParamSet paramSet)
           
 void addQuerySet(QuerySet querySet)
           
 void addQuestionSet(QuestionSet questionSet)
           
 void addRecordClassSet(RecordClassSet recordClassSet)
           
 void addReferenceList(ReferenceList referenceList)
           
 void addXmlQuestionSet(org.gusdb.wdk.model.xml.XmlQuestionSet questionSet)
           
 void addXmlRecordClassSet(org.gusdb.wdk.model.xml.XmlRecordClassSet recordClassSet)
           
 void configure(java.io.File modelConfigXmlFile)
           
 void configure(java.net.URL modelConfigXmlFileURL)
           
static WdkModel construct(java.lang.String modelName)
          Convenience method for constructing a model from the configuration information
 User createUser(java.lang.String userID)
           
 boolean deleteUser(java.lang.String userID)
           
 QuerySet[] getAllQuerySets()
           
 QuestionSet[] getAllQuestionSets()
           
 RecordClassSet[] getAllRecordClassSets()
           
 ReferenceList[] getAllReferenceLists()
           
 EnumParam getBooleanOps()
           
 java.lang.String getDisplayName()
           
 org.w3c.dom.Document getDocument()
           
 java.lang.String getIntroduction()
           
 java.lang.String getName()
           
 QuerySet getQuerySet(java.lang.String setName)
           
 Question getQuestion(java.lang.String initRecordClassList)
           
 QuestionSet getQuestionSet(java.lang.String setName)
           
 java.util.Map getQuestionSets()
           
 RDBMSPlatformI getRDBMSPlatform()
           
 RecordClass getRecordClass(java.lang.String recordClassReference)
           
 RecordClassSet getRecordClassSet(java.lang.String recordClassSetName)
           
 ReferenceList getReferenceList(java.lang.String referenceListName)
           
 ResultFactory getResultFactory()
           
 User getUser(java.lang.String userID)
           
 java.io.File getXmlDataDir()
           
 org.gusdb.wdk.model.xml.XmlQuestionSet getXmlQuestionSet(java.lang.String setName)
           
 org.gusdb.wdk.model.xml.XmlQuestionSet[] getXmlQuestionSets()
           
 org.gusdb.wdk.model.xml.XmlRecordClassSet getXmlRecordClassSet(java.lang.String setName)
           
 org.gusdb.wdk.model.xml.XmlRecordClassSet[] getXmlRecordClassSets()
           
 java.net.URL getXmlSchemaURL()
           
 boolean hasQuerySet(java.lang.String setName)
           
 boolean hasQuestionSet(java.lang.String setName)
           
 BooleanQuery makeBooleanQuery()
           
 BooleanQueryInstance makeBooleanQueryInstance()
           
 Question makeBooleanQuestion(RecordClass rc)
           
 java.lang.Object resolveReference(java.lang.String twoPartName, java.lang.String refererName, java.lang.String refererClassName, java.lang.String refererAttributeName)
           
 void resolveReferences()
          Some elements within the set may refer to others by name.
 void setDisplayName(java.lang.String displayName)
           
 void setDocument(org.w3c.dom.Document document)
           
 void setIntroduction(java.lang.String introduction)
           
 void setName(java.lang.String name)
           
 void setResources()
          Set whatever resources the model needs.
 void setXmlDataDir(java.io.File path)
           
 void setXmlSchema(java.net.URL xmlSchemaURL)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TRUNCATE_DEFAULT

public static final java.lang.Integer TRUNCATE_DEFAULT

INSTANCE

public static final WdkModel INSTANCE
Constructor Detail

WdkModel

public WdkModel()
Default constructor

Method Detail

construct

public static WdkModel construct(java.lang.String modelName)
                          throws WdkModelException
Convenience method for constructing a model from the configuration information

Throws:
WdkModelException

getQuestion

public Question getQuestion(java.lang.String initRecordClassList)
                     throws WdkUserException,
                            WdkModelException
Parameters:
initRecordClassList -
Returns:
Throws:
WdkUserException
WdkModelException

getRecordClass

public RecordClass getRecordClass(java.lang.String recordClassReference)
                           throws WdkUserException,
                                  WdkModelException
Throws:
WdkUserException
WdkModelException

getResultFactory

public ResultFactory getResultFactory()

setName

public void setName(java.lang.String name)

getName

public java.lang.String getName()

setDisplayName

public void setDisplayName(java.lang.String displayName)

getDisplayName

public java.lang.String getDisplayName()

setIntroduction

public void setIntroduction(java.lang.String introduction)

getIntroduction

public java.lang.String getIntroduction()

addRecordClassSet

public void addRecordClassSet(RecordClassSet recordClassSet)
                       throws WdkModelException
Throws:
WdkModelException

getRecordClassSet

public RecordClassSet getRecordClassSet(java.lang.String recordClassSetName)
                                 throws WdkUserException
Throws:
WdkUserException

getAllRecordClassSets

public RecordClassSet[] getAllRecordClassSets()

addQuerySet

public void addQuerySet(QuerySet querySet)
                 throws WdkModelException
Throws:
WdkModelException

getQuerySet

public QuerySet getQuerySet(java.lang.String setName)
                     throws WdkUserException
Throws:
WdkUserException

hasQuerySet

public boolean hasQuerySet(java.lang.String setName)

getAllQuerySets

public QuerySet[] getAllQuerySets()

getAllQuestionSets

public QuestionSet[] getAllQuestionSets()

addQuestionSet

public void addQuestionSet(QuestionSet questionSet)
                    throws WdkModelException
Throws:
WdkModelException

getQuestionSet

public QuestionSet getQuestionSet(java.lang.String setName)
                           throws WdkUserException
Throws:
WdkUserException

hasQuestionSet

public boolean hasQuestionSet(java.lang.String setName)

getQuestionSets

public java.util.Map getQuestionSets()

addReferenceList

public void addReferenceList(ReferenceList referenceList)
                      throws WdkModelException
Throws:
WdkModelException

getReferenceList

public ReferenceList getReferenceList(java.lang.String referenceListName)
                               throws WdkUserException
Throws:
WdkUserException

getAllReferenceLists

public ReferenceList[] getAllReferenceLists()

makeBooleanQuestion

public Question makeBooleanQuestion(RecordClass rc)

makeBooleanQuery

public BooleanQuery makeBooleanQuery()

makeBooleanQueryInstance

public BooleanQueryInstance makeBooleanQueryInstance()

setResources

public void setResources()
                  throws WdkModelException
Set whatever resources the model needs. It will pass them to its kids

Throws:
WdkModelException

configure

public void configure(java.net.URL modelConfigXmlFileURL)
               throws java.lang.Exception
Throws:
java.lang.Exception

configure

public void configure(java.io.File modelConfigXmlFile)
               throws java.lang.Exception
Throws:
java.lang.Exception

getRDBMSPlatform

public RDBMSPlatformI getRDBMSPlatform()

resolveReference

public java.lang.Object resolveReference(java.lang.String twoPartName,
                                         java.lang.String refererName,
                                         java.lang.String refererClassName,
                                         java.lang.String refererAttributeName)
                                  throws WdkModelException
Throws:
WdkModelException

resolveReferences

public void resolveReferences()
                       throws WdkModelException
Some elements within the set may refer to others by name. Resolve those references into real object references.

Throws:
WdkModelException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addQuerySet

public void addQuerySet(ParamSet paramSet)
                 throws WdkModelException
Throws:
WdkModelException

addParamSet

public void addParamSet(ParamSet paramSet)
                 throws WdkModelException
Throws:
WdkModelException

getDocument

public org.w3c.dom.Document getDocument()

setDocument

public void setDocument(org.w3c.dom.Document document)

getBooleanOps

public EnumParam getBooleanOps()

createUser

public User createUser(java.lang.String userID)

getUser

public User getUser(java.lang.String userID)

deleteUser

public boolean deleteUser(java.lang.String userID)

addXmlQuestionSet

public void addXmlQuestionSet(org.gusdb.wdk.model.xml.XmlQuestionSet questionSet)
                       throws WdkModelException
Throws:
WdkModelException

getXmlQuestionSets

public org.gusdb.wdk.model.xml.XmlQuestionSet[] getXmlQuestionSets()

getXmlQuestionSet

public org.gusdb.wdk.model.xml.XmlQuestionSet getXmlQuestionSet(java.lang.String setName)
                                                         throws WdkModelException
Throws:
WdkModelException

addXmlRecordClassSet

public void addXmlRecordClassSet(org.gusdb.wdk.model.xml.XmlRecordClassSet recordClassSet)
                          throws WdkModelException
Throws:
WdkModelException

getXmlRecordClassSets

public org.gusdb.wdk.model.xml.XmlRecordClassSet[] getXmlRecordClassSets()

getXmlRecordClassSet

public org.gusdb.wdk.model.xml.XmlRecordClassSet getXmlRecordClassSet(java.lang.String setName)
                                                               throws WdkModelException
Throws:
WdkModelException

setXmlSchema

public void setXmlSchema(java.net.URL xmlSchemaURL)

getXmlSchemaURL

public java.net.URL getXmlSchemaURL()

setXmlDataDir

public void setXmlDataDir(java.io.File path)

getXmlDataDir

public java.io.File getXmlDataDir()