Helper funcitons to interacting with collectory for entities like temp data resource and data resource.
| Type | Name and description |
|---|---|
java.lang.String |
COLLECTIONS_BASE_URL |
static java.util.List |
COMMON_FIELDS_DR_DRT |
static java.lang.String |
DEFAULT_API_KEY_HEADER |
static java.util.List |
REQUIRED_FIELDS |
static java.util.List |
TEMP_DATA_RESROUCE_STATUSES |
static java.lang.String |
USER_HEADER |
au.org.ala.web.AuthService |
authService |
CollectoryHubJenkinsService |
collectoryHubJenkinsService |
CollectoryHubService |
collectoryHubService |
java.lang.Object |
grailsApplication |
au.org.ala.ws.service.WebService |
webService |
| Type Params | Return Type | Name and description |
|---|---|---|
|
java.util.Map |
addLicenseAndVersion(java.util.Map dr, java.lang.String license)map license from temp data resource to license in data resource |
|
java.util.Map |
checkIfMandatoryFieldsAreFilled(java.util.Map drt)Checks if required fields are filled by owner of temp data resource. |
|
java.util.Map |
cleanTempDateResource(java.util.Map tempMeta)Make properties more human friendly |
|
java.util.Map |
convertTempDataResourceToDataResource(java.util.Map drt)Map temp data resource properties to data resource properties |
|
java.util.Map |
createContact(java.util.Map props)Create contact details for a user |
|
java.util.Map |
createContactMap(java.lang.String alaId)Map details of contact from userdetails system to collectory compatible format. |
|
java.util.List |
createOrSaveDataResource(java.lang.String uid)Create or update a data resource for a uid |
|
java.util.Map |
createOrSaveDataResource(java.lang.String uid, java.util.Map dr)Create or update a data resource. |
|
java.lang.Object |
createOrUpdateContactForEntity(java.lang.String entity, java.lang.String uid, java.lang.Integer contactId)create a relationship between a contact and an entity |
|
java.util.Map |
declineTempDataResource(java.lang.String uid)Decline a data resource. |
|
void |
deleteAnEntity(java.lang.String entity, java.lang.String uid)An function which will delete an entity on collectory |
|
java.util.Map |
deleteDataResource(java.lang.String uid)delete a data resource |
|
java.util.Map |
deleteTempDataResource(java.lang.String uid)delete a data resource |
|
java.util.Map |
draftTempDataResource(java.lang.String uid)Set status of a data resource to draft. |
|
java.util.Map |
getContact(java.lang.String email)Get contact details of a user. |
|
java.util.Map |
getDataResource(java.lang.String id)get data resource id details and contact person details |
|
java.util.List |
getDataResources(java.lang.String context)get all data resource id details satisfying a query condition. |
|
java.util.List |
getDataResourcesFromCollectory(java.lang.String url)get detials of all data resource ids in collectory |
|
java.lang.String |
getDateAndTimeFromTimeStamp(java.lang.String timestamp)convert a timestamp to human recognizable format |
|
java.util.List |
getFilteredDataResources(java.lang.String query, java.lang.String source)Query data resource name and return a list of matching data resource ids |
|
java.util.Map |
getInstitution(java.lang.String id)get institution details and contact person details. |
|
java.util.Map |
getListOfTempDataResource(java.lang.String userId, java.lang.String max = 10, java.lang.String offset = 0, java.lang.String status = '', java.lang.String sortField = 'lastUpdated', java.lang.String sortOrder = 'desc')Get all temp data resource for a user. |
|
java.lang.Integer |
getOrCreateContact(java.lang.String email, java.lang.String alaId)get a user's contact id. |
|
java.util.Map |
getTempDataResource(java.lang.String uid)Get metadata of a temp data resource and append system metadata to it |
|
java.util.Map |
getTempDataResourceFromCollectory(java.lang.String uid)Get metadata for a temp data resource from collectory |
|
java.util.Map |
getUserUploads(java.lang.String currentUserId, java.lang.String webserviceUrl = '', java.lang.String max = 10, java.lang.String offset = 0, java.lang.String status = '', java.lang.String sortField = 'lastUpdated', java.lang.String sortOrder = 'desc')Retrieves a listing of uploads for this user. |
|
java.lang.Object |
init() |
|
java.lang.Boolean |
isDataSubmittedForTempDataResource(java.lang.String uid)check if data file is present for a given temp data resource |
|
java.util.Map |
loadToProduction(java.lang.String uid, java.lang.Boolean indexing)Load a temp data resource to production. |
|
java.util.Map |
preFillSystemDetails(java.util.Map tempMeta)Pre-fill temp metadata with user name, links to resources etc |
|
java.util.Map |
resetStatus(java.lang.String uid)Set status of a dataset to draft |
|
java.util.Map |
saveTempDataResource(java.util.Map data, java.lang.String uid)Save temp data resource metadata on collectory. |
|
java.util.Map |
submitTempDataResourceForReview(java.lang.String uid)Submit a user uploaded dataset for review. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
map license from temp data resource to license in data resource
Checks if required fields are filled by owner of temp data resource. It returns appropriate message according to fields failing the mandatory condition
drt - - java.util.Map - temp data resource fieldsMake properties more human friendly
tempMeta - - drt mapMap temp data resource properties to data resource properties
Create contact details for a user
props - - contains properties like email, first name, fax number etc.Map details of contact from userdetails system to collectory compatible format.
Create or update a data resource for a uid
uid - - drt idCreate or update a data resource. If uid is passed, then function will update data resource. Otherwise, create a new data resource
uid - - dr iddr - - data resource fieldscreate a relationship between a contact and an entity
Decline a data resource. This function will update status of data resource.
uid - - drt idAn function which will delete an entity on collectory
delete a data resource
delete a data resource
Set status of a data resource to draft.
uid - - drt idGet contact details of a user.
email - - email addressget data resource id details and contact person details
id - - data resource idget all data resource id details satisfying a query condition.
context - - all, hub - all corresponds to all data in ALA and hub for a particular hub config eg. MDBA hubget detials of all data resource ids in collectory
convert a timestamp to human recognizable format
Query data resource name and return a list of matching data resource ids
get institution details and contact person details.
Get all temp data resource for a user.
userId - - ala idget a user's contact id. If user does not exist, create one.
Get metadata of a temp data resource and append system metadata to it
uid - - drt1Get metadata for a temp data resource from collectory
Retrieves a listing of uploads for this user.
check if data file is present for a given temp data resource
uid - - drt idLoad a temp data resource to production.
Pre-fill temp metadata with user name, links to resources etc
Set status of a dataset to draft
uid - - drt idSave temp data resource metadata on collectory.
Submit a user uploaded dataset for review.