Domain layer

Raildelays is mainly a Java application which accumulates train delays from the Belgian railway company called NMBS/SNCB.

License

License

Categories

Categories

Doma Data ORM
GroupId

GroupId

com.github.almex
ArtifactId

ArtifactId

raildelays-domain
Last Version

Last Version

2.0.0-beta.2
Release Date

Release Date

Type

Type

jar
Description

Description

Domain layer
Raildelays is mainly a Java application which accumulates train delays from the Belgian railway company called NMBS/SNCB.

Download raildelays-domain

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.almex/raildelays-domain/ -->
<dependency>
    <groupId>com.github.almex</groupId>
    <artifactId>raildelays-domain</artifactId>
    <version>2.0.0-beta.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.almex/raildelays-domain/
implementation 'com.github.almex:raildelays-domain:2.0.0-beta.2'
// https://jarcasting.com/artifacts/com.github.almex/raildelays-domain/
implementation ("com.github.almex:raildelays-domain:2.0.0-beta.2")
'com.github.almex:raildelays-domain:jar:2.0.0-beta.2'
<dependency org="com.github.almex" name="raildelays-domain" rev="2.0.0-beta.2">
  <artifact name="raildelays-domain" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.almex', module='raildelays-domain', version='2.0.0-beta.2')
)
libraryDependencies += "com.github.almex" % "raildelays-domain" % "2.0.0-beta.2"
[com.github.almex/raildelays-domain "2.0.0-beta.2"]

Dependencies

compile (14)

Group / Artifact Type Version
org.hibernate.javax.persistence : hibernate-jpa-2.1-api jar 1.0.0.Final
org.hibernate : hibernate-jpamodelgen jar 5.2.1.Final
javax.validation : validation-api jar 1.1.0.Final
javax.el : javax.el-api jar 2.2.4
org.apache.commons : commons-lang3 jar 3.4
org.hibernate : hibernate-validator Optional jar 5.2.1.Final
org.glassfish.web : javax.el Optional jar 2.2.4
org.hibernate : hibernate-validator-cdi Optional jar 5.2.1.Final
org.slf4j : slf4j-api jar 1.7.12
org.apache.logging.log4j : log4j-slf4j-impl jar
org.apache.logging.log4j : log4j-core jar
org.apache.logging.log4j : log4j-api jar
org.apache.logging.log4j : log4j-1.2-api jar
org.jboss.logging : jboss-logging jar 3.3.0.Final

test (4)

Group / Artifact Type Version
com.github.almex : pojo-unit jar 1.1.0
junit : junit jar 4.12
org.hamcrest : hamcrest-junit jar 2.0.0.0
org.easymock : easymock jar 3.4

Project Modules

There are no modules declared in this project.

Raildelays

Build Status Coverage Status Maven Central

Raildelays is mainly a Java application which accumulates train delays from the Belgian railway company called NMBS/SNCB. In futur development, we will extend possibilities to be able to deal with other railway company or other vehicles (i.e: bus, airplane, truck, cars,...).

Timetable (futur)

When we talk about train timetable or scheduling we only talk about what is the planed route for a train. Meaning that a certain train will move from one station to another and the timetable show you the expectedTime arrival time and the exepected departure time for each stop.

Liveboard (present)

We use a liveboard to know directly if your train is on time or not. It gives you the expectedTime time and the delay comparing to what is expectedTime. It only show trains which are not arrived yet to a certain station.

Route log (past)

Give you the expectedTime time, the effective time and if a stop was deserved or not.

In practical with NMBS/SNCB trains, you should be able to know the timetable of a train based on its collected route log because timetables remain commonly the same for every day of a week and are subject to unfrequent changes. But, you should consider all of those views as seperate source of data. You can have change of a timetable leading to different versions and then a route log should used, as expectedTime time, the last version of the timetable. A liveboard is a little in between but it gives you information only for a certain station and you cannot follow the complete train traject.

Building from Source

Clone the git repository using the URL on the Github home page:

$ git clone git://github.com/almex/Raildelays.git
$ cd Raildelays

Command Line

Use Maven 3.0, then on the command line:

$ mvn install

or, you can execute integration tests via:

$ mvn install -Pit

Application Design

Input

  • HTTP Client/Streamer
  • HTTP Parser

Output

  • Excel Sheet
  • Flat file

API

  • repository layer
  • service layer

Front-end

  • non-interactive batch engine (mobile or desktop)
  • desktop UI (Java FX)
  • mobile UI (Android)

Application Architecture

To be able to analyze data from an external system (e.g. : www.railtime.be), we have to persist them in our data model.

Languages

  • Java: chosen for its portability and its power.
  • Groovy: chosen for its easiness to parse DOM documents (XML, XHTML,...).

Frameworks

  • Apache POI: to write Microsoft Excel sheets
  • Spring Core: for Dependency Injections and Invertion of Control to make the leverage the modularity of the application to a high level.
  • Spring Batch: to build a non-interactive and fully automated batch process.
  • Spring Data: to simplify DAO creation.
  • JPA: to abstract persistence layer.
  • Hibernate: as a JPA implementation.
  • JUnit: as a testing framework.
  • Spring Test: as an add-on to JUnit to simply testing.
  • Derby: as an embedded database (Desktop).
  • HSQLDB: as an in-memory database to execute integration tests (default with Spring Test)

Quality Assurance

To able to measure Code Quality, the application was configured to be used with Sonar.

The JaCoCo Maven plug-in has been configured to measure code coverage separately for unit tests and integration tests.

Licensing

This project is licensed under the terms of the MIT license.

Versions

Version
2.0.0-beta.2
2.0.0-beta.1
1.2.2
1.2.1
1.2.0
1.2.0-rc.1