-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5d61de2
Showing
579 changed files
with
74,612 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.idea/ | ||
*.iml | ||
target | ||
.classpath | ||
.project | ||
.settings/ | ||
logs/ | ||
error-reports/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#CONTRIBUTING | ||
|
||
We welcome new contributors. Here you can read our guidelines to contribute to the IRIS project. | ||
|
||
## Found a bug | ||
|
||
If you found a bug in our software or mistakes in the documentation there are two ways to help us: | ||
|
||
1. [Submit an issue](#submitting-an-issue) which explains the bug to our [GitHub Repository](https://github.com/Contargo/iris/issues/). | ||
2. [Submit a pull request](#pull-requests) that fixes the bug. | ||
|
||
|
||
## Want a new Feature | ||
|
||
If you want a new Feature in IRIS there are two ways to get it done: | ||
|
||
1. Request the new feature by [submitting an issue](#submitting-an-issue) to our [GitHub Repository](https://github.com/Contargo/iris/issues/). | ||
2. [Submit a Pull Request](#pull-requests) that contains the new feature. | ||
|
||
|
||
## Submission Guidelines | ||
|
||
### Submitting an Issue | ||
|
||
Before you submit an issue check the [GitHub Repository](https://github.com/Contargo/iris/issues/) to see if someone else reported the same issue. | ||
|
||
If you submit a bug, provide as much information as needed for us to reproduce the bug. | ||
|
||
|
||
### Pull Requests | ||
|
||
Before submitting a pull request do following things: | ||
|
||
* If you are not familiar with GitHubs pull requests take a look at their documentation of [Using pull requests](https://help.github.com/articles/using-pull-requests/). | ||
* Search our [GitHub Repository](https://github.com/Contargo/iris) for pull requests doing the same, so you don't have to put effort in something that's already done. | ||
* If there is no active pull request implementing your feature then fork [IRIS](https://github.com/Contargo/iris) | ||
* Create a new branch: | ||
``` | ||
git checkout -b my-branch master | ||
``` | ||
* Make your changes. | ||
* Write Unit-Tests for all your changes. | ||
* Run the full test suite to verify you did not broke anything: | ||
``` | ||
mvn clean verify | ||
``` | ||
* Commit your changes. Write a commit message that explains what your changes are for, so everyone can understand what it does. See [this](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) explanation for how to right commit message. If your changes are related to an open issue, reference the issue number in the last line of your commit message. Example: ```References #12```. | ||
* Push the branch with your changes to GitHub. ```git push origin my-branch``` | ||
* In GitHub, send a pull request to ```iris:master``` | ||
|
||
If you want to learn more about, how to write a good pull request, read [this](https://github.com/blog/1943-how-to-write-the-perfect-pull-request) blog post of GitHub. |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
IRIS - Intermodal Routing Information System | ||
========= | ||
|
||
The goal of IRIS is to create a centralized and transparent database for distance calculations in short-haul goods transport. | ||
IRIS aims to provide such a platform, for both clients and service providers. | ||
|
||
IRIS is used to calculate truckings for transports from a hinterland terminal to the place of loading and the other way around. | ||
The place of loading can be set very detailed by adjusting its coordinates. | ||
IRIS uses these coordinates to calculate the truck route, distance, toll kilometers and the duration of the trucking. | ||
An extension for barge and rail routings is already planned. | ||
|
||
Example: A freight container arrives in Mannheim via cargo ship and needs to be transported to 48 Berliner Str., Heidelberg, Germany. | ||
After arriving at the Contargo terminal in Mannheim it needs to be loaded on a truck to be transported to its destination. | ||
There, the recipient unloads the content and the truck transports the empty container back to the terminal. | ||
|
||
# Features | ||
* Management of seaports, terminals and connections between them (GUI) | ||
* Automatic creation of truck and barge routes between seaports, terminals and destinations (GUI & REST-API) | ||
* Provision of detailed information for each route like distance, toll distance, duration, CO2 output (REST-API) | ||
* Support for different container sizes and states (REST-API) | ||
* Open Street Map Address resolution for destination points (GUI & REST-API) | ||
* Management and resolution of custom static addresses as destination points (GUI & REST-API) | ||
* Possibility to implement any authentication mechanism via Spring Security | ||
|
||
Further documentation about the IRIS-terminology can be found here: [terminology](docs/terminology.md). | ||
|
||
|
||
#Prerequisites | ||
- MySQL/MariaDb 5.5 or higher | ||
- Maven 3 or higher | ||
- JDK 8 or higher | ||
|
||
|
||
#Getting started | ||
|
||
Simply clone this repository | ||
```sh | ||
$ git clone https://github.com/Contargo/iris.git | ||
``` | ||
|
||
## Configuration | ||
|
||
Configuration is located in ```src/main/resources/``` | ||
|
||
The "general" configuration file is ```src/main/resources/application.properties``` | ||
|
||
|
||
### Environment Properties | ||
|
||
Environment (System) specific configurations go to ```src/main/resources/application-<envname>.properties``` | ||
|
||
The environment-specific (e.g. ```application-dev.properties```) file overrides and adds to properties defined in the "general" properties-file (```application.properties```). Not overridden properties of ```application.properties``` remain valid. | ||
|
||
Default Environment is "dev" (so ```application-dev.properties``` is loaded by default). Environments can be set using System-Property "environment" | ||
|
||
```sh | ||
mvn jetty:run -Denvironment=myenv # -> leads to use application-myenv.properties | ||
``` | ||
or environment-parameter environment: | ||
```sh | ||
export environment=superdev | ||
mvn jetty:run # -> leads to use application-superdev.properties | ||
``` | ||
|
||
#### Database | ||
|
||
All database connection settings are configured in ```application-<envname>.properties```. Adapt the corresponding properties to match your MySQL/MariaDb database connection settings. | ||
|
||
All needed database tables are created on application start using [Liquibase](http://www.liquibase.org/). | ||
|
||
|
||
### Roles | ||
|
||
There are two different roles defined in IRIS: | ||
|
||
- ROLE_ADMIN | ||
- can do anything | ||
- ROLE_USER | ||
- no GUI access | ||
- limited REST Api access | ||
|
||
|
||
### User Credentials | ||
|
||
User Credentials are are located in ```src/main/resources/usercredentials-<envname>.properties```. | ||
|
||
For development IRIS ships with two predefined users: | ||
- [email protected] with password admin: ROLE_ADMIN | ||
- [email protected] with password user: ROLE_USER | ||
|
||
These are located in ```src/main/resources/usercredentials-dev.properties```. | ||
|
||
To add own user credentials do the following: | ||
```sh | ||
$ echo -n "yourpassword" | sha256sum | ||
e3c652f0ba0b4801205814f8b6bc49672c4c74e25b497770bb89b22cdeb4e951 - | ||
``` | ||
Edit the file ```src/main/resources/usercredentials-<envname>.properties``` and add your user like this: | ||
``` | ||
[email protected]=e3c652f0ba0b4801205814f8b6bc49672c4c74e25b497770bb89b22cdeb4e951,ROLE_USER,enabled | ||
``` | ||
|
||
You can specify login, password, role and set the enabled flag. | ||
|
||
|
||
## Application Start | ||
|
||
In order to build the application you need Maven 3 and Oracle JDK 7. You also need your MySQL/MariaDb database set up as described above. You can then start the local web server: | ||
```sh | ||
$ mvn jetty:run | ||
``` | ||
You can run a full build including all tests with | ||
```sh | ||
$ mvn clean install | ||
``` | ||
Finally, point your browser to the url http://localhost:8082/. IRIS has both a basic user interface and a JSON API. Documentation for the API is located at http://localhost:8082/api/docs.html. | ||
|
||
|
||
# Contributing | ||
|
||
If you want to contribute to IRIS, see our [contribution guidelines](CONTRIBUTING.md). | ||
|
||
|
||
# Licensing | ||
|
||
IRIS is licensed under the GNU Affero General Public License, Version 3. See [LICENCE](LICENSE) for the full license text. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#Terminology | ||
|
||
##Terminal | ||
|
||
*inland (hinterland) container terminal* | ||
|
||
A facility where cargo containers are handled between different transport vehicles for onward transportation. | ||
The handling of containers is typically between barges or cargo trains and land vehicles (trucks). | ||
|
||
* **Region:** An area defined by specific parameters. | ||
Usually geographical division. (*Oberrhein, Mittelrhein, Niederrhein*) / (*Rhein-Neckar, Rhein-Main*). | ||
Contargo uses three regions among other things to assign and store the CO₂-parameter of our barge fleet. | ||
|
||
|
||
##Seaport | ||
Location on a coast where sea vessels and barges can dock and transfer cargo from or to land. | ||
Container seaports handle cargo in containers by different mechanical means. (crane, AGV, reach stacker) | ||
|
||
|
||
##Connections | ||
This shows the possibilities to connect a seaport and an inland terminal. | ||
Different and multiple connections are possible. For example barge or rail or both. | ||
|
||
* **Diesel-km:** The kilometers traveled on the train route or the barge route by use of diesel fuel. | ||
* **Electrical-km:** The kilometers on the train route traveled by use of electricity only. | ||
|
||
|
||
##Static Addresses | ||
A static address is a city with its corresponding postal code and country. For example *68159 Mannheim, Germany*. | ||
|
||
|
||
##Cloud distance | ||
A previously defined area (radius) around a static address. | ||
|
||
|
||
##Route types | ||
|
||
* **Barge:** Transport of goods / cargo on barge. | ||
Barge transport only happens between seaports and inland terminals or between inland terminals that are connected by a major river or canals. | ||
* **Rail:** Transport of goods / cargo between seaports and inland terminals on a freight train using rail roads. | ||
* **Truck:** Transport of goods / cargo from and to seaports and inland terminals and the loading / unloading site. | ||
|
||
|
||
##Route Combination | ||
|
||
* **Waterway:** Transport per barge between seaport and inland terminal and additional transport per truck to the loading / unloading site. | ||
* **Railway:** Transport per rail between seaport and inland terminal and additional transport per truck to the loading / unloading site. | ||
* **Direct Truck:** Transport only per truck from or to the seaport and the loading site. | ||
* **Roundtrip:** Waterway, Railway or Direct Truck transport from seaport to loading / unloading site and back to seaports. | ||
* **All:** A list of all the possibilities for transport for a given loading site. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<?xml version="1.0"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>net.contargo</groupId> | ||
<artifactId>iris-api-tests</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<packaging>jar</packaging> | ||
|
||
<name>IRIS API Tests</name> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
|
||
<spockCore>0.7-groovy-2.0</spockCore> | ||
<groovyVersion>2.2.2</groovyVersion> | ||
<gmavenVersion>1.5</gmavenVersion> | ||
<gmavenProviderSelection>2.0</gmavenProviderSelection> | ||
<junitVersion>4.11</junitVersion> | ||
<jsonLibVersion>2.3</jsonLibVersion> | ||
<ezMorphVersion>1.0.6</ezMorphVersion> | ||
<httpBuilderVersion>0.7.1</httpBuilderVersion> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.gmaven</groupId> | ||
<artifactId>gmaven-plugin</artifactId> | ||
<version>${gmavenVersion}</version> | ||
<configuration> | ||
<providerSelection>${gmavenProviderSelection}</providerSelection> | ||
<sourceEncoding>UTF-8</sourceEncoding> | ||
<source/> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>testCompile</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.codehaus.groovy</groupId> | ||
<artifactId>groovy-all</artifactId> | ||
<version>${groovyVersion}</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>2.10</version> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>exec-specs</id> | ||
<phase>test</phase> | ||
<goals> | ||
<goal>test</goal> | ||
</goals> | ||
<configuration> | ||
<includes> | ||
<include>**/*Spec.java</include> | ||
</includes> | ||
<skip>false</skip> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit-dep</artifactId> | ||
<version>${junitVersion}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.codehaus.groovy</groupId> | ||
<artifactId>groovy-all</artifactId> | ||
<version>${groovyVersion}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.spockframework</groupId> | ||
<artifactId>spock-core</artifactId> | ||
<version>${spockCore}</version> | ||
<scope>test</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.codehaus.groovy</groupId> | ||
<artifactId>groovy-all</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>junit</groupId> | ||
<artifactId>junit-dep</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-core</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.codehaus.groovy.modules.http-builder</groupId> | ||
<artifactId>http-builder</artifactId> | ||
<version>${httpBuilderVersion}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
Oops, something went wrong.