Skip to content

Commit 5efeaef

Browse files
per305per305
per305
authored and
per305
committed
Added Functional tests of Publication status requirement
1 parent 7a7286c commit 5efeaef

File tree

4 files changed

+55
-21
lines changed

4 files changed

+55
-21
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
projectId title description documentUrl Type
2-
712e7beb-a168-47c5-ad5b-8df3a5cdf454 Life history of the Critically Endangered largetooth sawfish: a compilation of data for population assessment and demographic modelling "The largetooth sawfish Pristis pristis is a Critically Endangered, once widespread shark-like ray. The species is now extinct or severely depleted in many former parts of its range and is protected in some other range states where populations persist. The likelihood of collecting substantial new biological information is now low. Here, we review all available life history information on size, age and growth, reproductive biology, and demography as a resource for population assessment and demographic modelling. We also revisit a subset of historical data from the 1970s to examine the maternal size?litter size relationship. All available information on life history is derived from the Indo-West Pacific (i.e. northern Australia) and the Western Atlantic (i.e. Lake Nicaragua-R�o San Juan system in Central America) subpopulations. P. pristis reaches a maximum size of at least 705 cm total length (TL), size-at-birth is 72?90 cm TL, female size-at-maturity is reached by 300 cm TL, male size-at-maturity is 280?300 cm TL, age-at-maturity is 8?10 yr, longevity is 30?36 yr, litter size range is 1?20 (mean of 7.3 in Lake Nicaragua), and reproductive periodicity is suspected to be biennial in Lake Nicaragua (Western Atlantic) but annual in Australia (Indo-West Pacific). There was a weak relationship between litter size and maternal size in Lake Nicaragua, and lifetime reproductive output for an individual female from Lake Nicaragua was estimated as 73 pups. Future demographic models should aim to capture the variability and uncertainty in life history parameters for P. pristis and we encourage a conservative approach to any application for conservation and management." https://www.nespmarine.edu.au/system/files/Kyne et al_Life history of the Critically Endangered largetooth sawfish_2021_OPEN.pdf Document
1+
hub_name projectId title description documentUrl type citation keywords
2+
marine 05a22be2-db9d-4c9c-9b1a-014a31e3adc6 Life history of the Critically Endangered largetooth sawfish: a compilation of data for population assessment and demographic modelling "The largetooth sawfish Pristis pristis is a Critically Endangered, once widespread shark-like ray. The species is now extinct or severely depleted in many former parts of its range and is protected in some other range states where populations persist. The likelihood of collecting substantial new biological information is now low. Here, we review all available life history information on size, age and growth, reproductive biology, and demography as a resource for population assessment and demographic modelling. We also revisit a subset of historical data from the 1970s to examine the maternal size?litter size relationship. All available information on life history is derived from the Indo-West Pacific (i.e. northern Australia) and the Western Atlantic (i.e. Lake Nicaragua-R�o San Juan system in Central America) subpopulations. P. pristis reaches a maximum size of at least 705 cm total length (TL), size-at-birth is 72?90 cm TL, female size-at-maturity is reached by 300 cm TL, male size-at-maturity is 280?300 cm TL, age-at-maturity is 8?10 yr, longevity is 30?36 yr, litter size range is 1?20 (mean of 7.3 in Lake Nicaragua), and reproductive periodicity is suspected to be biennial in Lake Nicaragua (Western Atlantic) but annual in Australia (Indo-West Pacific). There was a weak relationship between litter size and maternal size in Lake Nicaragua, and lifetime reproductive output for an individual female from Lake Nicaragua was estimated as 73 pups. Future demographic models should aim to capture the variability and uncertainty in life history parameters for P. pristis and we encourage a conservative approach to any application for conservation and management." https://www.nespmarine.edu.au/system/files/Kyne et al_Life history of the Critically Endangered largetooth sawfish_2021_OPEN.pdf Documents "Bi D, Dix M, Marsland S,�O'Farrell S, Sullivan A, Bodman R, Law� R, Harman I, Srbinovsky J, Rashid� H, Dobrohotoff, Mackallah C, Yan H, Hirst A, Savita A, Dias F, Woodhouse M, FiedlerR and Heerdegen A. 2020. Configuration and spin-up of ACCESS-CM2, the new generation Australian Community Climate and Earth System Simulator Coupled Model,�Journal of Southern Hemisphere Earth Systems Science, 70 (1), doi: 10.1071/ES19040 " "ACCESS-CM2, climate change, climate simulation, CMIP6, coupled climate model, evaluation, greenhouse gases, physical configuration, preindustrial spin-up, tuning and debugging"

scripts/RestClient/nesp/marineArtefacts/document.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
var document =
32
{
43
"labels" : [ ],

scripts/RestClient/nesp/marineArtefacts/documentImport.js

+52-18
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
//document upload script
22
var path = '';
33
load(path + "document.js")
4-
load(path+'uuid.js');
4+
load(path + 'uuid.js');
55

66
print("Loaded all dependent files...");
77

8-
var projectId = 0;
8+
var hub_name = 0;
9+
var projectId = hub_name + 1;
910
var title = projectId + 1;
1011
var description = title + 1;
1112
var documentUrl = description + 1;
13+
var type = documentUrl + 1;
14+
var citation = type + 1;
15+
var keywords = citation + 1;
1216

1317
var csvData = cat(path+'NESP_MARINE_ARTEFACTS_FOR_TEST.txt');
1418
print("Loaded csv file");
1519
var csvRows = csvData.split('\r');
1620
print("Total rows "+ csvRows.length);
1721

18-
for(var i = 1; i < csvRows.length; i++) {
22+
for(var i = 3; i < 4; i++) {
1923
print("PRINT "+csvRows.length)
2024

2125
var row = csvRows[i];
@@ -29,16 +33,8 @@ for(var i = 1; i < csvRows.length; i++) {
2933
document.filename = ""
3034
document.contentType = ""
3135

32-
if (fields[description]) {
33-
if (fields[description].indexOf(',') != -1) {
34-
print("CHECKING DESC" + fields[description])
35-
var tempDescription = fields[description].replace(/""/g, '"');
36-
document.description = tempDescription.substring(1, tempDescription.length - 1);
37-
}
38-
else {
39-
document.description = fields[description]
40-
}
41-
}
36+
//When there are commas, tsv adds double quotes in the beginning and end of text, following string
37+
//manipulations are done to avoid that
4238

4339
if (fields[title]) {
4440
if (fields[title].indexOf(',') != -1) {
@@ -50,6 +46,16 @@ for(var i = 1; i < csvRows.length; i++) {
5046
}
5147
}
5248

49+
if (fields[description]) {
50+
if (fields[description].indexOf(',') != -1) {
51+
var tempDescription = fields[description].replace(/""/g, '"');
52+
document.description = tempDescription.substring(1, tempDescription.length - 1);
53+
}
54+
else {
55+
document.description = fields[description]
56+
}
57+
}
58+
5359
if (fields[documentUrl]) {
5460
var docUrl = fields[documentUrl]
5561
var urlSplitBySlash = docUrl.split('/')
@@ -67,9 +73,35 @@ for(var i = 1; i < csvRows.length; i++) {
6773
document.contentType = contentType
6874
}
6975

70-
print("PROJECT ID: " + document.projectId)
71-
print("DOCUMENT ID: " + document.documentId)
72-
print("FILE NAME: " + document.filename)
76+
if (fields[type]) {
77+
if (fields[type].indexOf(',') != -1) {
78+
var tempType = fields[type];
79+
document.type = tempType.substring(1, tempType.length - 1);
80+
}
81+
else {
82+
document.type = fields[type]
83+
}
84+
}
85+
86+
if (fields[citation]) {
87+
if (fields[citation].indexOf(',') != -1) {
88+
var tempCitation = fields[citation];
89+
document.citation = tempCitation.substring(1, tempCitation.length - 1);
90+
}
91+
else {
92+
document.citation = fields[citation]
93+
}
94+
}
95+
96+
if (fields[keywords]) {
97+
if (fields[keywords].indexOf(',') != -1) {
98+
var tempKeywords = fields[keywords];
99+
document.keywords = tempKeywords.substring(1, tempKeywords.length - 1);
100+
}
101+
else {
102+
document.keywords = fields[keywords]
103+
}
104+
}
73105

74106
var today = new ISODate();
75107
var dd = today.getDate();
@@ -82,10 +114,12 @@ for(var i = 1; i < csvRows.length; i++) {
82114

83115
var documentResult = db.document.insert(document);
84116

117+
print("PROJECT ID: " + document.projectId)
118+
print("DOCUMENT ID: " + document.documentId)
119+
print("FILE NAME: " + document.filename)
85120
print("documentResult " + documentResult)
86121
}
87122
}
88123

89-
//print(">>>>>>>>>>>>>>>>>>>>")
90-
print("Created " + (i-1) + " projects");
124+
print("Created " + (i-1) + " documents");
91125
print("<<<<<<<<<<<<<<<<<<<")

scripts/RestClient/nesp/marineArtefacts/uuid.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//uuid generation script
12
/**
23
* UUID.js: The RFC-compliant UUID generator for JavaScript.
34
*

0 commit comments

Comments
 (0)