Export of the last working codebase (January 2013):
The code is published under the Apache 2.0 License.
Basic structure |
---|
<Requests> <Selfdescription>…</Selfdescription> <Request type="Type1">…</Request> <Request type="Type2">…</Request> </Requests> |
Selfdescription example |
---|
<Selfdescription> <Device value="htc_legend" /> </Selfdescription> |
Request type | Request type value | Required nodes |
---|---|---|
Register | Register | Username, Password, Email |
Login | Login | Username, Password |
Reset password | request_type_reset_password | Username, Email |
register example |
---|
<Request type="Register"> <Username value="test" /> <Email value="test" /> <Password value="f868315c1b…a223" /> </Request> |
login example |
---|
<Request type="Login"> <Username value="test" /> <Password value="f868315c1b…a223" /> </Request> |
reset password example request |
---|
<Requests> <Request type="request_type_reset_password"> <Username value="testuser" /> <Email value="testmail" /> </Request> </Requests> |
GetInfo example request |
---|
<Request type="GetInfo"/> |
HasMeasures request example |
---|
<Request type="HasMeasures"> <Source name="" /> <Filter> <Time from="" to="" /> <BBox top="" bottom="" left="" right="" /> <Tags mode="all/some"> <Tag value="" /> … </Tags> <Description contains="" /> <Dist from="" to="" /> <Noise from="" to="" /> <Limit value="" /> <Offset value="" /> <OrderBy attr="" dir="" /> </Filter> </Request> |
Node | Description | Notes |
---|---|---|
Source | Datasource constraint | "NOISEDROID" or "NOISETUBE" |
Time | Time constraint | "from" or "to" can be left out |
BBox | Spatial constraint | WGS84 information |
Tags | Constraint by given tags | Attribute "mode" sets if all tags has to match ("all") or at least one ("some") |
Description | The desctiption of the measurements has to match the given description | |
Dist | Only measurements in a ceratin distance are returned | |
Noise | Only measurements in a certain volume are returned | |
Limit | Maximum number of returned measurements | The nodes offset and limit realise the serverside paging, to minimize data transfer |
Offset | Skips the first measurements by a given value | |
OrderBy | Sorts the measurements | "attr" can be "NOISE", "TIME", "SERVERID", "TYPE", "NONE" or "DISTANCE". "dir" can be "ASC" or "DESC". |
GetMeasures request example | ||
---|---|---|
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?> <Requests> <Request type="GetMeasures"> <Filter> <BBox top="51.971344" bottom="51.944263" left="7.602539" right="7.646484" /> <Dist longitude="7.6" latitude="51.945" from="0" to="10000"/> <Noise from="40" to="80"/> <Time from="2010-01-11T16:53:42" to="2011-06-11T16:53:42"/> <OrderBy attr="TIME" dir="ASC"/> <Limit value="15" /> <Offset value="0" /> </Filter> </Request> </Requests> |
addMeasures example request |
---|
<Request type="!AddMeasures"> <Measures> … </Measures> </Request> |
addMeasures node (manual measurement) | addMeasures node (automatic measurement) | Combination of manual and automatic |
---|---|---|
<Measure id="0" type="manual"> <Time value="2011-02-11 16:53:42" /> <LocationMeasure longitude="7.000000" latitude="51.000000" accuracy="131.0" provider="network" /> <Noise value="42.451363" /> <Moral value="100.0" /> <Description>Test</Description> <Distance value="0.0" /> <Rating value="0.0" /> <Tags> <Tag value="traffic"/> <Tag value="construction"/> </Tags> <LocationSource longitude="7.000000" latitude="51.000000" /> </Measure> |
<Measure id="1" type="automatic"> <Time value="2011-02-11 17:01:01" /> <LocationMeasure longitude="7.000000" latitude="51.000000" accuracy="131.0" provider="network" /> <Noise value="42.539665" /> <Moral value="100.0" /> </Measure> |
<MeasureSeries id="134" > <Description>Test</Description> <Title value="" /> <Time value="2011-02-16 18:03:25" /> <Tags> <Tag value="traffic"/> <Tag value="construction"/> </Tags> <Measure id="6" type="manual"> … </Measure> <Measure id="7" type="automatic"> … </Measure> … </MeasureSeries> |
UpdateSeries example request |
---|
<Request type="UpdateSeries"> <MeasureSeries id="76" serverid="7"> <Measure id="78" type="manual"> … </Measure> <Measure id="89" type="automatic"> … </Measure> </MeasureSeries> </Request> |
Basic structure |
---|
<Responses> <Response type="Type1">…</Response> <Response type="Type2">…</Response> </Responses> |
Register success response | Register failure response (invalid username) |
---|---|
<Response type="Register"> <Successful /> </Response> |
<Response type="Register"> <Error type="invalid_username" /> </Response> |
Login success response | Register failure response | Register failure response (already logged in) |
---|---|---|
<Response type="Login"> <Success /> </Response> |
<Response type="Login"> <Error type="wrong_data" /> </Response> |
<Response type="Login"> <Error type="logged_in" /> </Response> |
GetInfo example response |
---|
<Response type="GetInfo"> <MoralConf version="5" url="www.xyz.de/moralconf.xml"/> <MeasureConf version="2" url="www.xyz.de/measureconf.xml"/> <TagConf version="1" url="www.xyz.de/tagconf.xml"/> </Response> |
AddMeasures example response |
---|
<Response type="AddMeasures"> <Successful> <Measure id="0"/> … </Successful> <Error> <Measure id="1"/> … </Error> </Response> |
Successfully added measurements | not added measurements |
---|---|
<Successful> <Measure id="0"/> <Measure id="1"/> … </Successful> |
<Error> <Measure id="3"/> <Measure id="4"/> … </Error> |
Parameter | Value | Description |
---|---|---|
sort | One of NOISE, TIME, SERVERID, TYPE, NONE, DISTANCE |
Sets the sorting to apply to the measurements before returning the specified set of measurements. |
dir | One of ASC, DESC | Sets the sorting direction. |
start | Integer value greater than or equal to zero | The index for the beginning of the subset of measurements to return. |
limit | Integer value greater than or equal to zero | The length of the subset of measurements to return. |
userid | Integer value greater than or equal to zero | Restrict returned measurements to those of the user with that user identification. Only allowed if currently logged in as that user or with an elevated security role. |
http://server.url/NoiseServerServlets/test.jsp
.
With this minimal testing interface one can request the server by uploading XML files, containing the specified request. See "App Servlet" under the "Client side requests" section for how to build such a request.
The information and images for this side were gathered from the project group documentation.
I | Attachment | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|
zip | OpenNoiseMap-01-2013.zip | manage | 2 MB | 07 Jan 2013 - 11:56 | UnknownUser | SVN Export 01-2013 |
OpenNoiseMap-Intro.pdf | manage | 2 MB | 07 Jan 2013 - 12:17 | DanielNuest | ||
apk | de.noisedroid.apk | manage | 478 K | 24 Mar 2015 - 12:21 | DanielNuest | |
png | noisedroid-db-schema-measures.png | manage | 25 K | 03 Apr 2013 - 14:44 | DanielNuest | |
png | noisedroid-db-schema-security.png | manage | 9 K | 03 Apr 2013 - 14:44 | DanielNuest | |
png | slice1.png | manage | 93 K | 07 Jan 2013 - 13:02 | DanielNuest |