Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
290 commits
Select commit Hold shift + click to select a range
86858fe
undo https fix
hubertgoeuropa May 3, 2022
d0593d2
change sch adh v3 time to mm:ss format. Fix speed for traccar(convers…
hubertgoeuropa May 17, 2022
9f3e322
fix typo in traccar avl module
hubertgoeuropa May 17, 2022
ef892c5
add BigDecimal import
hubertgoeuropa May 17, 2022
8258bb4
add sch adh map v2
hubertgoeuropa May 22, 2022
15251fd
FIX GS-46, GS-45, GS-43, GS-41, GS-38
hubertgoeuropa Jun 11, 2022
a6d9759
add https
hubertgoeuropa Sep 26, 2022
a99decd
https fixes
hubertgoeuropa Sep 27, 2022
dcdcc3c
https fix
hubertgoeuropa Sep 28, 2022
29d661c
change obaweb repo
hubertgoeuropa Sep 29, 2022
bbc9227
fix https avlmap
hubertgoeuropa Sep 29, 2022
09dee1e
fix polish characters
hubertgoeuropa Sep 29, 2022
9e56485
change tolerance
hubertgoeuropa Nov 25, 2022
9fcb129
change tolerance
hubertgoeuropa Nov 25, 2022
4492c10
add Time exception info
hubertgoeuropa Nov 25, 2022
2adfe6d
add logging to time class
hubertgoeuropa Nov 26, 2022
5c7f591
add logging to time class
hubertgoeuropa Nov 26, 2022
39534be
add error logs to sql query
hubertgoeuropa Dec 3, 2022
a9b1335
add error logs to sql query
hubertgoeuropa Dec 3, 2022
c13c5d3
undo log changes
hubertgoeuropa Dec 3, 2022
20d2aa6
add avl report to api
hubertgoeuropa Jan 18, 2023
550e610
Add sch adh report to api
hubertgoeuropa Jan 19, 2023
25206ee
Add sch adh report to api
hubertgoeuropa Jan 19, 2023
97e083d
add vehicles with block config
hubertgoeuropa Jan 27, 2023
d50f4ac
add vehicles with block config
hubertgoeuropa Jan 27, 2023
55890dc
add api to vehicle with block config
hubertgoeuropa Jan 29, 2023
fd98d71
add interfaces
hubertgoeuropa Jan 29, 2023
96f011b
add changes to api with vehicles to block config
hubertgoeuropa Jan 29, 2023
828c061
add missing changes
hubertgoeuropa Jan 29, 2023
96ff780
add fix to avl processor
hubertgoeuropa Jan 29, 2023
7059599
add transaction to remove config
hubertgoeuropa Jan 29, 2023
6020799
add session close
hubertgoeuropa Jan 29, 2023
8427fe6
add time to trips in schedule adh report
hubertgoeuropa Feb 17, 2023
3d6075f
Fix traccar missing device by id
hubertgoeuropa Feb 26, 2023
dbf5a70
fix vehicle to blocks assignment
hubertgoeuropa Mar 20, 2023
981aacf
change id to name in gtfs rt
hubertgoeuropa Mar 29, 2023
be254fe
add arrival and departures for trips by date
hubertgoeuropa Apr 17, 2023
24baa9a
add exception handler do sw vehicle name
hubertgoeuropa Apr 17, 2023
419f005
add exception handler do sw vehicle name
hubertgoeuropa Apr 17, 2023
dbdf3d7
add log to api
hubertgoeuropa Apr 26, 2023
7f41c9e
add log to api
hubertgoeuropa Apr 26, 2023
32dc99b
add log to api
hubertgoeuropa Apr 26, 2023
135fe03
add log to api
hubertgoeuropa Apr 26, 2023
3a4a683
add log to api
hubertgoeuropa Apr 26, 2023
9d1acbb
fix mdt vehicle name
hubertgoeuropa May 11, 2023
d65fb54
add last avl json data
hubertgoeuropa May 30, 2023
9af3682
Add trips with travel times report
hubertgoeuropa Jun 4, 2023
164c055
Add exports files
hubertgoeuropa Jul 7, 2023
c4bc7d2
Add exports files
hubertgoeuropa Jul 7, 2023
3f1ba80
Add exports files
hubertgoeuropa Jul 7, 2023
230ae8a
Add exports files
hubertgoeuropa Jul 7, 2023
23b86a8
add datetime fix
hubertgoeuropa Jul 12, 2023
cdc6956
add file endpoint
hubertgoeuropa Jul 13, 2023
a5ac995
fix blocks and activeBlockByRouteNameWithVehicles endpoints
hubertgoeuropa Jul 25, 2023
f3a5eef
add filter to vehicles config
hubertgoeuropa Sep 1, 2023
23cac42
add filter to vehicles config
hubertgoeuropa Sep 1, 2023
30bd471
fix pks temporary
hubertgoeuropa Sep 14, 2023
881d23a
fix scheduled date in trips with travel times report
hubertgoeuropa Oct 13, 2023
8b8047b
one-jar-boot new maven repo
wkulesza Nov 22, 2023
da75683
cleanups of build env
vesavlad Dec 12, 2023
6b102da
Fixed build
vesavlad Dec 12, 2023
9d25f9f
integrated docker
vesavlad Dec 12, 2023
a6ee82f
Create maven workflow
vesavlad Dec 13, 2023
c9117ce
Merge remote-tracking branch 'origin/develop'
vesavlad Dec 13, 2023
c59a5cb
cleanup not needed things
vesavlad Dec 13, 2023
a955476
renamed folders
vesavlad Dec 13, 2023
1ee2610
Spotless
vesavlad Dec 13, 2023
7387703
tweaks to make app running
vesavlad Dec 15, 2023
e809741
Refactor of application (#8)
vesavlad Dec 31, 2023
d3588d5
Remove embedded sql files
vesavlad Dec 31, 2023
76087e5
AVL rework
vesavlad Dec 31, 2023
a8b937c
Module rework
vesavlad Dec 31, 2023
e88edd5
Improve auto block assignment
vesavlad Dec 31, 2023
4069d75
Cleanups
vesavlad Jan 2, 2024
a693804
Interpolate stop times if needed
vesavlad Jan 2, 2024
a543b12
Fix missing redirect
vesavlad Jan 2, 2024
f5f3cad
Add new class list config value
vesavlad Jan 3, 2024
02955a6
More work towards a centralized approach
vesavlad Jan 9, 2024
2a26079
Improved deprecations
vesavlad Jan 9, 2024
43d8f2f
Improved deprecations
vesavlad Jan 9, 2024
164bd20
Improved deprecations
vesavlad Jan 10, 2024
bad4f1f
Hibernate 6 migration
vesavlad Jan 10, 2024
74ff338
Make app fully functional using latest deps
vesavlad Jan 14, 2024
b022624
Fixed active blocks page
vesavlad Jan 14, 2024
cb0f890
restyled web app jsp & html files
vesavlad Jan 14, 2024
72b0649
Cleanups
vesavlad Jan 14, 2024
0ece01e
Updated TripPattern stopPaths link
vesavlad Jan 15, 2024
4486a62
cleanups and deprecations removal
vesavlad Jan 15, 2024
2807845
moved some gtfs objects
vesavlad Jan 16, 2024
8eb707c
Cleanups for gtfs processing
vesavlad Jan 17, 2024
c4a6181
Cleanups of caching for gtfs rt
vesavlad Jan 17, 2024
68a56ba
Remove not needed config
vesavlad Jan 17, 2024
f8c9050
Fixed gtfs parsing
vesavlad Jan 17, 2024
12d1bdf
merged webapp with api
vesavlad Jan 17, 2024
eefaadd
More cleanups
vesavlad Jan 18, 2024
150a4ce
Cleanup and improve docker container generation
vesavlad Jan 19, 2024
3b3d970
Add missing config
vesavlad Jan 19, 2024
fc1e283
Use internal protobuf definition for GTFSRT
vesavlad Jan 21, 2024
8919af8
Add line number to logback
vesavlad Jan 21, 2024
f92a624
Styling improvements
vesavlad Jan 21, 2024
95c78d6
remove not needed caching impl
vesavlad Jan 23, 2024
3bcea11
Centralized configuration
vesavlad Jan 21, 2024
dcd3a94
cleanup
vesavlad Jan 24, 2024
2bd533d
fixed hibernate-hikari combo not working together
vesavlad Jan 24, 2024
94efcd6
cleanups regarding styling
vesavlad Jan 26, 2024
3e518de
Cleanup time usage
vesavlad Jan 26, 2024
1b18327
Cleanup time usage
vesavlad Jan 28, 2024
a968281
Introduce app concept that combines Core & other modules
vesavlad Jan 29, 2024
e9d23b8
Move apps and main to upper level
vesavlad Jan 29, 2024
46d9f43
Bring JIB to the party
vesavlad Jan 29, 2024
774c1a7
Renamed and moved WebConfigParams to config folderBring JIB to the pa…
vesavlad Jan 29, 2024
3b7eda8
Cleanups after JIB integration
vesavlad Jan 30, 2024
9d73687
Removed RMI concept and slightly begin moving towards Service & Dto c…
vesavlad Jan 30, 2024
e690ef6
Refactored servicing
vesavlad Jan 30, 2024
a8c9201
Simplified configuration "structuring" (moved configData info config.…
vesavlad Jan 30, 2024
cf945c0
db package renamed to domain
vesavlad Jan 30, 2024
575375e
Move cache creation outside of Core responsibility
vesavlad Jan 30, 2024
001e7f7
Added some comprehensive readme info and cleanup leftovers
vesavlad Jan 30, 2024
85c32e6
Doc emojis
vesavlad Jan 30, 2024
348a2e5
More tweaks of readme file
vesavlad Jan 30, 2024
8a8139b
- change packaging information
vesavlad Jan 30, 2024
7aa19f0
- make avl part of core
vesavlad Jan 30, 2024
b607248
- remove applications package from core module to avoid misleading un…
vesavlad Jan 30, 2024
d302f7e
- improved log spamming with non meaningfull info and removed allread…
vesavlad Jan 30, 2024
d81de46
Fixed NPE caused by evaluating Boolean as boolean
vesavlad Jan 31, 2024
0306950
Updated readme with docker compose steps
vesavlad Jan 31, 2024
58b21dd
Removed not needed CacheConfig since is not used anymore
vesavlad Jan 31, 2024
b80bbe1
Fixed problem when trying to fetch activeBlockByRouteNameWithVehicles…
vesavlad Feb 1, 2024
8c28996
Try to fix "/reports/tripsByDate" reports endpoint
vesavlad Feb 2, 2024
b0a6b71
Explicitly add names for columns for database objects
vesavlad Feb 3, 2024
79e7905
Correctly mark collections as json storable for Block
vesavlad Feb 4, 2024
411f012
Ignore all this that are in scope of local testing
vesavlad Feb 4, 2024
c0fb4ce
Merge branch 'main' into feature/flyway
vesavlad Feb 4, 2024
e920d01
Fixed reports queries
vesavlad Feb 4, 2024
d7b6a33
Simplified report caching logic
vesavlad Feb 4, 2024
9cb0392
Moved SystemUtils + Time initialization inside DbConfig
vesavlad Feb 4, 2024
09d4259
Moved SystemUtils + Time initialization inside DbConfig
vesavlad Feb 4, 2024
bb40da2
Add support for flyway migrations
vesavlad Feb 6, 2024
a476d25
Disable ddl operations for hibernate as now they should be handled by…
vesavlad Feb 6, 2024
6bc0e92
Add more enforcements to the blocks
vesavlad Feb 6, 2024
add337d
Removed default interface impl from overriding classes
vesavlad Feb 6, 2024
b98fced
Avoid crashing if finding existing api key & web agency
vesavlad Feb 6, 2024
4f7faf4
- Include also config rev in the primary key of a Match
vesavlad Feb 6, 2024
12e0eab
- Fixed some save problems caused by duplicated entries
vesavlad Feb 6, 2024
41f2158
- fixed wrong path used to fetch some reports
vesavlad Feb 6, 2024
ec240ea
- fixed query sintax
vesavlad Feb 6, 2024
2661bdc
Add flyway support for migrations, rework table naming and add column…
vesavlad Feb 6, 2024
b8ab2bc
Updated some native queries in order to fix invalid table names used
vesavlad Feb 6, 2024
82ee98d
Caching initialization fixes
vesavlad Feb 7, 2024
d0dac94
Fixed wrong path used for singlestopholding.html
vesavlad Feb 7, 2024
1887ffc
Add support for placeholders in properties file
vesavlad Feb 7, 2024
e3cf960
Use same session to also store the web agency
vesavlad Feb 7, 2024
3dfb0f7
Add support for thread based sessions to avoid concurrency issues whi…
vesavlad Feb 7, 2024
9e0b952
Make travel_times_msec of TravelTimesForStopPath a JSON payload while…
vesavlad Feb 7, 2024
12e388b
Cleanup HibernateUtils
vesavlad Feb 7, 2024
6867241
Make flyway correctly use the existing slf4j logger
vesavlad Feb 7, 2024
90a33f3
Move database storing to scheduler based approach
vesavlad Feb 7, 2024
df20351
Make use of scheduler for doing work instead of using specialized thr…
vesavlad Feb 7, 2024
7ca51a3
Try to fix broken queries that resulted after db rework
vesavlad Feb 9, 2024
89d3b5f
Automate container build
vesavlad Feb 9, 2024
b4af8af
Corrected jib configuration and removed timezone enforcing from java …
vesavlad Feb 9, 2024
96ffa92
Removed faulty profile
vesavlad Feb 9, 2024
68b92e1
Fixed jib image generation
vesavlad Feb 9, 2024
5e64e19
More fixes for queries to stabilize things
vesavlad Feb 9, 2024
92389e0
Change the default image that will be pushed
vesavlad Feb 9, 2024
4233dad
Fixed problem with container application startup
vesavlad Feb 9, 2024
3d06c60
Cleanups and improving hibernate hikari config
vesavlad Feb 11, 2024
69765a1
Improved logging by avoid spamming with information that can be check…
vesavlad Feb 11, 2024
5657a92
Removed AgencyMonitorClient.java since is not used anymore
vesavlad Feb 11, 2024
4a660fa
No more rmi for services
vesavlad Feb 11, 2024
d2eee48
Removed mysql query for lastAvlJsonData.jsp
vesavlad Feb 11, 2024
6401b7e
fix build
vesavlad Feb 11, 2024
0473e2b
Cleaned up former changes and removed non-used methods from filters
vesavlad Feb 13, 2024
118eab8
Use ClassConfigValue inside factories where class names are to be pro…
vesavlad Feb 13, 2024
3625214
Cleanups and disable irrelevant error message in TemporalMatcher
vesavlad Feb 13, 2024
3f7a636
Limit the number of threads for jetty & tweaked the config
vesavlad Feb 13, 2024
98349ec
Do not share same session between threads
vesavlad Feb 13, 2024
5c768c3
Fixed possibly leaked jdbc connections
vesavlad Feb 13, 2024
f11448d
Cleanups
vesavlad Feb 14, 2024
b376742
Fix wrong expected date format (Closes #14)
vesavlad Feb 17, 2024
36b4415
Fix inconsistent name for field scheduled_time (Closes #15)
vesavlad Feb 19, 2024
13bdd51
Fix inconsistent name for field scheduled_time for tripWithTravelTimes
vesavlad Feb 19, 2024
a5bc6f5
Fixed time format used for generating avl reports
vesavlad Feb 19, 2024
9f2aadc
Add explicit equals & hashcode for arrival departures
vesavlad Feb 20, 2024
e0b3a56
Fix build cycle interdependencies
vesavlad Mar 1, 2024
9f2f42e
Bumped postgresql dependency to latest version
vesavlad Mar 1, 2024
4d2b7fb
traccar module init
TsimurSh Mar 1, 2024
dd4a867
traccar module init: delete empty tag
TsimurSh Mar 1, 2024
b53f4a9
traccar client impl
TsimurSh Mar 1, 2024
ceb0737
action test
TsimurSh Mar 1, 2024
7453e9d
fix: missing import & dependency
TsimurSh Mar 1, 2024
a2d7d82
fix: actions
TsimurSh Mar 1, 2024
f3f8b7f
Merge pull request #1 from goeuropa/traccar-module
wkulesza Mar 5, 2024
95292a1
Add missing CORS filter for allowing CORS requests
vesavlad Mar 17, 2024
ba76194
Merge branch 'opentransportro:main' into main
wkulesza Mar 17, 2024
e6be215
Improve resource consumption by avoid running a blocking while loop i…
vesavlad Mar 18, 2024
97b675c
Improve session handling while fetching vehicle blocks
vesavlad Mar 18, 2024
8575645
Merge branch 'opentransportro:main' into main
wkulesza Mar 18, 2024
b5481b2
Fixed NPE caused by null trip or trip id while building block short s…
vesavlad Mar 19, 2024
d5fb68f
Merge branch 'opentransportro:main' into main
wkulesza Mar 20, 2024
41d4f06
add new methods to ConfigService & DbConfig
TsimurSh Mar 26, 2024
abd8d8d
add a new return object to /command/blockIds endpoint
TsimurSh Mar 26, 2024
2e2a02f
replace functionality: /command/blockIds -> /command/serviceIds
TsimurSh Mar 27, 2024
566c918
Merge pull request #2 from goeuropa/block_ids_for_allservice_ids
wkulesza Mar 27, 2024
d5c11e7
fix: parameter boolean
TsimurSh Mar 27, 2024
7c44acb
Merge pull request #3 from goeuropa/block_ids_for_allservice_ids
TsimurSh Mar 27, 2024
34b204f
fix: container-image
TsimurSh Mar 28, 2024
95182d9
Merge pull request #4 from goeuropa/reenable-actions
wkulesza Mar 28, 2024
be984c9
add fetch all to command/vehiclesToBlock
TsimurSh Mar 29, 2024
4dba5a5
refactoring: #1
TsimurSh Mar 29, 2024
32f57f7
add missing tags to /command/vehiclesToBlock
TsimurSh Mar 29, 2024
4d2be81
temp for tests
TsimurSh Mar 29, 2024
8c1c827
refactoring: n.2
TsimurSh Mar 29, 2024
4e54005
Merge pull request #5 from goeuropa/vehicles-to-blocks-update
wkulesza Mar 29, 2024
1e551a6
fix: variables app/pom.xml
TsimurSh Mar 29, 2024
f3946ba
add vehicle_id to schedule adherence report
TsimurSh Apr 3, 2024
0acdd68
Merge pull request #6 from goeuropa/feature/sched_adh_report-add-vehi…
wkulesza Apr 3, 2024
b6820dd
fix: GtfsRtVehicleFeed
TsimurSh Apr 4, 2024
1b97344
add new report for stops
TsimurSh Apr 10, 2024
751e0e6
add new endpoint for stop report
TsimurSh Apr 11, 2024
1c15eb1
Merge pull request #7 from goeuropa/feature/stop_reports
wkulesza Apr 15, 2024
28f0899
add a new method getRoutesByStopId
TsimurSh Apr 19, 2024
d3e1257
fix /command/routesDetails parameter stopId
TsimurSh Apr 19, 2024
0a17317
Merge pull request #8 from goeuropa/feature/routes-details-fix
wkulesza Apr 19, 2024
9faf268
fix conditions if -> else if
TsimurSh Apr 19, 2024
60d4d65
Merge pull request #9 from goeuropa/feature/routes-details-fix
TsimurSh Apr 19, 2024
1a118fe
add condition for manual assigned vehicle
TsimurSh Apr 29, 2024
cf24693
add condition to unset Block for manual assigned vehicle
TsimurSh Apr 30, 2024
422b989
add unset Block when ivolve command/removeVehicleToBlock/
TsimurSh May 6, 2024
0265db0
refactoring
TsimurSh May 6, 2024
2e80409
fix matchNewFixForPredictableVehicle()
TsimurSh May 6, 2024
b6a12a3
fix: conditionals and unsetBlock in VehicleToBlockConfig
TsimurSh May 6, 2024
5a1c371
Merge remote-tracking branch 'origin/fix_manual_assignment' into fix_…
TsimurSh May 6, 2024
0068757
changed the foreign keys for travel_times_for_trip_to_travel_times_fo…
TsimurSh May 16, 2024
f857636
fixed for refereced columns between TravelTimesForTrip and StopPath
TsimurSh May 17, 2024
ca6d969
Fix punctuality reports
hubertgoeuropa May 18, 2024
bb0897f
Merge pull request #13 from goeuropa/bugfix/fix-faulty-database-config
wkulesza May 18, 2024
b51cc9f
Fix wrong block to trip relation mapping
TsimurSh May 20, 2024
c7129db
Merge pull request #14 from goeuropa/fix-wrong-block-to-trip-relation-
TsimurSh May 21, 2024
8fe457f
try with resources
TsimurSh May 21, 2024
e5b8a41
fix mapping in api export data
TsimurSh May 21, 2024
7aaeb20
Merge pull request #15 from goeuropa/fix-api-exports-data
wkulesza May 21, 2024
23f6e89
Merge remote-tracking branch 'refs/remotes/origin/main' into fix_manu…
TsimurSh May 22, 2024
ad7ca29
revert additional condition in matchVehicleToBlockAssignment
TsimurSh May 22, 2024
1b25472
delete unuseful method
TsimurSh May 22, 2024
0ba2bd5
Merge pull request #16 from goeuropa/fix_manual_assignment
wkulesza May 22, 2024
a2e0aba
fix: unset block when manual assigned
TsimurSh May 27, 2024
1db0dec
fixes & latest completes
TsimurSh Jul 10, 2024
bf869dd
change github workflow: delete container-build
TsimurSh Jul 10, 2024
cc6b80a
Merge pull request #17 from goeuropa/last_updates_2024-07
TsimurSh Jul 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
logs
.git
.github
.idea
34 changes: 34 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Java CI with Maven

on:
push:
branches: [ "main", "refactoring" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
name: Checkout

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Build with Maven
run: mvn -B package --file pom.xml
42 changes: 41 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,54 @@
*.class
*.project
*.classpath
.fastRequest
*.iml
.idea/
# Package Files #
*.jar
*.war
*.ear
*.log
/bin/
/docker/
/.settings/
.DS_Store
.flattened-pom.xml
dependency-reduced-pom.xml
target
logs


HELP.md
target/
!../.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/
/.jpb/jpb-settings.xml
config/**/*
1 change: 1 addition & 0 deletions .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Xmx2048m -Djava.awt.headless=true -XX:ParallelGCThreads=4 -XX:ConcGCThreads=4 -Djava.util.concurrent.ForkJoinPool.common.parallelism=4 -XX:CICompilerCount=4 -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:+ExitOnOutOfMemoryError
1 change: 1 addition & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Drevision=2.0.0-SNAPSHOT
2 changes: 2 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
4 changes: 4 additions & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=17.0.9-tem
maven=3.9.6
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

9 changes: 0 additions & 9 deletions BUILD.md

This file was deleted.

216 changes: 197 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,213 @@
core [![Build Status](https://travis-ci.org/TheTransitClock/transitime.svg?branch=develop)](https://travis-ci.org/TheTransitClock/transitime)
====
# :fire::fire: TransitTime :fire::fire:

The complete core Java software for the Transitime real-time transit information project. The goal is to use any type of real-time GPS data to generate useful public transportation information. The system is for both letting passengers know the status of their vehicles and helping agencies more effectively manage their systems. By providing a complete open-source system, agencies can have a cost effective system and have full ownership of it.

The software is currently being used in a production environment for MBTA Commuter Rail and for several smaller agencies.

<b>Build</b>
## :hammer: Setup
In order to build & run the application make sure you have the following requirements fulfilled:
- [ ] you have maven installed
- [ ] you have java 17 or later installed
- [ ] you have docker installed

The software is made up of three modules which can each be built with maven. See BUILD.md
### :wrench: Building
The software is made up of multiple modules which can each be built with maven.
The core functionality is in the [core](core) project. The REST api & webapp is in [app](app) folder.

The core functionality is in the transitime project. The REST api is in transitimeApi and the user Web applicaton is in transitimeWebapp.
```shell
# this will build all the modules of the application
mvn clean install
```

<b>Setup</b>
### :runner: Running
In order to run the application you need a postgres database available, or you could use docker to start an instance
```shell
docker run --rm -e POSTGRES_PASSWORD=transitclock -e POSTGRES_DB=transitclock -p 5432:5432 postgres:15-alpine
```

The main module is transitTime. This has several standalone programs in the org.transitime.applications package.
#### :blue_book: Configuration
- **Properties file**

SchemaGenerator.java will generate the SQL to create the database structures you need to run on.<br/>
DBTest.java can be used to test that the database can be connected to.<br/>
GTFSFileProcessor.java will read a GTFS file into this database structure.<br/>
Core.java is as the name implies is the workhorse of the system. <br/>
RmiQuery.java allows you make queries to the server run in core from the command line.<br/>
CreateAPIKey.java a test app to allow you create test/demo key to access REST api webapp.<br/>
CreateWebAgency.java is used to create and agency that will work in transitimeWebapp.<br/>
After docker has started, and you have postgress running you need to fine tune the application properties
Please adjust the fields were you see comments starting with ```##!!!```.

Details on how to run each of these and their respective parameters are in the README for the transitime module.
```properties
##!!! STATIC GTFS FEED
transitclock.gtfs.url=
transitclock.gtfs.dirName=/var/transitclock/cache
transitclock.gtfs.intervalMsec=86400000
transitclock.autoBlockAssigner.autoAssignerEnabled=true
transitclock.autoBlockAssigner.ignoreAvlAssignments=false
transitclock.autoBlockAssigner.allowableEarlySeconds=600
transitclock.autoBlockAssigner.allowableLateSeconds=600

Once this is set up the next step is to set up the transitimeApi which is a RESTful API. This API makes RMI calls to the RMI Server started by Core.java to provide results. This is a war file which can be deployed into Tomcat.
transitclock.avl.feedTimeoutInMSecs=30000
##!!! RT FEED URI
transitclock.avl.gtfsRealtimeFeedURI=
transitclock.avl.maxSpeed=100
transitclock.avl.numThreads=1
transitclock.avl.queueSize=2400
transitclock.avl.minLatitude=43
transitclock.avl.maxLatitude=48
transitclock.avl.maxLongitude=30
transitclock.avl.minLongitude=20
transitclock.avl.feedPollingRateSecs=15

The transitimeWebapp in turn is a web application which uses the transitTimeAPI to provided a user interface. This is a war file which can be deployed into Tomcat. This connects to the database and the connection information is configured in hibernate.cfg.xml in the src/main/resources directory. Currently this needs to be deployed on the same server as the API.
transitclock.blockLoading.agressive=false

The transitimeQuickStart can be built with mvn install and ran using java -jar transitimeQuickStart it is currently a work in progress but the gui elements can be seen.
transitclock.cache.core.daysPopulateHistoricalCache=0

[![Build Status](https://zenodo.org/badge/DOI/10.5281/zenodo.3550975.svg)](https://zenodo.org/record/3550975#.XdgmVedKjOQ)
transitclock.core.agencyId=stpt
transitclock.core.allowableEarlyDepartureTimeForLoggingEvent=180
transitclock.core.allowableEarlyForLayoverSeconds=1800
transitclock.core.allowableEarlySecondsForInitialMatching=1200
transitclock.core.allowableEarlyTimeForEarlyDepartureSecs=180
transitclock.core.allowableLateAtTerminalForLoggingEvent=240
transitclock.core.allowableLateDepartureTimeForLoggingEvent=360
transitclock.core.allowableLateSeconds=2700
transitclock.core.allowableNumberOfBadMatches=4
transitclock.core.afterStopDistance=100
transitclock.core.beforeStopDistance=100
transitclock.core.cache.tripDataHistoryCache=org.transitclock.core.dataCache.ehcache.scheduled.TripDataHistoryCache
transitclock.core.cache.errorCacheClass=org.transitclock.core.dataCache.ehcache.KalmanErrorCache
transitclock.core.cache.stopArrivalDepartureCache=org.transitclock.core.dataCache.ehcache.StopArrivalDepartureCache
transitclock.core.cache.stopPathPredictionCache=org.transitclock.core.dataCache.StopPathPredictionCache
transitclock.core.cache.dwellTimeModelCache=org.transitclock.core.dataCache.ehcache.scheduled.DwellTimeModelCache
transitclock.core.distanceFromLayoverForEarlyDeparture=250
transitclock.core.dwelltime.model=org.transitclock.core.predictiongenerator.scheduled.dwell.DwellAverage
transitclock.core.dwelltime.headwayGeneratorClass=org.transitclock.core.headwaygenerator.LastArrivalsHeadwayGenerator
transitclock.core.exclusiveBlockAssignments=true
transitclock.core.fillHistoricalCaches=0
transitclock.core.layoverDistance=1000
transitclock.core.longDistanceDeadheadingSpeed=20
transitclock.core.matchHistoryMaxSize=40
transitclock.core.maxHeadingOffsetFromSegment=200
transitclock.core.maxPredictionTimeForDbSecs=1200
transitclock.core.maxPredictionsTimeSecs=1800
transitclock.core.minDistanceForDelayed=60
transitclock.core.minDistanceForNoProgress=60
transitclock.core.onlyNeedArrivalDepartures=false
#transitclock.core.predictionGeneratorClass=org.transitclock.core.predictiongenerator.scheduled.traveltime.kalman.KalmanPredictionGeneratorImpl
transitclock.core.shortDistanceDeadheadingSpeed=10
transitclock.core.timeForDeterminingDelayedSecs=300
transitclock.core.timeForDeterminingNoProgress=360000
transitclock.core.trackHistoricalCaches=false
transitclock.core.useArrivalPredictionsForNormalStops=false

transitclock.db.batchSize=4000
transitclock.db.dbName=STPT
transitclock.db.dbPassword=transitclock
transitclock.db.dbUserName=transitclock
transitclock.db.dbHost=localhost:5432
transitclock.db.storeDataInDatabase=true
transitclock.db.dbType=postgresql


transitclock.predAccuracy.stopsPerTrip=1000
transitclock.predAccuracy.maxPredTimeMinutes=30

transitclock.prediction.data.kalman.mindays=3
transitclock.prediction.data.kalman.maxdays=5
transitclock.prediction.data.kalman.maxdaystosearch=21
transitclock.prediction.data.kalman.percentagePredictionMethodDifferencene=50
transitclock.prediction.data.kalman.tresholdForDifferenceEventLog=60000
transitclock.prediction.rls.lambda=0.9

transitclock.timeout.pollingRateSecs=60

transitclock.modules.optionalModulesList=org.transitclock.core.avl.GtfsRealtimeModule;org.transitclock.core.predAccuracy.PredictionAccuracyModule;org.transitclock.gtfs.GtfsUpdatedModule
##!!! absolute location to the hibernate.cfg.xml file
transitclock.hibernate.configFile=
transitclock.logging.dir=/var/transitclock/logs
transitclock.web.mapTileUrl=http://tile.openstreetmap.org/{z}/{x}/{y}.png
```

- **hibernate config file sample**
```xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration SYSTEM
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">
org.postgresql.Driver
</property>
<property name="hibernate.hikari.autoCommit">false</property>

<!-- Enable full SQL logging that also shows the
parameters being used. show_sql is not really
useful since it duplicates the output of the SQL.
format_sql makes sql more readable but takes up
more space. OK for now but should disable in the
future. use_sql_comments adds comments that might
be nice, but again, should probably be disabled
in the future. -->
<!-- <property name="hibernate.show_sql">true</property>-->
<!-- <property name="hibernate.format_sql">true</property>-->
<!-- <property name="hibernate.use_sql_comments">true</property>-->
<property name="hibernate.hbm2ddl.auto">create-drop</property>
<property name="hibernate.hikari.minimumIdle">5</property>
<property name="hibernate.hikari.maximumPoolSize">20</property>
<property name="hibernate.hikari.idleTimeout">30000</property>
<property name="hibernate.jdbc.batch_size">25</property>
</session-factory>
</hibernate-configuration>
```

#### :bomb: Starting the application
```shell
JAVA_OPTS="-Dtransitclock.configFiles=/location-to-properties-file/transitclock.properties -Dtransitclock.apikey=f78a2e9a"
GTFS_TO_IMPORT="url to gtfs you want to import"

java $JAVA_OPTS -jar app/target/transitclock.jar --gtfs-url $GTFS_TO_IMPORT
```

### :whale: Running using Docker
Simplest way to run the transitclock would be using ```docker```, actually ```docker compose```. For it to happen you would be to map your config into the transitclock container using a configuration as follows:
```yaml
version: "3.18"
services:
db:
image: postgres:15-alpine
restart: always
environment:
POSTGRES_PASSWORD: transitclock
POSTGRES_DB: transitclock
ports:
- "5432:5432"
gtfsrt-validator:
image: ghcr.io/mobilitydata/gtfs-realtime-validator:latest
ports:
- "9090:8080"
transitclock:
image: otrro/transitclock-server:latest
depends_on:
- db
environment:
AGENCYID: transitclock # not that relevant anymore since will be coming from your file
AGENCYNAME: transitclock # has to match what is configured in the file for transitclock.db.dbName and should match POSTGRES_DB specified for postgress
GTFS_URL: https://your feed location
GTFSRTVEHICLEPOSITIONS: https://rt feed location # can be configured in the file directly
PGPASSWORD: transitclock
POSTGRES_PORT_5432_TCP_ADDR: db
POSTGRES_PORT_5432_TCP_PORT: 5432
volumes:
# this mapps the transitclock.properties file that is near to docker-compose file to the one in container that is used by the app
### IMPORTANT NOTE: make sure you have this config transitclock.hibernate.configFile=/app/config/hibernate.cfg.xml
- ./transitclock.properties:/app/config/transitclock.properties
ports:
- "8080:8080"
command:
- --gtfs-url
- https://your feed location
```

After doing this you just simply need to:
```shell
# if you have compose plugin for docker installed
docker compose up # in the folder where you have save the previous content as docker-compose.yaml

# if you have the actual docker-compose application
docker-compose up
```
File renamed without changes.
Loading