Browse Source

Organizing files

master
ddangelorb 3 years ago
parent
commit
98cfaa4472
  1. 3
      db/1.wpd.sys_config.sql
  2. 13
      db/wp6.sample.capabilities-api.json
  3. 39
      db/wp6.sample.forms-fields-answers.json
  4. 21
      db/wp6.sample.pluviometer-api.json
  5. 31
      db/wp6.sample.pluviometer-forms-api.json
  6. 68
      db/wp6.sample.pluviometer-modal-api.json
  7. 37
      db/wp6.sample.pluviometer-register-api.json
  8. BIN
      db/wpd.erd.pdf

3
db/1.wpd.sys_config.sql

@ -1,6 +1,7 @@
DO $$ DO $$
BEGIN BEGIN
INSERT INTO users(email, firstname, surname, active) VALUES ('admin@wpd.com', 'admin', 'wpd', 1);
INSERT INTO roles(name, active) VALUES ('ROLE_ADMIN', 1);
INSERT INTO roles(name, active) VALUES ('ROLE_CLIENT', 1);
INSERT INTO formsorigins(id, name, active) VALUES (DEFAULT, 'OFICIAL', 1); INSERT INTO formsorigins(id, name, active) VALUES (DEFAULT, 'OFICIAL', 1);
INSERT INTO formsorigins(id, name, active) VALUES (DEFAULT, 'WP6.MobileApp', 1); INSERT INTO formsorigins(id, name, active) VALUES (DEFAULT, 'WP6.MobileApp', 1);

13
db/wp6.sample.floodzones-river-rain-api.json → db/wp6.sample.capabilities-api.json

@ -1,6 +1,5 @@
JSON intended to get all forms JSON intended to get all forms
https: //waterproofing.geog.uni-heidelberg.de/api/hot/capability
{ {
"responseTimestamp": "2021-08-05T19:23:50.126Z", "responseTimestamp": "2021-08-05T19:23:50.126Z",
"responseData": { "responseData": {
@ -25,16 +24,16 @@ JSON intended to get all forms
"name": "Pluviometers", "name": "Pluviometers",
"description": "Pluviometers Form" "description": "Pluviometers Form"
}, },
{
{
"code": "RAIN_FORM", "code": "RAIN_FORM",
"name": "Rain", "name": "Rain",
"description": "Rain zones Form" "description": "Rain zones Form"
},
{
},
{
"code": "RIVERFLOOD_FORM", "code": "RIVERFLOOD_FORM",
"name": "River Flood", "name": "River Flood",
"description": "River Flood Form" "description": "River Flood Form"
},
},
{ {
"code": "PLUVIOMETERS_REGISTRATION", "code": "PLUVIOMETERS_REGISTRATION",
"name": "Pluviometer registration", "name": "Pluviometer registration",
@ -43,4 +42,4 @@ JSON intended to get all forms
] ]
}, },
"success": true "success": true
}
}

39
db/wp6.sample.forms-fields-answers.json

@ -1,21 +1,24 @@
This example for floodzones also applies for river and rain. All fields are equal. This example for floodzones also applies for river and rain. All fields are equal.
ws: //waterproofing.geog.uni-heidelberg.de/wss/hot/data?type=FLOODZONES_FORM
{ {
"responseData": {
"array_to_json": [{
"formcode": "FLOODZONES_FORM",
"formsanswersuserinformer": "admin@wpd.com",
"filds": [{
"fieldsanswerssituation": "intransitavel",
"fieldsanswerslatitude": 4.750550953715424,
"fieldsanswerslongitude": -74.1179903701844,
"fieldsanswerseventaddress": "Rua dos bobos, 81",
"fieldsanswerseventdate": "11-08-2021",
"fieldsanswerseventtime": "21:52",
"fielsanswercomment": "users description about the current event",
"fieldsanswerimages": "base64"
}]
}]
"responseData": {
"array_to_json": [
{
"formcode": "FLOODZONES_FORM",
"formsanswersuserinformer": "admin@wpd.com",
"filds": [
{
"fieldsanswerssituation": "intransitavel",
"fieldsanswerslatitude": 4.750550953715424,
"fieldsanswerslongitude": -74.1179903701844,
"fieldsanswerseventaddress": "Rua dos bobos, 81",
"fieldsanswerseventdate": "11-08-2021",
"fieldsanswerseventtime": "21:52",
"fielsanswercomment": "users description about the current event",
"fieldsanswerimages": "base64"
}
]
}
]
} }
}
}

21
db/wp6.sample.pluviometer-api.json

@ -1,18 +1,19 @@
JSON intended to display pluviometer icons on map JSON intended to display pluviometer icons on map
ws: //waterproofing.geog.uni-heidelberg.de/wss/hot/data?type=PLUVIOMETERS_FORM
{ {
"responseData": { "responseData": {
"array_to_json": [{
"formcode": "PLUVIOMETERS_FORM",
"formsanswersuserinformer": "admin@wpd.com",
"fieldsanswerslatitude": 4.750550953715424,
"fieldsanswerslongitude": -74.1179903701844
},
"array_to_json": [
{
"formcode": "PLUVIOMETERS_FORM",
"formsanswersuserinformer": "admin@wpd.com",
"fieldsanswerslatitude": 4.750550953715424,
"fieldsanswerslongitude": -74.1179903701844
},
"formcode": "PLUVIOMETERS_FORM", "formcode": "PLUVIOMETERS_FORM",
"formsanswersuserinformer": "admin222@wpd.com", "formsanswersuserinformer": "admin222@wpd.com",
"fieldsanswerslatitude": 4.23876482872188, "fieldsanswerslatitude": 4.23876482872188,
"fieldsanswerslongitude": -79.1179903701844 "fieldsanswerslongitude": -79.1179903701844
}]
}
}
]
} }
}

31
db/wp6.sample.pluviometer-forms-api.json

@ -1,18 +1,21 @@
JSON intended to insert pluviometer forms data into datalake JSON intended to insert pluviometer forms data into datalake
ws: //waterproofing.geog.uni-heidelberg.de/wss/hot/data?type=PLUVIOMETERS_FORM
{ {
"responseData": { "responseData": {
"array_to_json": [{
"formcode": "PLUVIOMETERS_FORM",
"formsanswersuserinformer": "admin@wpd.com",
"fias": [{
"fieldsanswersdate": "11/02",
"fieldsanswersrainamount": 5,
"fieldsanswerseventtime": "21:52",
"fielsanswerimages" : "base64",
"fielsanswercomment": "users description about the current event"
}]
}]
"array_to_json": [
{
"formcode": "PLUVIOMETERS_FORM",
"formsanswersuserinformer": "admin@wpd.com",
"fias": [
{
"fieldsanswersdate": "11/02",
"fieldsanswersrainamount": 5,
"fieldsanswerseventtime": "21:52",
"fielsanswerimages": "base64",
"fielsanswercomment": "users description about the current event"
}
]
}
]
} }
}
}

68
db/wp6.sample.pluviometer-modal-api.json

@ -1,27 +1,51 @@
JSON intended to display pluviometer data on modal JSON intended to display pluviometer data on modal
ws: //waterproofing.geog.uni-heidelberg.de/wss/hot/data?type=PLUVIOMETERS_FORM
{ {
"responseData": { "responseData": {
"array_to_json": [{
"formcode": "PLUVIOMETERS_FORM",
"formsanswersuserinformer": "admin@wpd.com",
"fias": [{
"username" : "Fulano",
"userrole" : "Professor",
"institutionname": "E.E. Vicente Leporace",
"address" : "Rua Nassau",
"images" : "base64",
"pluviometerformsanswers" : [
{"fieldsanswersdate": "11/02", "fieldsanswersrainamount": 5},
{"fieldsanswersdate": "10/02", "fieldsanswersrainamount": 5},
{"fieldsanswersdate": "9/02", "fieldsanswersrainamount": 5},
{"fieldsanswersdate": "8/02", "fieldsanswersrainamount": 5},
{"fieldsanswersdate": "7/02", "fieldsanswersrainamount": 5},
{"fieldsanswersdate": "6/02", "fieldsanswersrainamount": 5},
{"fieldsanswersdate": "2/02", "fieldsanswersrainamount": 5}
"array_to_json": [
{
"formcode": "PLUVIOMETERS_FORM",
"formsanswersuserinformer": "admin@wpd.com",
"fias": [
{
"username": "Fulano",
"userrole": "Professor",
"institutionname": "E.E. Vicente Leporace",
"address": "Rua Nassau",
"images": "base64",
"pluviometerformsanswers": [
{
"fieldsanswersdate": "11/02",
"fieldsanswersrainamount": 5
},
{
"fieldsanswersdate": "10/02",
"fieldsanswersrainamount": 5
},
{
"fieldsanswersdate": "9/02",
"fieldsanswersrainamount": 5
},
{
"fieldsanswersdate": "8/02",
"fieldsanswersrainamount": 5
},
{
"fieldsanswersdate": "7/02",
"fieldsanswersrainamount": 5
},
{
"fieldsanswersdate": "6/02",
"fieldsanswersrainamount": 5
},
{
"fieldsanswersdate": "2/02",
"fieldsanswersrainamount": 5
}
]
}
] ]
}]
}]
}
]
} }
}
}

37
db/wp6.sample.pluviometer-register-api.json

@ -1,20 +1,23 @@
This JSON is used to insert Pluviometer data into datalake This JSON is used to insert Pluviometer data into datalake
ws: //waterproofing.geog.uni-heidelberg.de/wss/hot/data?type=PLUVIOMETERS_REGISTRATION
{ {
"responseData": {
"array_to_json": [{
"formcode": "PLUVIOMETERS_REGISTRATION",
"formsanswersuserinformer": "admin@wpd.com",
"filds": [{
"fieldsanswerslatitude": 4.750550953715424,
"fieldsanswerslongitude": -74.1179903701844,
"fieldsanswerseventaddress": "Rua dos bobos, 81",
"fieldsanswerseventdate": "11-08-2021",
"fieldsanswerseventtime": "21:52",
"fieldsanswersinstitutename": "E. E. Vagner",
"fieldsanswerrinstitutetype": "Escola"
}]
}]
"responseData": {
"array_to_json": [
{
"formcode": "PLUVIOMETERS_REGISTRATION",
"formsanswersuserinformer": "admin@wpd.com",
"filds": [
{
"fieldsanswerslatitude": 4.750550953715424,
"fieldsanswerslongitude": -74.1179903701844,
"fieldsanswerseventaddress": "Rua dos bobos, 81",
"fieldsanswerseventdate": "11-08-2021",
"fieldsanswerseventtime": "21:52",
"fieldsanswersinstitutename": "E. E. Vagner",
"fieldsanswerrinstitutetype": "Escola"
}
]
}
]
} }
}
}

BIN
db/wpd.erd.pdf

Loading…
Cancel
Save