macaw.persistenceLayer.demo
Class DemonstrationCurationService

java.lang.Object
  extended by macaw.persistenceLayer.demo.DemonstrationCurationService
All Implemented Interfaces:
MacawCurationAPI
Direct Known Subclasses:
DemonstrationRetrievalService

public class DemonstrationCurationService
extends java.lang.Object
implements MacawCurationAPI

Implements the MacawCurationAPI interface as a service which manages all of its data in-memory instead of in a database. This class allows Macaw to run in a demonstration mode off a pen drive without requiring the client machine to have MySQL installed. DemonstrationCurationService is useful in testing as well. All of the classes in the macaw.test sub-packages can be applied to either in-memory or SQL versions of Macaw services. The difference in implementations make it easy to rapidly isolate the causes of failed test cases. In general, the in-memory implementation is treated as the gold test standard.

DemonstrationCurationService delegates implementations of the API methods to manager classes for major concepts. All of these manager classes have names that are prefixed with "InMemory", eg: InMemoryVariableManager.

The manager classes support persistence using the following policy

A more detailed description of how this works is given in InMemorySupportingDocumentsManager.


Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Field Summary
protected  User admin
           
protected  InMemoryChangeEventManager changeEventManager
           
protected  InMemoryListChoiceManager listChoiceManager
           
protected  Log log
           
protected  InMemoryOntologyTermFilter ontologyTermFilter
           
protected  InMemoryOntologyTermManager ontologyTermManager
           
protected  MacawSecurityAPI securityValidationService
           
protected  InMemorySupportingDocumentFilter supportingDocumentFilter
           
protected  InMemorySupportingDocumentsManager supportingDocumentsManager
           
protected  InMemoryUserManager userManager
           
protected  InMemoryValueLabelManager valueLabelManager
           
protected  InMemoryVariableFilter variableFilter
           
protected  InMemoryVariableManager variableManager
           
 
Constructor Summary
DemonstrationCurationService()
           
DemonstrationCurationService(boolean automatedTestingMode)
           
 
Method Summary
 void addAliasFilePath(User user, AliasFilePath aliasFilePath)
           
 void addAvailabilityState(User user, AvailabilityState availabilityState)
           
 void addCategory(User user, Category dataLibrary)
          methods for managing categories
 void addChangeEvents(MacawChangeEvent changeEvent)
           
 void addCleaningState(User user, CleaningState cleaningState)
           
 void addDerivedVariable(User user, DerivedVariable derivedVariable)
           
 void addOntologyTerm(User user, OntologyTerm ontologyTerm)
           
 void addRawVariable(User user, RawVariable rawVariable)
           
 void addSupportingDocument(User user, SupportingDocument supportingDocument)
           
 void addUser(User admin, User user)
           
 void addValueLabels(User user, Variable variable, java.util.ArrayList<ValueLabel> valueLabels)
           
 void associateOntologyTermsWithVariable(User user, Variable variable, java.util.ArrayList<OntologyTerm> ontologyTerms)
           
 void associateSourceVariables(User user, DerivedVariable derivedVariable, java.util.ArrayList<Variable> sourceVariablesToAdd)
           
 void associateSupportingDocumentsWithVariable(User user, Variable variable, java.util.ArrayList<SupportingDocument> supportingDocuments)
           
 void checkValidAdministrator(User administrator)
           
 void checkValidUser(User user)
           
 void clear(User admin)
           
 void clearAllChanges(User admin)
           
 void deleteAliasFilePaths(User user, java.util.ArrayList<AliasFilePath> aliasFilePaths)
           
 void deleteAvailabilityStates(User user, java.util.ArrayList<AvailabilityState> availabilityStatesToDelete)
           
 void deleteCategories(User user, java.util.ArrayList<Category> categories)
           
 void deleteCleaningStates(User user, java.util.ArrayList<CleaningState> cleaningStates)
           
 void deleteDerivedVariables(User user, java.util.ArrayList<DerivedVariable> derivedVariables)
           
 void deleteOntologyTerms(User user, java.util.ArrayList<OntologyTerm> ontologyTerms)
           
 void deleteRawVariables(User user, java.util.ArrayList<RawVariable> rawVariables)
           
 void deleteSupportingDocuments(User user, java.util.ArrayList<SupportingDocument> supportingDocuments)
           
 void deleteUsers(User admin, java.util.ArrayList<User> usersToDelete)
           
 void deleteValueLabels(User user, Variable variable, java.util.ArrayList<ValueLabel> valueLabels)
           
 void disassociateOntologyTermsFromVariable(User user, Variable variable, java.util.ArrayList<OntologyTerm> ontologyTerms)
           
 void disassociateSourceVariables(User user, DerivedVariable derivedVariable, java.util.ArrayList<Variable> sourceVariablesToDelete)
          removes references to either RawVariable or DerivedVariable variables that were used to create a given derivedVariable
 void disassociateSupportingDocumentsFromVariable(User user, Variable variable, java.util.ArrayList<SupportingDocument> supportingDocuments)
           
 java.util.ArrayList<OntologyTerm> filterOntologyTerms(User user, java.lang.String termFilter, java.lang.String descriptionFilter)
           
 java.util.ArrayList<SupportingDocument> filterSupportingDocuments(User user, java.lang.String documentTitleFilter, java.lang.String documentCodeFilter)
           
 java.util.ArrayList<VariableSummary> filterVariableSummaries(User user, java.lang.String searchText, java.lang.String year, java.lang.String category, VariableTypeFilter variableTypeFilter)
           
 int getAliasFilePathIdentifier(User user, Variable variable, AliasFilePath aliasFilePath)
           
 java.util.ArrayList<AliasFilePath> getAliasFilePaths(User user)
          Methods for data libraries
 java.util.ArrayList<MacawChangeEvent> getAllChanges(User admin)
           
 java.util.ArrayList<OntologyTerm> getAllOntologyTerms(User user)
           
 java.util.ArrayList<SupportingDocument> getAllSupportingDocuments(User user)
           
 Variable getAlternativeVariable(User user, Variable targetVariable)
           
 int getAvailabilityStateIdentifier(User user, Variable variable, AvailabilityState availabilityState)
           
 java.util.ArrayList<AvailabilityState> getAvailabilityStates(User user)
          Methods for managing availability states
 java.util.ArrayList<Category> getCategories(User user)
           
 int getCategoryIdentifier(User user, Variable variable, Category category)
           
 java.util.ArrayList<MacawChangeEvent> getChangeHistoryByUser(User user)
           
 java.util.ArrayList<MacawChangeEvent> getChangeHistoryForListChoices(User user)
           
 java.util.ArrayList<MacawChangeEvent> getChangeHistoryForSupportingDocument(User user, SupportingDocument supportingDocument)
           
 java.util.ArrayList<MacawChangeEvent> getChangeHistoryForValueLabels(User user, Variable variable)
           
 java.util.ArrayList<MacawChangeEvent> getChangeHistoryForVariable(User user, Variable variable)
           
 int getCleaningStateIdentifier(User user, Variable variable, CleaningState cleaningState)
           
 java.util.ArrayList<CleaningState> getCleaningStates(User user)
          Methods for managing cleaning states
 Variable getCompleteVariableData(User user, VariableSummary variableSummary)
           
 int getDerivedVariableIdentifier(User user, DerivedVariable derivedVariable)
           
 java.lang.String getFilePathFromAlias(User user, java.lang.String currentAlias)
           
 int getOntologyTermIdentifier(User user, OntologyTerm ontologyTerm)
           
 java.util.ArrayList<OntologyTerm> getOntologyTerms(User user, Variable variable)
           
 Variable getOriginalVariable(User user, Variable variable)
           
 int getRawVariableIdentifier(User user, RawVariable rawVariable)
           
 java.util.ArrayList<Variable> getSourceVariables(User user, DerivedVariable derivedVariable)
           
 java.lang.String[] getStudyYears(User user)
          retrieves a collection of unique years associated with at least one variable in the data repository.
 java.util.ArrayList<VariableSummary> getSummaryDataForAllVariables(User user)
          retrieves a collection of all variables managed by the system.
 int getSupportingDocumentIdentifier(User user, SupportingDocument supportingDocument)
           
 java.util.ArrayList<SupportingDocument> getSupportingDocuments(User user, Variable variable)
           
 int getUserIdentifier(User admin, User user)
           
 java.util.ArrayList<User> getUsers(User admin)
           
 int getValueLabelIdentifier(User user, Variable variable, ValueLabel valueLabel)
           
 java.util.ArrayList<ValueLabel> getValueLabels(User user, Variable variable)
           
 Variable getVariable(User user, java.lang.String variableName)
           
 void setAlternativeVariable(User user, Variable targetVariable, Variable alternativeVariable)
           
 void updateAliasFilePath(User user, AliasFilePath aliasFilePath)
           
 void updateAvailabilityState(User user, AvailabilityState availabilityState)
           
 void updateCategory(User user, Category dataLibrary)
           
 void updateCleaningState(User user, CleaningState cleaningState)
           
 void updateDerivedVariable(User user, DerivedVariable derivedVariable)
           
 void updateOntologyTerm(User user, OntologyTerm ontologyTerm)
           
 void updateRawVariable(User user, RawVariable rawVariable)
           
 void updateSupportingDocument(User user, SupportingDocument revisedSupportingDocument)
           
 void updateUser(User admin, User user)
           
 void updateValueLabels(User user, Variable variable, java.util.ArrayList<ValueLabel> valueLabels)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listChoiceManager

protected InMemoryListChoiceManager listChoiceManager

supportingDocumentsManager

protected InMemorySupportingDocumentsManager supportingDocumentsManager

changeEventManager

protected InMemoryChangeEventManager changeEventManager

variableManager

protected InMemoryVariableManager variableManager

valueLabelManager

protected InMemoryValueLabelManager valueLabelManager

ontologyTermManager

protected InMemoryOntologyTermManager ontologyTermManager

userManager

protected InMemoryUserManager userManager

variableFilter

protected InMemoryVariableFilter variableFilter

supportingDocumentFilter

protected InMemorySupportingDocumentFilter supportingDocumentFilter

ontologyTermFilter

protected InMemoryOntologyTermFilter ontologyTermFilter

securityValidationService

protected MacawSecurityAPI securityValidationService

admin

protected User admin

log

protected Log log
Constructor Detail

DemonstrationCurationService

public DemonstrationCurationService()

DemonstrationCurationService

public DemonstrationCurationService(boolean automatedTestingMode)
Method Detail

addRawVariable

public void addRawVariable(User user,
                           RawVariable rawVariable)
                    throws MacawException
Specified by:
addRawVariable in interface MacawCurationAPI
Throws:
MacawException

deleteRawVariables

public void deleteRawVariables(User user,
                               java.util.ArrayList<RawVariable> rawVariables)
                        throws MacawException
Specified by:
deleteRawVariables in interface MacawCurationAPI
Throws:
MacawException

updateRawVariable

public void updateRawVariable(User user,
                              RawVariable rawVariable)
                       throws MacawException
Specified by:
updateRawVariable in interface MacawCurationAPI
Throws:
MacawException

addDerivedVariable

public void addDerivedVariable(User user,
                               DerivedVariable derivedVariable)
                        throws MacawException
Specified by:
addDerivedVariable in interface MacawCurationAPI
Throws:
MacawException

deleteDerivedVariables

public void deleteDerivedVariables(User user,
                                   java.util.ArrayList<DerivedVariable> derivedVariables)
                            throws MacawException
Specified by:
deleteDerivedVariables in interface MacawCurationAPI
Throws:
MacawException

updateDerivedVariable

public void updateDerivedVariable(User user,
                                  DerivedVariable derivedVariable)
                           throws MacawException
Specified by:
updateDerivedVariable in interface MacawCurationAPI
Throws:
MacawException

getRawVariableIdentifier

public int getRawVariableIdentifier(User user,
                                    RawVariable rawVariable)
                             throws MacawException
Specified by:
getRawVariableIdentifier in interface MacawCurationAPI
Throws:
MacawException

getDerivedVariableIdentifier

public int getDerivedVariableIdentifier(User user,
                                        DerivedVariable derivedVariable)
                                 throws MacawException
Specified by:
getDerivedVariableIdentifier in interface MacawCurationAPI
Throws:
MacawException

getVariable

public Variable getVariable(User user,
                            java.lang.String variableName)
                     throws MacawException
Specified by:
getVariable in interface MacawCurationAPI
Throws:
MacawException

getSourceVariables

public java.util.ArrayList<Variable> getSourceVariables(User user,
                                                        DerivedVariable derivedVariable)
                                                 throws MacawException
Specified by:
getSourceVariables in interface MacawCurationAPI
Throws:
MacawException

associateSourceVariables

public void associateSourceVariables(User user,
                                     DerivedVariable derivedVariable,
                                     java.util.ArrayList<Variable> sourceVariablesToAdd)
                              throws MacawException
Specified by:
associateSourceVariables in interface MacawCurationAPI
Throws:
MacawException

disassociateSourceVariables

public void disassociateSourceVariables(User user,
                                        DerivedVariable derivedVariable,
                                        java.util.ArrayList<Variable> sourceVariablesToDelete)
                                 throws MacawException
Description copied from interface: MacawCurationAPI
removes references to either RawVariable or DerivedVariable variables that were used to create a given derivedVariable

Specified by:
disassociateSourceVariables in interface MacawCurationAPI
derivedVariable - contains source variables to delete
sourceVariablesToDelete - the raw or derived variables that should no longer be associated with derivedVariable.
Throws:
MacawException

getValueLabels

public java.util.ArrayList<ValueLabel> getValueLabels(User user,
                                                      Variable variable)
                                               throws MacawException
Specified by:
getValueLabels in interface MacawCurationAPI
Throws:
MacawException

addValueLabels

public void addValueLabels(User user,
                           Variable variable,
                           java.util.ArrayList<ValueLabel> valueLabels)
                    throws MacawException
Specified by:
addValueLabels in interface MacawCurationAPI
Throws:
MacawException

updateValueLabels

public void updateValueLabels(User user,
                              Variable variable,
                              java.util.ArrayList<ValueLabel> valueLabels)
                       throws MacawException
Specified by:
updateValueLabels in interface MacawCurationAPI
Throws:
MacawException

deleteValueLabels

public void deleteValueLabels(User user,
                              Variable variable,
                              java.util.ArrayList<ValueLabel> valueLabels)
                       throws MacawException
Specified by:
deleteValueLabels in interface MacawCurationAPI
Throws:
MacawException

getValueLabelIdentifier

public int getValueLabelIdentifier(User user,
                                   Variable variable,
                                   ValueLabel valueLabel)
Specified by:
getValueLabelIdentifier in interface MacawCurationAPI

getStudyYears

public java.lang.String[] getStudyYears(User user)
                                 throws MacawException
Description copied from interface: MacawCurationAPI
retrieves a collection of unique years associated with at least one variable in the data repository.

Specified by:
getStudyYears in interface MacawCurationAPI
Throws:
MacawException

getSummaryDataForAllVariables

public java.util.ArrayList<VariableSummary> getSummaryDataForAllVariables(User user)
                                                                   throws MacawException
Description copied from interface: MacawCurationAPI
retrieves a collection of all variables managed by the system. These variables will include instances of RawVariables and DerivedVariable. Note that only summary data are included:

Specified by:
getSummaryDataForAllVariables in interface MacawCurationAPI
Throws:
MacawException

getCompleteVariableData

public Variable getCompleteVariableData(User user,
                                        VariableSummary variableSummary)
                                 throws MacawException
Specified by:
getCompleteVariableData in interface MacawCurationAPI
Throws:
MacawException

getOriginalVariable

public Variable getOriginalVariable(User user,
                                    Variable variable)
                             throws MacawException
Specified by:
getOriginalVariable in interface MacawCurationAPI
Throws:
MacawException

getAllSupportingDocuments

public java.util.ArrayList<SupportingDocument> getAllSupportingDocuments(User user)
                                                                  throws MacawException
Specified by:
getAllSupportingDocuments in interface MacawCurationAPI
Throws:
MacawException

getSupportingDocuments

public java.util.ArrayList<SupportingDocument> getSupportingDocuments(User user,
                                                                      Variable variable)
                                                               throws MacawException
Specified by:
getSupportingDocuments in interface MacawCurationAPI
Throws:
MacawException

addSupportingDocument

public void addSupportingDocument(User user,
                                  SupportingDocument supportingDocument)
                           throws MacawException
Specified by:
addSupportingDocument in interface MacawCurationAPI
Throws:
MacawException

updateSupportingDocument

public void updateSupportingDocument(User user,
                                     SupportingDocument revisedSupportingDocument)
                              throws MacawException
Specified by:
updateSupportingDocument in interface MacawCurationAPI
Throws:
MacawException

deleteSupportingDocuments

public void deleteSupportingDocuments(User user,
                                      java.util.ArrayList<SupportingDocument> supportingDocuments)
                               throws MacawException
Specified by:
deleteSupportingDocuments in interface MacawCurationAPI
Throws:
MacawException

getSupportingDocumentIdentifier

public int getSupportingDocumentIdentifier(User user,
                                           SupportingDocument supportingDocument)
                                    throws MacawException
Specified by:
getSupportingDocumentIdentifier in interface MacawCurationAPI
Throws:
MacawException

associateSupportingDocumentsWithVariable

public void associateSupportingDocumentsWithVariable(User user,
                                                     Variable variable,
                                                     java.util.ArrayList<SupportingDocument> supportingDocuments)
                                              throws MacawException
Specified by:
associateSupportingDocumentsWithVariable in interface MacawCurationAPI
Throws:
MacawException

disassociateSupportingDocumentsFromVariable

public void disassociateSupportingDocumentsFromVariable(User user,
                                                        Variable variable,
                                                        java.util.ArrayList<SupportingDocument> supportingDocuments)
                                                 throws MacawException
Specified by:
disassociateSupportingDocumentsFromVariable in interface MacawCurationAPI
Throws:
MacawException

getCategories

public java.util.ArrayList<Category> getCategories(User user)
                                            throws MacawException
Specified by:
getCategories in interface MacawCurationAPI
Returns:
a collection of categories used to classify NSHD variables. eg: "General Health" and "Education".
Throws:
MacawException

addCategory

public void addCategory(User user,
                        Category dataLibrary)
                 throws MacawException
methods for managing categories

Specified by:
addCategory in interface MacawCurationAPI
Throws:
MacawException

updateCategory

public void updateCategory(User user,
                           Category dataLibrary)
                    throws MacawException
Specified by:
updateCategory in interface MacawCurationAPI
Throws:
MacawException

deleteCategories

public void deleteCategories(User user,
                             java.util.ArrayList<Category> categories)
                      throws MacawException
Specified by:
deleteCategories in interface MacawCurationAPI
Throws:
MacawException

getCategoryIdentifier

public int getCategoryIdentifier(User user,
                                 Variable variable,
                                 Category category)
                          throws MacawException
Specified by:
getCategoryIdentifier in interface MacawCurationAPI
Throws:
MacawException

getCleaningStates

public java.util.ArrayList<CleaningState> getCleaningStates(User user)
                                                     throws MacawException
Methods for managing cleaning states

Specified by:
getCleaningStates in interface MacawCurationAPI
Throws:
MacawException

addCleaningState

public void addCleaningState(User user,
                             CleaningState cleaningState)
                      throws MacawException
Specified by:
addCleaningState in interface MacawCurationAPI
Throws:
MacawException

updateCleaningState

public void updateCleaningState(User user,
                                CleaningState cleaningState)
                         throws MacawException
Specified by:
updateCleaningState in interface MacawCurationAPI
Throws:
MacawException

deleteCleaningStates

public void deleteCleaningStates(User user,
                                 java.util.ArrayList<CleaningState> cleaningStates)
                          throws MacawException
Specified by:
deleteCleaningStates in interface MacawCurationAPI
Throws:
MacawException

getCleaningStateIdentifier

public int getCleaningStateIdentifier(User user,
                                      Variable variable,
                                      CleaningState cleaningState)
                               throws MacawException
Specified by:
getCleaningStateIdentifier in interface MacawCurationAPI
Throws:
MacawException

getAvailabilityStates

public java.util.ArrayList<AvailabilityState> getAvailabilityStates(User user)
                                                             throws MacawException
Methods for managing availability states

Specified by:
getAvailabilityStates in interface MacawCurationAPI
Throws:
MacawException

addAvailabilityState

public void addAvailabilityState(User user,
                                 AvailabilityState availabilityState)
                          throws MacawException
Specified by:
addAvailabilityState in interface MacawCurationAPI
Throws:
MacawException

updateAvailabilityState

public void updateAvailabilityState(User user,
                                    AvailabilityState availabilityState)
                             throws MacawException
Specified by:
updateAvailabilityState in interface MacawCurationAPI
Throws:
MacawException

deleteAvailabilityStates

public void deleteAvailabilityStates(User user,
                                     java.util.ArrayList<AvailabilityState> availabilityStatesToDelete)
                              throws MacawException
Specified by:
deleteAvailabilityStates in interface MacawCurationAPI
Throws:
MacawException

getAvailabilityStateIdentifier

public int getAvailabilityStateIdentifier(User user,
                                          Variable variable,
                                          AvailabilityState availabilityState)
                                   throws MacawException
Specified by:
getAvailabilityStateIdentifier in interface MacawCurationAPI
Throws:
MacawException

getAliasFilePaths

public java.util.ArrayList<AliasFilePath> getAliasFilePaths(User user)
                                                     throws MacawException
Methods for data libraries

Specified by:
getAliasFilePaths in interface MacawCurationAPI
Throws:
MacawException

addAliasFilePath

public void addAliasFilePath(User user,
                             AliasFilePath aliasFilePath)
                      throws MacawException
Specified by:
addAliasFilePath in interface MacawCurationAPI
Throws:
MacawException

updateAliasFilePath

public void updateAliasFilePath(User user,
                                AliasFilePath aliasFilePath)
                         throws MacawException
Specified by:
updateAliasFilePath in interface MacawCurationAPI
Throws:
MacawException

deleteAliasFilePaths

public void deleteAliasFilePaths(User user,
                                 java.util.ArrayList<AliasFilePath> aliasFilePaths)
                          throws MacawException
Specified by:
deleteAliasFilePaths in interface MacawCurationAPI
Throws:
MacawException

getAliasFilePathIdentifier

public int getAliasFilePathIdentifier(User user,
                                      Variable variable,
                                      AliasFilePath aliasFilePath)
                               throws MacawException
Specified by:
getAliasFilePathIdentifier in interface MacawCurationAPI
Throws:
MacawException

filterVariableSummaries

public java.util.ArrayList<VariableSummary> filterVariableSummaries(User user,
                                                                    java.lang.String searchText,
                                                                    java.lang.String year,
                                                                    java.lang.String category,
                                                                    VariableTypeFilter variableTypeFilter)
                                                             throws MacawException
Specified by:
filterVariableSummaries in interface MacawCurationAPI
Throws:
MacawException

getFilePathFromAlias

public java.lang.String getFilePathFromAlias(User user,
                                             java.lang.String currentAlias)
                                      throws MacawException
Specified by:
getFilePathFromAlias in interface MacawCurationAPI
Throws:
MacawException

filterSupportingDocuments

public java.util.ArrayList<SupportingDocument> filterSupportingDocuments(User user,
                                                                         java.lang.String documentTitleFilter,
                                                                         java.lang.String documentCodeFilter)
                                                                  throws MacawException
Specified by:
filterSupportingDocuments in interface MacawCurationAPI
Throws:
MacawException

filterOntologyTerms

public java.util.ArrayList<OntologyTerm> filterOntologyTerms(User user,
                                                             java.lang.String termFilter,
                                                             java.lang.String descriptionFilter)
                                                      throws MacawException
Specified by:
filterOntologyTerms in interface MacawCurationAPI
Throws:
MacawException

getAllOntologyTerms

public java.util.ArrayList<OntologyTerm> getAllOntologyTerms(User user)
                                                      throws MacawException
Specified by:
getAllOntologyTerms in interface MacawCurationAPI
Throws:
MacawException

getOntologyTerms

public java.util.ArrayList<OntologyTerm> getOntologyTerms(User user,
                                                          Variable variable)
                                                   throws MacawException
Specified by:
getOntologyTerms in interface MacawCurationAPI
Throws:
MacawException

addOntologyTerm

public void addOntologyTerm(User user,
                            OntologyTerm ontologyTerm)
                     throws MacawException
Specified by:
addOntologyTerm in interface MacawCurationAPI
Throws:
MacawException

updateOntologyTerm

public void updateOntologyTerm(User user,
                               OntologyTerm ontologyTerm)
                        throws MacawException
Specified by:
updateOntologyTerm in interface MacawCurationAPI
Throws:
MacawException

deleteOntologyTerms

public void deleteOntologyTerms(User user,
                                java.util.ArrayList<OntologyTerm> ontologyTerms)
                         throws MacawException
Specified by:
deleteOntologyTerms in interface MacawCurationAPI
Throws:
MacawException

getOntologyTermIdentifier

public int getOntologyTermIdentifier(User user,
                                     OntologyTerm ontologyTerm)
                              throws MacawException
Specified by:
getOntologyTermIdentifier in interface MacawCurationAPI
Throws:
MacawException

associateOntologyTermsWithVariable

public void associateOntologyTermsWithVariable(User user,
                                               Variable variable,
                                               java.util.ArrayList<OntologyTerm> ontologyTerms)
                                        throws MacawException
Specified by:
associateOntologyTermsWithVariable in interface MacawCurationAPI
Throws:
MacawException

disassociateOntologyTermsFromVariable

public void disassociateOntologyTermsFromVariable(User user,
                                                  Variable variable,
                                                  java.util.ArrayList<OntologyTerm> ontologyTerms)
                                           throws MacawException
Specified by:
disassociateOntologyTermsFromVariable in interface MacawCurationAPI
Throws:
MacawException

getChangeHistoryForVariable

public java.util.ArrayList<MacawChangeEvent> getChangeHistoryForVariable(User user,
                                                                         Variable variable)
                                                                  throws MacawException
Specified by:
getChangeHistoryForVariable in interface MacawCurationAPI
Throws:
MacawException

getChangeHistoryForSupportingDocument

public java.util.ArrayList<MacawChangeEvent> getChangeHistoryForSupportingDocument(User user,
                                                                                   SupportingDocument supportingDocument)
                                                                            throws MacawException
Specified by:
getChangeHistoryForSupportingDocument in interface MacawCurationAPI
Throws:
MacawException

getChangeHistoryForValueLabels

public java.util.ArrayList<MacawChangeEvent> getChangeHistoryForValueLabels(User user,
                                                                            Variable variable)
                                                                     throws MacawException
Specified by:
getChangeHistoryForValueLabels in interface MacawCurationAPI
Throws:
MacawException

getChangeHistoryForListChoices

public java.util.ArrayList<MacawChangeEvent> getChangeHistoryForListChoices(User user)
                                                                     throws MacawException
Specified by:
getChangeHistoryForListChoices in interface MacawCurationAPI
Throws:
MacawException

getChangeHistoryByUser

public java.util.ArrayList<MacawChangeEvent> getChangeHistoryByUser(User user)
                                                             throws MacawException
Specified by:
getChangeHistoryByUser in interface MacawCurationAPI
Throws:
MacawException

addChangeEvents

public void addChangeEvents(MacawChangeEvent changeEvent)
                     throws MacawException
Throws:
MacawException

getUsers

public java.util.ArrayList<User> getUsers(User admin)
                                   throws MacawException
Specified by:
getUsers in interface MacawCurationAPI
Throws:
MacawException

addUser

public void addUser(User admin,
                    User user)
             throws MacawException
Specified by:
addUser in interface MacawCurationAPI
Throws:
MacawException

updateUser

public void updateUser(User admin,
                       User user)
                throws MacawException
Specified by:
updateUser in interface MacawCurationAPI
Throws:
MacawException

deleteUsers

public void deleteUsers(User admin,
                        java.util.ArrayList<User> usersToDelete)
                 throws MacawException
Specified by:
deleteUsers in interface MacawCurationAPI
Throws:
MacawException

getUserIdentifier

public int getUserIdentifier(User admin,
                             User user)
                      throws MacawException
Specified by:
getUserIdentifier in interface MacawCurationAPI
Throws:
MacawException

checkValidUser

public void checkValidUser(User user)
                    throws MacawException
Specified by:
checkValidUser in interface MacawCurationAPI
Throws:
MacawException

checkValidAdministrator

public void checkValidAdministrator(User administrator)
                             throws MacawException
Specified by:
checkValidAdministrator in interface MacawCurationAPI
Throws:
MacawException

clear

public void clear(User admin)
           throws MacawException
Specified by:
clear in interface MacawCurationAPI
Throws:
MacawException

clearAllChanges

public void clearAllChanges(User admin)
                     throws MacawException
Specified by:
clearAllChanges in interface MacawCurationAPI
Throws:
MacawException

getAllChanges

public java.util.ArrayList<MacawChangeEvent> getAllChanges(User admin)
                                                    throws MacawException
Specified by:
getAllChanges in interface MacawCurationAPI
Throws:
MacawException

getAlternativeVariable

public Variable getAlternativeVariable(User user,
                                       Variable targetVariable)
                                throws MacawException
Specified by:
getAlternativeVariable in interface MacawCurationAPI
Throws:
MacawException

setAlternativeVariable

public void setAlternativeVariable(User user,
                                   Variable targetVariable,
                                   Variable alternativeVariable)
                            throws MacawException
Specified by:
setAlternativeVariable in interface MacawCurationAPI
Throws:
MacawException