|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object macaw.persistenceLayer.production.ProductionCurationService
public class ProductionCurationService
Implements the interface MacawCurationAPI
as a curation service
which stores data in a MySQL database. The structure of ProductionCurationService
is very similar to that of DemonstrationCurationService
.
Both classes delegate handling API calls to manager classes that are each designed
to support a major concept from the package macaw.model
(eg: SupportingDocument
, Variable
,
User
)
Constructor Summary | |
---|---|
ProductionCurationService(SessionProperties sessionProperties)
|
Method Summary | |
---|---|
void |
addAliasFilePath(User user,
AliasFilePath aliasFilePath)
|
void |
addAvailabilityState(User user,
AvailabilityState availabilityState)
|
void |
addCategory(User user,
Category category)
|
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 admin)
|
void |
checkValidUser(User user)
|
void |
clear(User admin)
|
void |
clearAllChanges(User admin)
|
void |
commitDatabaseChanges(java.sql.Connection connection)
|
void |
deleteAliasFilePaths(User user,
java.util.ArrayList<AliasFilePath> aliasFilePaths)
|
void |
deleteAvailabilityStates(User user,
java.util.ArrayList<AvailabilityState> availabilityStates)
|
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> ontologyTermsToDelete)
|
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 term,
java.lang.String description)
|
java.util.ArrayList<SupportingDocument> |
filterSupportingDocuments(User user,
java.lang.String documentTitle,
java.lang.String documentCode)
|
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 |
getNumberOfConnections()
|
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 |
initialiseConnection(java.sql.Connection connection)
|
void |
rollBack(java.sql.Connection connection)
|
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 category)
|
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 supportingDocument)
|
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 |
Constructor Detail |
---|
public ProductionCurationService(SessionProperties sessionProperties) throws MacawException
MacawException
Method Detail |
---|
public void addRawVariable(User user, RawVariable rawVariable) throws MacawException
addRawVariable
in interface MacawCurationAPI
MacawException
public void deleteRawVariables(User user, java.util.ArrayList<RawVariable> rawVariables) throws MacawException
deleteRawVariables
in interface MacawCurationAPI
MacawException
public void updateRawVariable(User user, RawVariable rawVariable) throws MacawException
updateRawVariable
in interface MacawCurationAPI
MacawException
public int getRawVariableIdentifier(User user, RawVariable rawVariable) throws MacawException
getRawVariableIdentifier
in interface MacawCurationAPI
MacawException
public void addDerivedVariable(User user, DerivedVariable derivedVariable) throws MacawException
addDerivedVariable
in interface MacawCurationAPI
MacawException
public void deleteDerivedVariables(User user, java.util.ArrayList<DerivedVariable> derivedVariables) throws MacawException
deleteDerivedVariables
in interface MacawCurationAPI
MacawException
public void updateDerivedVariable(User user, DerivedVariable derivedVariable) throws MacawException
updateDerivedVariable
in interface MacawCurationAPI
MacawException
public int getDerivedVariableIdentifier(User user, DerivedVariable derivedVariable) throws MacawException
getDerivedVariableIdentifier
in interface MacawCurationAPI
MacawException
public Variable getVariable(User user, java.lang.String variableName) throws MacawException
getVariable
in interface MacawCurationAPI
MacawException
public Variable getOriginalVariable(User user, Variable variable) throws MacawException
getOriginalVariable
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<ValueLabel> getValueLabels(User user, Variable variable) throws MacawException
getValueLabels
in interface MacawCurationAPI
MacawException
public void addValueLabels(User user, Variable variable, java.util.ArrayList<ValueLabel> valueLabels) throws MacawException
addValueLabels
in interface MacawCurationAPI
MacawException
public void updateValueLabels(User user, Variable variable, java.util.ArrayList<ValueLabel> valueLabels) throws MacawException
updateValueLabels
in interface MacawCurationAPI
MacawException
public void deleteValueLabels(User user, Variable variable, java.util.ArrayList<ValueLabel> valueLabels) throws MacawException
deleteValueLabels
in interface MacawCurationAPI
MacawException
public int getValueLabelIdentifier(User user, Variable variable, ValueLabel valueLabel) throws MacawException
getValueLabelIdentifier
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<SupportingDocument> getAllSupportingDocuments(User user) throws MacawException
getAllSupportingDocuments
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<SupportingDocument> getSupportingDocuments(User user, Variable variable) throws MacawException
getSupportingDocuments
in interface MacawCurationAPI
MacawException
public void addSupportingDocument(User user, SupportingDocument supportingDocument) throws MacawException
addSupportingDocument
in interface MacawCurationAPI
MacawException
public void updateSupportingDocument(User user, SupportingDocument supportingDocument) throws MacawException
updateSupportingDocument
in interface MacawCurationAPI
MacawException
public void deleteSupportingDocuments(User user, java.util.ArrayList<SupportingDocument> supportingDocuments) throws MacawException
deleteSupportingDocuments
in interface MacawCurationAPI
MacawException
public int getSupportingDocumentIdentifier(User user, SupportingDocument supportingDocument) throws MacawException
getSupportingDocumentIdentifier
in interface MacawCurationAPI
MacawException
public void associateSupportingDocumentsWithVariable(User user, Variable variable, java.util.ArrayList<SupportingDocument> supportingDocuments) throws MacawException
associateSupportingDocumentsWithVariable
in interface MacawCurationAPI
MacawException
public void disassociateSupportingDocumentsFromVariable(User user, Variable variable, java.util.ArrayList<SupportingDocument> supportingDocuments) throws MacawException
disassociateSupportingDocumentsFromVariable
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<Variable> getSourceVariables(User user, DerivedVariable derivedVariable) throws MacawException
getSourceVariables
in interface MacawCurationAPI
MacawException
public void associateSourceVariables(User user, DerivedVariable derivedVariable, java.util.ArrayList<Variable> sourceVariablesToAdd) throws MacawException
associateSourceVariables
in interface MacawCurationAPI
MacawException
public void disassociateSourceVariables(User user, DerivedVariable derivedVariable, java.util.ArrayList<Variable> sourceVariablesToDelete) throws MacawException
MacawCurationAPI
RawVariable
or DerivedVariable
variables that
were used to create a given derivedVariable
disassociateSourceVariables
in interface MacawCurationAPI
derivedVariable
- contains source variables to deletesourceVariablesToDelete
- the raw or derived variables that should no longer be associated with derivedVariable
.
MacawException
public java.lang.String[] getStudyYears(User user) throws MacawException
MacawCurationAPI
getStudyYears
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<VariableSummary> getSummaryDataForAllVariables(User user) throws MacawException
MacawCurationAPI
RawVariable
s and DerivedVariable
. Note
that only summary data are included:
getSummaryDataForAllVariables
in interface MacawCurationAPI
MacawException
public Variable getCompleteVariableData(User user, VariableSummary variableSummary) throws MacawException
getCompleteVariableData
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<Category> getCategories(User user) throws MacawException
getCategories
in interface MacawCurationAPI
MacawException
public void addCategory(User user, Category category) throws MacawException
addCategory
in interface MacawCurationAPI
MacawException
public void updateCategory(User user, Category category) throws MacawException
updateCategory
in interface MacawCurationAPI
MacawException
public void deleteCategories(User user, java.util.ArrayList<Category> categories) throws MacawException
deleteCategories
in interface MacawCurationAPI
MacawException
public int getCategoryIdentifier(User user, Variable variable, Category category) throws MacawException
getCategoryIdentifier
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<AliasFilePath> getAliasFilePaths(User user) throws MacawException
getAliasFilePaths
in interface MacawCurationAPI
MacawException
public void addAliasFilePath(User user, AliasFilePath aliasFilePath) throws MacawException
addAliasFilePath
in interface MacawCurationAPI
MacawException
public void updateAliasFilePath(User user, AliasFilePath aliasFilePath) throws MacawException
updateAliasFilePath
in interface MacawCurationAPI
MacawException
public void deleteAliasFilePaths(User user, java.util.ArrayList<AliasFilePath> aliasFilePaths) throws MacawException
deleteAliasFilePaths
in interface MacawCurationAPI
MacawException
public int getAliasFilePathIdentifier(User user, Variable variable, AliasFilePath aliasFilePath) throws MacawException
getAliasFilePathIdentifier
in interface MacawCurationAPI
MacawException
public java.lang.String getFilePathFromAlias(User user, java.lang.String currentAlias) throws MacawException
getFilePathFromAlias
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<CleaningState> getCleaningStates(User user) throws MacawException
getCleaningStates
in interface MacawCurationAPI
MacawException
public void addCleaningState(User user, CleaningState cleaningState) throws MacawException
addCleaningState
in interface MacawCurationAPI
MacawException
public void updateCleaningState(User user, CleaningState cleaningState) throws MacawException
updateCleaningState
in interface MacawCurationAPI
MacawException
public void deleteCleaningStates(User user, java.util.ArrayList<CleaningState> cleaningStates) throws MacawException
deleteCleaningStates
in interface MacawCurationAPI
MacawException
public int getCleaningStateIdentifier(User user, Variable variable, CleaningState cleaningState) throws MacawException
getCleaningStateIdentifier
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<AvailabilityState> getAvailabilityStates(User user) throws MacawException
getAvailabilityStates
in interface MacawCurationAPI
MacawException
public void addAvailabilityState(User user, AvailabilityState availabilityState) throws MacawException
addAvailabilityState
in interface MacawCurationAPI
MacawException
public void updateAvailabilityState(User user, AvailabilityState availabilityState) throws MacawException
updateAvailabilityState
in interface MacawCurationAPI
MacawException
public void deleteAvailabilityStates(User user, java.util.ArrayList<AvailabilityState> availabilityStates) throws MacawException
deleteAvailabilityStates
in interface MacawCurationAPI
MacawException
public int getAvailabilityStateIdentifier(User user, Variable variable, AvailabilityState availabilityState) throws MacawException
getAvailabilityStateIdentifier
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<VariableSummary> filterVariableSummaries(User user, java.lang.String searchText, java.lang.String year, java.lang.String category, VariableTypeFilter variableTypeFilter) throws MacawException
filterVariableSummaries
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<SupportingDocument> filterSupportingDocuments(User user, java.lang.String documentTitle, java.lang.String documentCode) throws MacawException
filterSupportingDocuments
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<OntologyTerm> filterOntologyTerms(User user, java.lang.String term, java.lang.String description) throws MacawException
filterOntologyTerms
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<OntologyTerm> getAllOntologyTerms(User user) throws MacawException
getAllOntologyTerms
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<OntologyTerm> getOntologyTerms(User user, Variable variable) throws MacawException
getOntologyTerms
in interface MacawCurationAPI
MacawException
public void addOntologyTerm(User user, OntologyTerm ontologyTerm) throws MacawException
addOntologyTerm
in interface MacawCurationAPI
MacawException
public void updateOntologyTerm(User user, OntologyTerm ontologyTerm) throws MacawException
updateOntologyTerm
in interface MacawCurationAPI
MacawException
public void deleteOntologyTerms(User user, java.util.ArrayList<OntologyTerm> ontologyTermsToDelete) throws MacawException
deleteOntologyTerms
in interface MacawCurationAPI
MacawException
public int getOntologyTermIdentifier(User user, OntologyTerm ontologyTerm) throws MacawException
getOntologyTermIdentifier
in interface MacawCurationAPI
MacawException
public void associateOntologyTermsWithVariable(User user, Variable variable, java.util.ArrayList<OntologyTerm> ontologyTerms) throws MacawException
associateOntologyTermsWithVariable
in interface MacawCurationAPI
MacawException
public void disassociateOntologyTermsFromVariable(User user, Variable variable, java.util.ArrayList<OntologyTerm> ontologyTerms) throws MacawException
disassociateOntologyTermsFromVariable
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<MacawChangeEvent> getChangeHistoryForVariable(User user, Variable variable) throws MacawException
getChangeHistoryForVariable
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<MacawChangeEvent> getChangeHistoryForSupportingDocument(User user, SupportingDocument supportingDocument) throws MacawException
getChangeHistoryForSupportingDocument
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<MacawChangeEvent> getChangeHistoryForValueLabels(User user, Variable variable) throws MacawException
getChangeHistoryForValueLabels
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<MacawChangeEvent> getChangeHistoryForListChoices(User user) throws MacawException
getChangeHistoryForListChoices
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<MacawChangeEvent> getChangeHistoryByUser(User user) throws MacawException
getChangeHistoryByUser
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<User> getUsers(User admin) throws MacawException
getUsers
in interface MacawCurationAPI
MacawException
public void addUser(User admin, User user) throws MacawException
addUser
in interface MacawCurationAPI
MacawException
public void updateUser(User admin, User user) throws MacawException
updateUser
in interface MacawCurationAPI
MacawException
public void deleteUsers(User admin, java.util.ArrayList<User> usersToDelete) throws MacawException
deleteUsers
in interface MacawCurationAPI
MacawException
public int getUserIdentifier(User admin, User user) throws MacawException
getUserIdentifier
in interface MacawCurationAPI
MacawException
public void checkValidAdministrator(User admin) throws MacawException
checkValidAdministrator
in interface MacawCurationAPI
MacawException
public void clear(User admin) throws MacawException
clear
in interface MacawCurationAPI
MacawException
public void clearAllChanges(User admin) throws MacawException
clearAllChanges
in interface MacawCurationAPI
MacawException
public java.util.ArrayList<MacawChangeEvent> getAllChanges(User admin) throws MacawException
getAllChanges
in interface MacawCurationAPI
MacawException
public Variable getAlternativeVariable(User user, Variable targetVariable) throws MacawException
getAlternativeVariable
in interface MacawCurationAPI
MacawException
public void setAlternativeVariable(User user, Variable targetVariable, Variable alternativeVariable) throws MacawException
setAlternativeVariable
in interface MacawCurationAPI
MacawException
public void checkValidUser(User user) throws MacawException
checkValidUser
in interface MacawCurationAPI
MacawException
public int getNumberOfConnections()
public void initialiseConnection(java.sql.Connection connection) throws MacawException
MacawException
public void commitDatabaseChanges(java.sql.Connection connection) throws MacawException
MacawException
public void rollBack(java.sql.Connection connection) throws MacawException
MacawException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |