Browse Source

Merge branch 'main' of github.com:IGSD-UoW/WPD-MobileApp

master
GabrielTrettel 3 years ago
parent
commit
45659babec
  1. 3
      db/1.wpd.sys_config.sql
  2. 3
      db/wp6.sample.capabilities-api.json
  3. 17
      db/wp6.sample.forms-fields-answers.json
  4. 9
      db/wp6.sample.pluviometer-api.json
  5. 17
      db/wp6.sample.pluviometer-forms-api.json
  6. 60
      db/wp6.sample.pluviometer-modal-api.json
  7. 17
      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);

3
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": {

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

@ -1,12 +1,13 @@
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": [{
"responseData": {
"array_to_json": [
{
"formcode": "FLOODZONES_FORM", "formcode": "FLOODZONES_FORM",
"formsanswersuserinformer": "admin@wpd.com", "formsanswersuserinformer": "admin@wpd.com",
"filds": [{
"filds": [
{
"fieldsanswerssituation": "intransitavel", "fieldsanswerssituation": "intransitavel",
"fieldsanswerslatitude": 4.750550953715424, "fieldsanswerslatitude": 4.750550953715424,
"fieldsanswerslongitude": -74.1179903701844, "fieldsanswerslongitude": -74.1179903701844,
@ -15,7 +16,9 @@ This example for floodzones also applies for river and rain. All fields are equa
"fieldsanswerseventtime": "21:52", "fieldsanswerseventtime": "21:52",
"fielsanswercomment": "users description about the current event", "fielsanswercomment": "users description about the current event",
"fieldsanswerimages": "base64" "fieldsanswerimages": "base64"
}]
}]
}
]
}
]
} }
} }

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

@ -1,9 +1,9 @@
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": [{
"array_to_json": [
{
"formcode": "PLUVIOMETERS_FORM", "formcode": "PLUVIOMETERS_FORM",
"formsanswersuserinformer": "admin@wpd.com", "formsanswersuserinformer": "admin@wpd.com",
"fieldsanswerslatitude": 4.750550953715424, "fieldsanswerslatitude": 4.750550953715424,
@ -13,6 +13,7 @@ JSON intended to display pluviometer icons on map
"formsanswersuserinformer": "admin222@wpd.com", "formsanswersuserinformer": "admin222@wpd.com",
"fieldsanswerslatitude": 4.23876482872188, "fieldsanswerslatitude": 4.23876482872188,
"fieldsanswerslongitude": -79.1179903701844 "fieldsanswerslongitude": -79.1179903701844
}]
} }
]
}
} }

17
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": [{
"array_to_json": [
{
"formcode": "PLUVIOMETERS_FORM", "formcode": "PLUVIOMETERS_FORM",
"formsanswersuserinformer": "admin@wpd.com", "formsanswersuserinformer": "admin@wpd.com",
"fias": [{
"fias": [
{
"fieldsanswersdate": "11/02", "fieldsanswersdate": "11/02",
"fieldsanswersrainamount": 5, "fieldsanswersrainamount": 5,
"fieldsanswerseventtime": "21:52", "fieldsanswerseventtime": "21:52",
"fielsanswerimages" : "base64",
"fielsanswerimages": "base64",
"fielsanswercomment": "users description about the current event" "fielsanswercomment": "users description about the current event"
}]
}]
}
]
}
]
} }
} }

60
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": [{
"array_to_json": [
{
"formcode": "PLUVIOMETERS_FORM", "formcode": "PLUVIOMETERS_FORM",
"formsanswersuserinformer": "admin@wpd.com", "formsanswersuserinformer": "admin@wpd.com",
"fias": [{
"username" : "Fulano",
"userrole" : "Professor",
"fias": [
{
"username": "Fulano",
"userrole": "Professor",
"institutionname": "E.E. Vicente Leporace", "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}
"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
}
]
}
]
}
] ]
}]
}]
} }
} }

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

@ -1,12 +1,13 @@
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": [{
"responseData": {
"array_to_json": [
{
"formcode": "PLUVIOMETERS_REGISTRATION", "formcode": "PLUVIOMETERS_REGISTRATION",
"formsanswersuserinformer": "admin@wpd.com", "formsanswersuserinformer": "admin@wpd.com",
"filds": [{
"filds": [
{
"fieldsanswerslatitude": 4.750550953715424, "fieldsanswerslatitude": 4.750550953715424,
"fieldsanswerslongitude": -74.1179903701844, "fieldsanswerslongitude": -74.1179903701844,
"fieldsanswerseventaddress": "Rua dos bobos, 81", "fieldsanswerseventaddress": "Rua dos bobos, 81",
@ -14,7 +15,9 @@ This JSON is used to insert Pluviometer data into datalake
"fieldsanswerseventtime": "21:52", "fieldsanswerseventtime": "21:52",
"fieldsanswersinstitutename": "E. E. Vagner", "fieldsanswersinstitutename": "E. E. Vagner",
"fieldsanswerrinstitutetype": "Escola" "fieldsanswerrinstitutetype": "Escola"
}]
}]
}
]
}
]
} }
} }

BIN
db/wpd.erd.pdf

Loading…
Cancel
Save