|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MacawCurationAPI
Macaw is a data curation application that stores and retrieves its data via methods of this interface. MacawCurationAPI is designed to hide much of the details about data persistence from the GUI code.
Parameters for many of the API methods come from data container classes that are defined in the Macaw Data Model. The concepts
such as Variable
, RawVariable
, DerivedVariable
, Category
, and ValueLabel
represent ideas related to the domain
addressed by the NSHD archive. The application packages form data into instances of these classes and submits them to an implementation
of MacawDatabase.
Macaw anticipates three main implementations:
ProductionCurationService
DemonstrationCurationService
ProductionCurationService
will be the SQL database that holds the data about all NSHD variables that will
be advertised using SWIFT. A Test SQL database will be created which uses the same relational schema but the records
it contains will be designed to provide a minimal test data set that can be used in automated testing
efforts.
The API has been designed to anticipate key operations that would be involved with retrieving or committing
changes to a relational database. However, the abstraction is also designed to permit the development of a DemonstrationCurationService
that is managed entirely in-memory using collections of data objects instantiated from the Application Model.
The 'database' is designed to hold a minimal number of records that can demonstrate to domain users the features
provided by Macaw. The in-memory database is used to allow the LHA to run a demonstration version of
the application on a memory stick without the need for MySQL to be installed on a client machine and without relying
on a database filled with sensitive data about case studies.
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> supportingDocument)
|
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> 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> 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 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)
|
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)
|
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)
|
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 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)
|
Method Detail |
---|
void addRawVariable(User user, RawVariable rawVariable) throws MacawException
MacawException
void deleteRawVariables(User user, java.util.ArrayList<RawVariable> rawVariables) throws MacawException
MacawException
void updateRawVariable(User user, RawVariable rawVariable) throws MacawException
MacawException
int getRawVariableIdentifier(User user, RawVariable rawVariable) throws MacawException
MacawException
void addDerivedVariable(User user, DerivedVariable derivedVariable) throws MacawException
MacawException
void deleteDerivedVariables(User user, java.util.ArrayList<DerivedVariable> derivedVariables) throws MacawException
MacawException
void updateDerivedVariable(User user, DerivedVariable derivedVariable) throws MacawException
MacawException
int getDerivedVariableIdentifier(User user, DerivedVariable derivedVariable) throws MacawException
MacawException
Variable getVariable(User user, java.lang.String variableName) throws MacawException
MacawException
java.util.ArrayList<ValueLabel> getValueLabels(User user, Variable variable) throws MacawException
MacawException
void addValueLabels(User user, Variable variable, java.util.ArrayList<ValueLabel> valueLabels) throws MacawException
MacawException
void updateValueLabels(User user, Variable variable, java.util.ArrayList<ValueLabel> valueLabels) throws MacawException
MacawException
void deleteValueLabels(User user, Variable variable, java.util.ArrayList<ValueLabel> valueLabels) throws MacawException
MacawException
int getValueLabelIdentifier(User user, Variable variable, ValueLabel valueLabel) throws MacawException
MacawException
java.util.ArrayList<SupportingDocument> getAllSupportingDocuments(User user) throws MacawException
MacawException
java.util.ArrayList<SupportingDocument> getSupportingDocuments(User user, Variable variable) throws MacawException
MacawException
void addSupportingDocument(User user, SupportingDocument supportingDocument) throws MacawException
MacawException
void updateSupportingDocument(User user, SupportingDocument supportingDocument) throws MacawException
MacawException
void deleteSupportingDocuments(User user, java.util.ArrayList<SupportingDocument> supportingDocuments) throws MacawException
MacawException
int getSupportingDocumentIdentifier(User user, SupportingDocument supportingDocument) throws MacawException
MacawException
void associateSupportingDocumentsWithVariable(User user, Variable variable, java.util.ArrayList<SupportingDocument> supportingDocument) throws MacawException
MacawException
void disassociateSupportingDocumentsFromVariable(User user, Variable variable, java.util.ArrayList<SupportingDocument> supportingDocuments) throws MacawException
MacawException
java.util.ArrayList<Variable> getSourceVariables(User user, DerivedVariable derivedVariable) throws MacawException
MacawException
void associateSourceVariables(User user, DerivedVariable derivedVariable, java.util.ArrayList<Variable> sourceVariablesToAdd) throws MacawException
MacawException
void disassociateSourceVariables(User user, DerivedVariable derivedVariable, java.util.ArrayList<Variable> sourceVariablesToDelete) throws MacawException
RawVariable
or DerivedVariable
variables that
were used to create a given derivedVariable
user
- derivedVariable
- contains source variables to deletesourceVariablesToDelete
- the raw or derived variables that should no longer be associated with derivedVariable
.
MacawException
java.lang.String[] getStudyYears(User user) throws MacawException
user
-
MacawException
java.util.ArrayList<VariableSummary> getSummaryDataForAllVariables(User user) throws MacawException
RawVariable
s and DerivedVariable
. Note
that only summary data are included:
user
-
MacawException
Variable getCompleteVariableData(User user, VariableSummary variableSummary) throws MacawException
MacawException
java.util.ArrayList<VariableSummary> filterVariableSummaries(User user, java.lang.String searchText, java.lang.String year, java.lang.String category, VariableTypeFilter variableTypeFilter) throws MacawException
MacawException
java.util.ArrayList<SupportingDocument> filterSupportingDocuments(User user, java.lang.String documentTitle, java.lang.String documentCode) throws MacawException
MacawException
java.util.ArrayList<OntologyTerm> filterOntologyTerms(User user, java.lang.String term, java.lang.String description) throws MacawException
MacawException
java.util.ArrayList<Category> getCategories(User user) throws MacawException
user
-
MacawException
void addCategory(User user, Category category) throws MacawException
MacawException
void updateCategory(User user, Category category) throws MacawException
MacawException
void deleteCategories(User user, java.util.ArrayList<Category> categories) throws MacawException
MacawException
int getCategoryIdentifier(User user, Variable variable, Category category) throws MacawException
MacawException
java.util.ArrayList<CleaningState> getCleaningStates(User user) throws MacawException
MacawException
void addCleaningState(User user, CleaningState cleaningState) throws MacawException
MacawException
void updateCleaningState(User user, CleaningState cleaningState) throws MacawException
MacawException
void deleteCleaningStates(User user, java.util.ArrayList<CleaningState> cleaningStates) throws MacawException
MacawException
int getCleaningStateIdentifier(User user, Variable variable, CleaningState cleaningState) throws MacawException
MacawException
java.util.ArrayList<AvailabilityState> getAvailabilityStates(User user) throws MacawException
MacawException
void addAvailabilityState(User user, AvailabilityState availabilityState) throws MacawException
MacawException
void updateAvailabilityState(User user, AvailabilityState availabilityState) throws MacawException
MacawException
void deleteAvailabilityStates(User user, java.util.ArrayList<AvailabilityState> availabilityStates) throws MacawException
MacawException
int getAvailabilityStateIdentifier(User user, Variable variable, AvailabilityState availabilityState) throws MacawException
MacawException
java.util.ArrayList<AliasFilePath> getAliasFilePaths(User user) throws MacawException
MacawException
void addAliasFilePath(User user, AliasFilePath aliasFilePath) throws MacawException
MacawException
void updateAliasFilePath(User user, AliasFilePath aliasFilePath) throws MacawException
MacawException
void deleteAliasFilePaths(User user, java.util.ArrayList<AliasFilePath> aliasFilePaths) throws MacawException
MacawException
int getAliasFilePathIdentifier(User user, Variable variable, AliasFilePath aliasFilePath) throws MacawException
MacawException
java.lang.String getFilePathFromAlias(User user, java.lang.String currentAlias) throws MacawException
MacawException
java.util.ArrayList<OntologyTerm> getAllOntologyTerms(User user) throws MacawException
MacawException
java.util.ArrayList<OntologyTerm> getOntologyTerms(User user, Variable variable) throws MacawException
MacawException
void addOntologyTerm(User user, OntologyTerm ontologyTerm) throws MacawException
MacawException
void updateOntologyTerm(User user, OntologyTerm ontologyTerm) throws MacawException
MacawException
void deleteOntologyTerms(User user, java.util.ArrayList<OntologyTerm> ontologyTerms) throws MacawException
MacawException
int getOntologyTermIdentifier(User user, OntologyTerm ontologyTerm) throws MacawException
MacawException
void associateOntologyTermsWithVariable(User user, Variable variable, java.util.ArrayList<OntologyTerm> ontologyTerms) throws MacawException
MacawException
void disassociateOntologyTermsFromVariable(User user, Variable variable, java.util.ArrayList<OntologyTerm> ontologyTerms) throws MacawException
MacawException
java.util.ArrayList<MacawChangeEvent> getChangeHistoryForVariable(User user, Variable variable) throws MacawException
MacawException
java.util.ArrayList<MacawChangeEvent> getChangeHistoryForSupportingDocument(User user, SupportingDocument supportingDocument) throws MacawException
MacawException
java.util.ArrayList<MacawChangeEvent> getChangeHistoryForValueLabels(User user, Variable variable) throws MacawException
MacawException
java.util.ArrayList<MacawChangeEvent> getChangeHistoryForListChoices(User user) throws MacawException
MacawException
java.util.ArrayList<MacawChangeEvent> getChangeHistoryByUser(User user) throws MacawException
MacawException
java.util.ArrayList<User> getUsers(User admin) throws MacawException
MacawException
void addUser(User admin, User user) throws MacawException
MacawException
void updateUser(User admin, User user) throws MacawException
MacawException
void deleteUsers(User admin, java.util.ArrayList<User> usersToDelete) throws MacawException
MacawException
int getUserIdentifier(User admin, User user) throws MacawException
MacawException
void checkValidUser(User user) throws MacawException
MacawException
void checkValidAdministrator(User administrator) throws MacawException
MacawException
void clear(User admin) throws MacawException
MacawException
void clearAllChanges(User admin) throws MacawException
MacawException
java.util.ArrayList<MacawChangeEvent> getAllChanges(User admin) throws MacawException
MacawException
Variable getOriginalVariable(User user, Variable variable) throws MacawException
MacawException
Variable getAlternativeVariable(User user, Variable targetVariable) throws MacawException
MacawException
void setAlternativeVariable(User user, Variable targetVariable, Variable alternativeVariable) throws MacawException
MacawException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |