Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Crowd-sourcing service is a collection of services that allows management of platform. The management includes overview of reported events, modification of event states, etc.
The service is in fact a set of HTTP (sub)services. Most of the services allow POST method only.
The services respond with standard HTTP/1.1 response codes. For example, 200 OK is reported if everything is fine. 4XX status codes are returned when an error occures, for example 417 Expectation Failed. In case of a problem message body contains problem description.
Different pilots require slightly different behaviour of tha service. For example, some pilots require user authentication while others do not. Table
property contains predefined properties which may change how the service behave. Particular values and their meaning is described in the next sections.
As the authetication may be required (depends on configuration) it is stronly recommended to use secure verion of HTTP, HTTPS.
The service was developed to use a PostgreSQL with PostGIS extansion as a backend. The spatial extension is necessity as event location is stored in form of a geometry.
Database schema can be loaded from file stored in crowd-sourcing/server/db-schema/. These are files creaed by pgAdmin3's Backup... utility, so it's an advantage to use command Restore... to recreate the database schema.
The following tables are important to setup the service:
mime_typecontains allowed mime types of event attachments;
prioritycontains allowed priorities;
propertycontains various properties, their meaning is self explaining;
statuscontains allowed statuses of event;
tagcontains tags that can be associated with an event.
The service is distributed as a war (web archive) file. It should be copied into
webapps directory of your Tomcat installation.
If you are on Windows platform the supposed directory is
and for Linux distributions it should be
The service comes preconfigured with connection to postgresql running at port 5432 on localhost. The values, along with database user and password can be--and should be--changed in file web.xml.
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1"> <display-name>CrowsSourcing</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <context-param> <param-name>db-url</param-name> <param-value>jdbc:postgresql://localhost:5432/cs</param-value> </context-param> <context-param> <param-name>db-user</param-name> <param-value>USERNAME</param-value> </context-param> <context-param> <param-name>db-password</param-name> <param-value>PASSWORD</param-value> </context-param> </web-app>