From 9d2ba4fce93dd2aacde714cd5a770c8468871132 Mon Sep 17 00:00:00 2001 From: scrudden Date: Wed, 31 Jan 2018 18:33:49 +0000 Subject: [PATCH 1/3] change properties to from transitime. to transitclock. --- pom.xml | 6 +- .../applications/ConvertGtfsRtToCsvFile.java | 8 +- .../org/transitclock/applications/Core.java | 12 +- .../applications/GtfsFileProcessor.java | 6 +- .../transitclock/applications/RmiQuery.java | 2 +- .../applications/ScheduleGenerator.java | 8 +- .../applications/SchemaGenerator.java | 2 +- .../applications/UpdateTravelTimes.java | 2 +- .../transitclock/avl/AmigoCloudAvlModule.java | 8 +- .../java/org/transitclock/avl/AvlClient.java | 2 +- .../org/transitclock/avl/AvlExecutor.java | 8 +- .../transitclock/avl/AvlJmsClientModule.java | 4 +- .../avl/BatchCsvAvlFeedModule.java | 8 +- .../avl/BatchGtfsRealtimeModule.java | 2 +- .../transitclock/avl/GtfsRealtimeModule.java | 2 +- .../transitclock/avl/NextBusAvlModule.java | 10 +- .../org/transitclock/avl/PlaybackModule.java | 16 +-- .../transitclock/avl/PollUrlAvlModule.java | 10 +- .../transitclock/avl/TranslocAvlModule.java | 6 +- .../transitclock/avl/WorkwaveAvlModule.java | 2 +- .../org/transitclock/avl/ZonarAvlModule.java | 6 +- .../avl/calAmp/CalAmpAvlModule.java | 2 +- .../org/transitclock/avl/package-info.java | 8 +- .../avl/via/BatchCsvAvlFeedModule.java | 4 +- .../transitclock/config/ConfigFileReader.java | 22 ++-- .../org/transitclock/config/ConfigValue.java | 2 +- .../org/transitclock/config/package-info.java | 4 +- .../transitclock/configData/AgencyConfig.java | 2 +- .../transitclock/configData/AvlConfig.java | 32 +++--- .../transitclock/configData/CoreConfig.java | 94 +++++++-------- .../configData/DbSetupConfig.java | 18 +-- .../transitclock/configData/RmiConfig.java | 6 +- .../ArrivalDepartureGeneratorDefaultImpl.java | 6 +- .../ArrivalDepartureGeneratorFactory.java | 4 +- .../org/transitclock/core/AvlProcessor.java | 28 ++--- .../transitclock/core/DwellTimeDetails.java | 2 +- .../core/HeadwayGeneratorFactory.java | 4 +- .../core/PredictionGenerator.java | 6 +- .../core/PredictionGeneratorDefaultImpl.java | 10 +- .../core/PredictionGeneratorFactory.java | 4 +- .../org/transitclock/core/ServiceUtils.java | 2 +- .../transitclock/core/TemporalMatcher.java | 2 +- .../core/TimeoutHandlerModule.java | 6 +- .../transitclock/core/TravelTimeDetails.java | 2 +- .../org/transitclock/core/VehicleState.java | 6 +- .../core/autoAssigner/AutoBlockAssigner.java | 14 +-- .../core/dataCache/PredictionDataCache.java | 2 +- .../dataCache/StopArrivalDepartureCache.java | 2 +- .../core/dataCache/TripDataHistoryCache.java | 2 +- .../FrequencyBasedHistoricalAverageCache.java | 10 +- .../HoldingTimeGeneratorDefaultImpl.java | 14 +-- .../HoldingTimeGeneratorFactory.java | 2 +- .../SimpleHoldingTimeGeneratorImpl.java | 6 +- .../NextBusPredictionAccuracyModule.java | 4 +- .../PredictionAccuracyModule.java | 16 +-- .../GTFSRealtimePredictionAccuracyModule.java | 4 +- ...toricalAveragePredictionGeneratorImpl.java | 2 +- ...toricalAveragePredictionGeneratorImpl.java | 2 +- .../kalman/KalmanPredictionGeneratorImpl.java | 8 +- .../SchedBasedPredsModule.java | 10 +- .../core/travelTimes/DataFetcher.java | 4 +- .../travelTimes/TravelTimesProcessor.java | 10 +- .../org/transitclock/custom/DbAvlReader.java | 12 +- .../custom/aws/AvlSqsClientModule.java | 22 ++-- .../georgiaTech/GeorgiaTechAvlModule.java | 4 +- .../transitclock/custom/gtt/GTTAvlModule.java | 2 +- .../custom/gtt/GTTCsvAvlModule.java | 4 +- .../custom/irishrail/GtfsRtAvlModule.java | 2 +- .../lametro/LametroRailNextBusAvlModule.java | 4 +- .../custom/mbta/KeolisAvlModule.java | 6 +- .../mbta/MbtaCommuterRailAvlModule.java | 2 +- .../mbta/MbtaPredictionAccuracyModule.java | 4 +- .../custom/missionBay/GtfsFromNextBus.java | 14 +-- .../custom/missionBay/SfmtaApiCaller.java | 16 +-- .../custom/vta/VtaAcsAvlModule.java | 2 +- .../db/hibernate/HibernateUtils.java | 8 +- .../db/structs/ArrivalDeparture.java | 6 +- .../transitclock/db/structs/AvlReport.java | 2 +- .../org/transitclock/db/structs/Block.java | 2 +- .../db/structs/ConfigRevision.java | 2 +- .../db/webstructs/ApiKeyManager.java | 4 +- .../transitclock/db/webstructs/WebAgency.java | 2 +- .../java/org/transitclock/gtfs/DbConfig.java | 2 +- .../java/org/transitclock/gtfs/GtfsData.java | 16 +-- .../transitclock/gtfs/GtfsUpdatedModule.java | 8 +- .../org/transitclock/gtfs/TitleFormatter.java | 2 +- .../gtfs/gtfsStructs/GtfsTrip.java | 8 +- .../org/transitclock/ipc/jms/JMSWrapper.java | 2 +- .../transitclock/ipc/rmi/ClientFactory.java | 2 +- .../ipc/rmi/RmiCallInvocationHandler.java | 4 +- .../org/transitclock/ipc/rmi/RmiStubInfo.java | 8 +- .../transitclock/ipc/rmi/package-info.java | 6 +- .../maintenance/ArchiveOldFilesModule.java | 20 ++-- .../transitclock/modules/package-info.java | 4 +- .../monitoring/AgencyMonitor.java | 2 +- .../monitoring/AvlFeedMonitor.java | 10 +- .../monitoring/CloudwatchService.java | 8 +- .../monitoring/DatabaseQueueMonitor.java | 4 +- .../transitclock/monitoring/MonitorBase.java | 12 +- .../monitoring/MonitoringModule.java | 4 +- .../monitoring/PredictabilityMonitor.java | 6 +- .../monitoring/SystemCpuMonitor.java | 4 +- .../monitoring/SystemDiskSpaceMonitor.java | 4 +- .../monitoring/SystemMemoryMonitor.java | 4 +- .../org/transitclock/utils/EmailSender.java | 6 +- .../org/transitclock/utils/Encryption.java | 2 +- .../transitclock/utils/TimeZoneSetter.java | 4 +- .../org/transitclock/web/WebConfigParams.java | 4 +- transitclock/src/main/resources/logback.xml | 6 +- .../main/resources/logbackDebugMatching.xml | 6 +- .../src/main/resources/logbackDefault.xml | 6 +- .../src/main/resources/logbackGtfs.xml | 2 +- .../src/main/resources/logbackGtfsWithSql.xml | 2 +- .../src/main/resources/logbackPlayback.xml | 4 +- .../resources/logbackUpdateGtfsSchedule.xml | 4 +- .../resources/logbackUpdateTravelTimes.xml | 4 +- .../main/resources/logbackWithPredictions.xml | 6 +- .../transitime/config/TestAPIKeyManager.java | 69 ----------- .../org/transitime/config/TestConfig.java | 68 ----------- .../java/org/transitime/db/TestDatabase.java | 72 ------------ .../db/structs/TestArrivalDeparture.java | 107 ------------------ .../api/gtfsRealtime/GtfsRtTripFeed.java | 2 +- .../api/rootResources/GtfsRealtimeApi.java | 2 +- .../api/utils/UsageValidator.java | 4 +- .../src/main/resources/logbackTomcat.xml | 4 +- .../main/resources/mysql_hibernate.cfg.xml | 84 -------------- .../main/resources/postgres_hibernate.cfg.xml | 84 -------------- transitclockIntegration/pom.xml | 2 +- .../transitclock/playback/PlaybackModule.java | 6 +- ...veScheduleDifferenceDuringLayoverTest.java | 2 +- ...nerateEffectiveScheduleDifferenceTest.java | 2 +- .../RecoverFromDetourTest.java | 2 +- .../PredictionAccuracyIntegrationTest.java | 2 +- .../java/org/transitclock/gui/InputPanel.java | 2 +- .../org/transitclock/gui/OutputPanel.java | 2 +- .../gui/TransitimeQuickStart.java | 16 +-- .../src/main/resources/logback.xml | 6 +- .../src/main/resources/transitime.properties | 14 +-- .../config/ApiJettyTest.java | 2 +- .../config/CreateApiTest.java | 4 +- .../config/TransiTimeTest.java | 12 +- .../config/createWebAgencyTest.java | 2 +- .../testapp/AppTest.java | 2 +- .../transitclock/reports/ReportsConfig.java | 2 +- .../reports/ScheduleAdherenceController.java | 4 +- .../src/main/resources/hibernate.cfg.xml | 84 -------------- .../src/main/resources/logbackTomcat.xml | 4 +- .../main/resources/mysql_hibernate.cfg.xml | 84 -------------- .../main/resources/postgres_hibernate.cfg.xml | 84 -------------- .../src/main/resources/transiTimeConfig.xml | 75 ------------ .../src/main/webapp/template/includes.jsp | 2 +- 151 files changed, 468 insertions(+), 1279 deletions(-) delete mode 100644 transitclock/src/test/java/org/transitime/config/TestAPIKeyManager.java delete mode 100644 transitclock/src/test/java/org/transitime/config/TestConfig.java delete mode 100644 transitclock/src/test/java/org/transitime/db/TestDatabase.java delete mode 100755 transitclock/src/test/java/org/transitime/db/structs/TestArrivalDeparture.java delete mode 100644 transitclockApi/src/main/resources/mysql_hibernate.cfg.xml delete mode 100644 transitclockApi/src/main/resources/postgres_hibernate.cfg.xml rename transitclockQuickStart/src/test/java/org/{transitime => transitclock}/config/ApiJettyTest.java (98%) rename transitclockQuickStart/src/test/java/org/{transitime => transitclock}/config/CreateApiTest.java (93%) rename transitclockQuickStart/src/test/java/org/{transitime => transitclock}/config/TransiTimeTest.java (90%) rename transitclockQuickStart/src/test/java/org/{transitime => transitclock}/config/createWebAgencyTest.java (97%) rename transitclockQuickStart/src/test/java/org/{transitime => transitclock}/testapp/AppTest.java (98%) delete mode 100755 transitclockWebapp/src/main/resources/hibernate.cfg.xml delete mode 100644 transitclockWebapp/src/main/resources/mysql_hibernate.cfg.xml delete mode 100644 transitclockWebapp/src/main/resources/postgres_hibernate.cfg.xml delete mode 100755 transitclockWebapp/src/main/resources/transiTimeConfig.xml diff --git a/pom.xml b/pom.xml index 11abeb36d..9b6373eef 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 2.0.0-SNAPSHOT pom transitclock - http://www.transitime.org// + http://www.transitclock.org// transitclock transitclockApi @@ -26,8 +26,8 @@ transitclockIntegration transitclock transitclockApi - transitclockWebapp - transitclockQuickStart + transitclockWebapp + transitclockQuickStart diff --git a/transitclock/src/main/java/org/transitclock/applications/ConvertGtfsRtToCsvFile.java b/transitclock/src/main/java/org/transitclock/applications/ConvertGtfsRtToCsvFile.java index 4803244dc..3b5b866b9 100644 --- a/transitclock/src/main/java/org/transitclock/applications/ConvertGtfsRtToCsvFile.java +++ b/transitclock/src/main/java/org/transitclock/applications/ConvertGtfsRtToCsvFile.java @@ -50,7 +50,7 @@ private static List getGtfsRealtimeURIs() { return gtfsRealtimeURIs.getValue(); } private static StringListConfigValue gtfsRealtimeURIs = - new StringListConfigValue("transitime.avl.gtfsRealtimeFeedURIs", + new StringListConfigValue("transitclock.avl.gtfsRealtimeFeedURIs", null, "Semicolon separated list of URIs of the GTFS-realtime data to read in"); @@ -58,7 +58,7 @@ private static String getCsvFileOutputDir() { return csvFileOutputDir.getValue(); } private static StringConfigValue csvFileOutputDir = - new StringConfigValue("transitime.avl.csvFileOutputDir", + new StringConfigValue("transitclock.avl.csvFileOutputDir", "/Users/Mike/gtfsRealtimeData/csv", "Name of directory where output will be written"); @@ -69,7 +69,7 @@ private static String getTimeZoneStr() { return timeZoneStr.getValue(); } private static StringConfigValue timeZoneStr = - new StringConfigValue("transitime.avl.timeZoneStr", + new StringConfigValue("transitclock.avl.timeZoneStr", "", "The timezone for the agency. In the form " + "\"America/New_York\""); @@ -78,7 +78,7 @@ private static boolean shouldOffsetForMapOfChina() { return offsetForMapOfChina.getValue(); } private static BooleanConfigValue offsetForMapOfChina = - new BooleanConfigValue("transitime.avl.offsetForMapOfChina", + new BooleanConfigValue("transitclock.avl.offsetForMapOfChina", false, "If set to true then the latitudes/longitudes stored " + "will be adjusted for the China map offset so that the " + diff --git a/transitclock/src/main/java/org/transitclock/applications/Core.java b/transitclock/src/main/java/org/transitclock/applications/Core.java index e2332fc2b..6cc25aac7 100755 --- a/transitclock/src/main/java/org/transitclock/applications/Core.java +++ b/transitclock/src/main/java/org/transitclock/applications/Core.java @@ -96,17 +96,17 @@ public class Core { // Read in configuration files. This should be done statically before // the logback LoggerFactory.getLogger() is called so that logback can // also be configured using a transitime config file. The files are - // specified using the java system property -Dtransitime.configFiles . + // specified using the java system property -Dtransitclock.configFiles . static { ConfigFileReader.processConfig(); } private static StringConfigValue cacheReloadStartTimeStr = - new StringConfigValue("transitime.core.cacheReloadStartTimeStr", + new StringConfigValue("transitclock.core.cacheReloadStartTimeStr", "", "Date and time of when to start reading arrivaldepartures to inform caches."); private static StringConfigValue cacheReloadEndTimeStr = - new StringConfigValue("transitime.core.cacheReloadEndTimeStr", + new StringConfigValue("transitclock.core.cacheReloadEndTimeStr", "", "Date and time of when to end reading arrivaldepartures to inform caches."); private static final Logger logger = @@ -192,7 +192,7 @@ public Core(String agencyId) { * Creates the Core object for the application. There can only be one Core * object per application. Uses CoreConfig.getAgencyId() to determine the * agencyId. This means it typically uses the agency ID specified by the - * Java property -Dtransitime.core.agencyId . + * Java property -Dtransitclock.core.agencyId . *

* Usually doesn't need to be called directly because can simply use * Core.getInstance(). @@ -373,7 +373,7 @@ private static void processCommandLineOptions(String[] args) // Handle help option if (cmd.hasOption("h")) { // Display help - final String commandLineSyntax = "java transitime.jar"; + final String commandLineSyntax = "java transitclock.jar"; final PrintWriter writer = new PrintWriter(System.out); final HelpFormatter helpFormatter = new HelpFormatter(); helpFormatter.printHelp(writer, @@ -491,7 +491,7 @@ public static void main(String[] args) { List optionalModuleNames = CoreConfig.getOptionalModules(); if (optionalModuleNames.size() > 0) logger.info("Starting up optional modules specified via " + - "transitime.modules.optionalModulesList param:"); + "transitclock.modules.optionalModulesList param:"); else logger.info("No optional modules to start up."); for (String moduleName : optionalModuleNames) { diff --git a/transitclock/src/main/java/org/transitclock/applications/GtfsFileProcessor.java b/transitclock/src/main/java/org/transitclock/applications/GtfsFileProcessor.java index 2e9ffe86f..181ae8721 100644 --- a/transitclock/src/main/java/org/transitclock/applications/GtfsFileProcessor.java +++ b/transitclock/src/main/java/org/transitclock/applications/GtfsFileProcessor.java @@ -311,7 +311,7 @@ public void process() throws IllegalArgumentException { */ private static void displayCommandLineOptions(Options options) { // Display help - final String commandLineSyntax = "java transitime.jar"; + final String commandLineSyntax = "java transitclock.jar"; final PrintWriter writer = new PrintWriter(System.out); final HelpFormatter helpFormatter = new HelpFormatter(); helpFormatter.printHelp(writer, 80, // printedRowWidth @@ -661,10 +661,10 @@ public static void main(String[] args) { // Found that when running on AWS that program never terminates, // probably because still have db threads running. Therefore // using exit() to definitely end the process. - String integrationTest = System.getProperty("transitime.core.integrationTest"); + String integrationTest = System.getProperty("transitclock.core.integrationTest"); if(integrationTest != null){ logger.info("GTFS import complete for integration test"); - System.setProperty("transitime.core.gtfsImported","true"); + System.setProperty("transitclock.core.gtfsImported","true"); }else{ System.exit(0); } diff --git a/transitclock/src/main/java/org/transitclock/applications/RmiQuery.java b/transitclock/src/main/java/org/transitclock/applications/RmiQuery.java index 5a7f3bf1c..7b90ffeb3 100644 --- a/transitclock/src/main/java/org/transitclock/applications/RmiQuery.java +++ b/transitclock/src/main/java/org/transitclock/applications/RmiQuery.java @@ -231,7 +231,7 @@ else if ("resetVehicle".equals(commandStr)) */ private static void displayCommandLineOptionsAndExit(Options options) { // Display help - final String commandLineSyntax = "java transitime.jar"; + final String commandLineSyntax = "java transitclock.jar"; final PrintWriter writer = new PrintWriter(System.out); writer.append( "A command line application that allows user to request data\n" + diff --git a/transitclock/src/main/java/org/transitclock/applications/ScheduleGenerator.java b/transitclock/src/main/java/org/transitclock/applications/ScheduleGenerator.java index b4ffd976e..c775f7832 100644 --- a/transitclock/src/main/java/org/transitclock/applications/ScheduleGenerator.java +++ b/transitclock/src/main/java/org/transitclock/applications/ScheduleGenerator.java @@ -60,7 +60,7 @@ public class ScheduleGenerator { // Read in configuration files. This should be done statically before // the logback LoggerFactory.getLogger() is called so that logback can // also be configured using a transitime config file. The files are - // specified using the java system property -Dtransitime.configFiles . + // specified using the java system property -Dtransitclock.configFiles . static { ConfigFileReader.processConfig(); } @@ -78,7 +78,7 @@ public class ScheduleGenerator { */ private static void displayCommandLineOptions(Options options) { // Display help - final String commandLineSyntax = "java transitime.jar"; + final String commandLineSyntax = "java transitclock.jar"; final PrintWriter writer = new PrintWriter(System.out); final HelpFormatter helpFormatter = new HelpFormatter(); helpFormatter.printHelp(writer, @@ -91,7 +91,7 @@ private static void displayCommandLineOptions(Options options) { null, // footer true); // displayUsage writer.write("Also need to set VM parameters: \n" + - " -Dtransitime.core.agencyId=\n"); + " -Dtransitclock.core.agencyId=\n"); writer.close(); } @@ -211,7 +211,7 @@ private static CommandLine processCommandLineOptions(String[] args) { System.exit(0); } - // Get project ID from VM param transitime.core.agencyId + // Get project ID from VM param transitclock.core.agencyId agencyId = AgencyConfig.getAgencyId(); if (agencyId == null) { displayCommandLineOptions(options); diff --git a/transitclock/src/main/java/org/transitclock/applications/SchemaGenerator.java b/transitclock/src/main/java/org/transitclock/applications/SchemaGenerator.java index 47b279a46..9a749b594 100644 --- a/transitclock/src/main/java/org/transitclock/applications/SchemaGenerator.java +++ b/transitclock/src/main/java/org/transitclock/applications/SchemaGenerator.java @@ -289,7 +289,7 @@ public String getDialectClass() { *

* The resulting files have the name "ddl_" plus dialect name such as mysql * or oracle plus the first two components of the package name such as - * org_transitime. + * org_transitclock. */ public static void main(String[] args) throws Exception { // Handle the command line options diff --git a/transitclock/src/main/java/org/transitclock/applications/UpdateTravelTimes.java b/transitclock/src/main/java/org/transitclock/applications/UpdateTravelTimes.java index 1c6f8e78f..aff571c05 100644 --- a/transitclock/src/main/java/org/transitclock/applications/UpdateTravelTimes.java +++ b/transitclock/src/main/java/org/transitclock/applications/UpdateTravelTimes.java @@ -61,7 +61,7 @@ public class UpdateTravelTimes { // Read in configuration files. This should be done statically before // the logback LoggerFactory.getLogger() is called so that logback can // also be configured using a transitime config file. The files are - // specified using the java system property -Dtransitime.configFiles . + // specified using the java system property -Dtransitclock.configFiles . static { ConfigFileReader.processConfig(); } diff --git a/transitclock/src/main/java/org/transitclock/avl/AmigoCloudAvlModule.java b/transitclock/src/main/java/org/transitclock/avl/AmigoCloudAvlModule.java index fee3ccff6..141670b95 100644 --- a/transitclock/src/main/java/org/transitclock/avl/AmigoCloudAvlModule.java +++ b/transitclock/src/main/java/org/transitclock/avl/AmigoCloudAvlModule.java @@ -46,7 +46,7 @@ */ public class AmigoCloudAvlModule extends AvlModule { private static StringConfigValue feedUrl = new StringConfigValue( - "transitime.avl.amigocloud.apiToken", + "transitclock.avl.amigocloud.apiToken", "R:0pKSjytdXHfGMfWdRjY5xGGUU3FgaamySwDK0u", "The API token obtained from AmigoCloud via " + "https://www.amigocloud.com/accounts/tokens that allows " @@ -54,17 +54,17 @@ public class AmigoCloudAvlModule extends AvlModule { private static LongConfigValue userId = new LongConfigValue( - "transitime.avl.amigocloud.userId", + "transitclock.avl.amigocloud.userId", 1194L, "The ID of the client. Obtained using the amigocloud api " + "token via \"curl https://www.amigocloud.com/api/v1/me?token=API_TOKEN\""); private static LongConfigValue projectId = new LongConfigValue( - "transitime.avl.amigocloud.projectId", 661L, + "transitclock.avl.amigocloud.projectId", 661L, "The amigocloud ID of the agency that getting AVL data " + "from."); private static LongConfigValue datasetId = new LongConfigValue( - "transitime.avl.amigocloud.datasetId", 12556L, + "transitclock.avl.amigocloud.datasetId", 12556L, "The amigocloud ID of the dataset for the agency that " + "getting AVL data from."); diff --git a/transitclock/src/main/java/org/transitclock/avl/AvlClient.java b/transitclock/src/main/java/org/transitclock/avl/AvlClient.java index 91a37cdd4..b0d70a34f 100644 --- a/transitclock/src/main/java/org/transitclock/avl/AvlClient.java +++ b/transitclock/src/main/java/org/transitclock/avl/AvlClient.java @@ -134,7 +134,7 @@ public void run() { logger.debug("Not processing AVL report because the new " + "report is too close in time to the previous AVL " + "report for the vehicle. " - + "transitime.avl.minTimeBetweenAvlReportsSecs={} " + + "transitclock.avl.minTimeBetweenAvlReportsSecs={} " + "secs. New AVL report is {}. Previous valid AVL " + "report is {}", AvlConfig.getMinTimeBetweenAvlReportsSecs(), diff --git a/transitclock/src/main/java/org/transitclock/avl/AvlExecutor.java b/transitclock/src/main/java/org/transitclock/avl/AvlExecutor.java index 1e44f2dfb..2ecbb21a5 100644 --- a/transitclock/src/main/java/org/transitclock/avl/AvlExecutor.java +++ b/transitclock/src/main/java/org/transitclock/avl/AvlExecutor.java @@ -34,8 +34,8 @@ * A singleton thread executor for executing AVL reports. For when not using JMS * to handle queue of AVL reports. One can dump AVL reports into this executor * and then have them be executed, possibly using multiple threads. The number - * of threads is specified using the Java property transitime.avl.numThreads . - * The queue size is set using the Java property transitime.avl.queueSize . + * of threads is specified using the Java property transitclock.avl.numThreads . + * The queue size is set using the Java property transitclock.avl.queueSize . *

* Causes AvlClient.run() to be called on each AvlReport, unless using test * executor, in which case the AvlClientTester() is called. @@ -58,7 +58,7 @@ public class AvlExecutor { private final static int MAX_THREADS = 25; private static IntegerConfigValue avlQueueSize = - new IntegerConfigValue("transitime.avl.queueSize", 2000, + new IntegerConfigValue("transitclock.avl.queueSize", 2000, "How many items to go into the blocking AVL queue " + "before need to wait for queue to have space. Should " + "be approximately 50% more than the number of reports " @@ -67,7 +67,7 @@ public class AvlExecutor { + "data will be rejected by the ThreadPoolExecutor. "); private static IntegerConfigValue numAvlThreads = - new IntegerConfigValue("transitime.avl.numThreads", 1, + new IntegerConfigValue("transitclock.avl.numThreads", 1, "How many threads to be used for processing the AVL " + "data. For most applications just using a single thread " + "is probably sufficient and it makes the logging simpler " + diff --git a/transitclock/src/main/java/org/transitclock/avl/AvlJmsClientModule.java b/transitclock/src/main/java/org/transitclock/avl/AvlJmsClientModule.java index 3469c4983..fe5340ade 100644 --- a/transitclock/src/main/java/org/transitclock/avl/AvlJmsClientModule.java +++ b/transitclock/src/main/java/org/transitclock/avl/AvlJmsClientModule.java @@ -52,13 +52,13 @@ public class AvlJmsClientModule extends Module { private final static int MAX_THREADS = 100; private static IntegerConfigValue avlQueueSize = - new IntegerConfigValue("transitime.avl.jmsQueueSize", 350, + new IntegerConfigValue("transitclock.avl.jmsQueueSize", 350, "How many items to go into the blocking AVL queue " + "before need to wait for queue to have space. " + "Only for when JMS is used."); private static IntegerConfigValue numAvlThreads = - new IntegerConfigValue("transitime.avl.jmsNumThreads", 1, + new IntegerConfigValue("transitclock.avl.jmsNumThreads", 1, "How many threads to be used for processing the AVL " + "data. For most applications just using a single thread " + "is probably sufficient and it makes the logging simpler " + diff --git a/transitclock/src/main/java/org/transitclock/avl/BatchCsvAvlFeedModule.java b/transitclock/src/main/java/org/transitclock/avl/BatchCsvAvlFeedModule.java index 7d4d9ec2f..2c5ae15ac 100644 --- a/transitclock/src/main/java/org/transitclock/avl/BatchCsvAvlFeedModule.java +++ b/transitclock/src/main/java/org/transitclock/avl/BatchCsvAvlFeedModule.java @@ -53,13 +53,13 @@ private static String getCsvAvlFeedFileName() { return csvAvlFeedFileName.getValue(); } private static StringConfigValue csvAvlFeedFileName = - new StringConfigValue("transitime.avl.csvAvlFeedFileName", + new StringConfigValue("transitclock.avl.csvAvlFeedFileName", "/Users/Mike/cvsAvlData/testAvlData.csv", "The name of the CSV file containing AVL data to process."); private static BooleanConfigValue processInRealTime = - new BooleanConfigValue("transitime.avl.processInRealTime", + new BooleanConfigValue("transitclock.avl.processInRealTime", false, "For when getting batch of AVL data from a CSV file. " + "When true then when reading in do at the same speed as " @@ -134,9 +134,9 @@ public void run() { } // Kill off the whole program because done processing the AVL data - String integrationTest = System.getProperty("transitime.core.integrationTest"); + String integrationTest = System.getProperty("transitclock.core.integrationTest"); if(integrationTest != null){ - System.setProperty("transitime.core.csvImported","true"); + System.setProperty("transitclock.core.csvImported","true"); }else{ System.exit(0); } diff --git a/transitclock/src/main/java/org/transitclock/avl/BatchGtfsRealtimeModule.java b/transitclock/src/main/java/org/transitclock/avl/BatchGtfsRealtimeModule.java index 18d5f6883..8f90f6d34 100644 --- a/transitclock/src/main/java/org/transitclock/avl/BatchGtfsRealtimeModule.java +++ b/transitclock/src/main/java/org/transitclock/avl/BatchGtfsRealtimeModule.java @@ -65,7 +65,7 @@ public static List getGtfsRealtimeURIs() { return gtfsRealtimeURIs.getValue(); } private static StringListConfigValue gtfsRealtimeURIs = - new StringListConfigValue("transitime.avl.gtfsRealtimeFeedURIs", + new StringListConfigValue("transitclock.avl.gtfsRealtimeFeedURIs", null, "Semicolon separated list of URIs of the GTFS-realtime data to read in"); diff --git a/transitclock/src/main/java/org/transitclock/avl/GtfsRealtimeModule.java b/transitclock/src/main/java/org/transitclock/avl/GtfsRealtimeModule.java index 2f9d56674..64c23f69c 100644 --- a/transitclock/src/main/java/org/transitclock/avl/GtfsRealtimeModule.java +++ b/transitclock/src/main/java/org/transitclock/avl/GtfsRealtimeModule.java @@ -54,7 +54,7 @@ public static String getGtfsRealtimeURI() { return gtfsRealtimeURI.getValue(); } private static StringConfigValue gtfsRealtimeURI = - new StringConfigValue("transitime.avl.gtfsRealtimeFeedURI", + new StringConfigValue("transitclock.avl.gtfsRealtimeFeedURI", "file:///C:/Users/Mike/gtfsRealtimeData", "The URI of the GTFS-realtime feed to use."); diff --git a/transitclock/src/main/java/org/transitclock/avl/NextBusAvlModule.java b/transitclock/src/main/java/org/transitclock/avl/NextBusAvlModule.java index 6be824fe1..8741f2253 100644 --- a/transitclock/src/main/java/org/transitclock/avl/NextBusAvlModule.java +++ b/transitclock/src/main/java/org/transitclock/avl/NextBusAvlModule.java @@ -44,7 +44,7 @@ public class NextBusAvlModule extends XmlPollingAvlModule { // Parameter that specifies URL of the NextBus feed. private static StringConfigValue nextBusFeedUrl = - new StringConfigValue("transitime.avl.nextbus.url", + new StringConfigValue("transitclock.avl.nextbus.url", "http://webservices.nextbus.com/service/publicXMLFeed", "The URL of the NextBus feed to use."); private static String getNextBusFeedUrl() { @@ -54,9 +54,9 @@ private static String getNextBusFeedUrl() { // Config param that specifies the agency name to use as part // of the NextBus feed URL. private static StringConfigValue agencyNameForFeed = - new StringConfigValue("transitime.avl.nextbus.agencyNameForFeed", + new StringConfigValue("transitclock.avl.nextbus.agencyNameForFeed", "If set then specifies the agency name to use for the " - + "feed. If not set then the transitime.core.agencyId " + + "feed. If not set then the transitclock.core.agencyId " + "is used."); protected String getAgencyNameForFeed() { return agencyNameForFeed.getValue(); @@ -64,7 +64,7 @@ protected String getAgencyNameForFeed() { private static BooleanConfigValue useTripShortNameForAssignment = new BooleanConfigValue( - "transitime.avl.nextbus.useTripShortNameForAssignment", + "transitclock.avl.nextbus.useTripShortNameForAssignment", false, "For some agencies the block info in the feed doesn't " + "match the GTFS data. For these can sometimes use the " @@ -78,7 +78,7 @@ protected String getAgencyNameForFeed() { // decreased. private static IntegerConfigValue apiClockSkewMsecs = new IntegerConfigValue( - "transitime.avl.nextbus.apiClockSkewMsecs", + "transitclock.avl.nextbus.apiClockSkewMsecs", 0, "Determining GPS time from API is kludgey. Only have " + "secsSinceReport attribute in API. Sometimes, probably " diff --git a/transitclock/src/main/java/org/transitclock/avl/PlaybackModule.java b/transitclock/src/main/java/org/transitclock/avl/PlaybackModule.java index 0af6499db..451114488 100644 --- a/transitclock/src/main/java/org/transitclock/avl/PlaybackModule.java +++ b/transitclock/src/main/java/org/transitclock/avl/PlaybackModule.java @@ -57,7 +57,7 @@ private static String getPlaybackVehicleId() { return playbackVehicleId.getValue(); } private static StringConfigValue playbackVehicleId = - new StringConfigValue("transitime.avl.playbackVehicleId", + new StringConfigValue("transitclock.avl.playbackVehicleId", "", "ID of vehicle to playback."); @@ -65,17 +65,17 @@ private static String getPlaybackStartTimeStr() { return playbackStartTimeStr.getValue(); } private static StringConfigValue playbackStartTimeStr = - new StringConfigValue("transitime.avl.playbackStartTime", + new StringConfigValue("transitclock.avl.playbackStartTime", "", "Date and time of when to start the playback."); private static StringConfigValue playbackEndTimeStr = - new StringConfigValue("transitime.avl.playbackEndTime", + new StringConfigValue("transitclock.avl.playbackEndTime", "", "Date and time of when to end the playback."); private static BooleanConfigValue playbackRealtime = - new BooleanConfigValue("transitime.avl.playbackRealtime", + new BooleanConfigValue("transitclock.avl.playbackRealtime", false, "Playback at normal time speed rather than as fast as possible."); /********************* Logging **************************/ @@ -110,7 +110,7 @@ private static long parsePlaybackStartTime(String playbackStartTimeStr) { // If specified time is in the future then reject. if (playbackStartTime > System.currentTimeMillis()) { logger.error("Playback start time \"{}\" specified by " + - "transitime.avl.playbackStartTime parameter is in " + + "transitclock.avl.playbackStartTime parameter is in " + "the future and therefore invalid!", playbackStartTimeStr); System.exit(-1); @@ -119,7 +119,7 @@ private static long parsePlaybackStartTime(String playbackStartTimeStr) { return playbackStartTime; } catch (java.text.ParseException e) { logger.error("Paramater -t \"{}\" specified by " + - "transitime.avl.playbackStartTime parameter could not " + + "transitclock.avl.playbackStartTime parameter could not " + "be parsed. Format must be \"MM-dd-yyyy HH:mm:ss\"", playbackStartTimeStr); System.exit(-1); @@ -136,7 +136,7 @@ private static long parsePlaybackEndTime(String playbackEndTimeStr) { // If specified time is in the future then reject. if (playbackEndTime > System.currentTimeMillis()) { logger.error("Playback end time \"{}\" specified by " + - "transitime.avl.playbackEndTime parameter is in " + + "transitclock.avl.playbackEndTime parameter is in " + "the future and therefore invalid!", playbackEndTimeStr); System.exit(-1); @@ -145,7 +145,7 @@ private static long parsePlaybackEndTime(String playbackEndTimeStr) { return playbackEndTime; } catch (java.text.ParseException e) { logger.error("Paramater -t \"{}\" specified by " + - "transitime.avl.playbackEndTime parameter could not " + + "transitclock.avl.playbackEndTime parameter could not " + "be parsed. Format must be \"MM-dd-yyyy HH:mm:ss\"", playbackEndTimeStr); System.exit(-1); diff --git a/transitclock/src/main/java/org/transitclock/avl/PollUrlAvlModule.java b/transitclock/src/main/java/org/transitclock/avl/PollUrlAvlModule.java index 2ed00d2fb..9a8aaf383 100644 --- a/transitclock/src/main/java/org/transitclock/avl/PollUrlAvlModule.java +++ b/transitclock/src/main/java/org/transitclock/avl/PollUrlAvlModule.java @@ -49,27 +49,27 @@ * an AvlClient. If not in JMS mode then uses a BoundedExecutor with multiple * threads to directly call AvlClient.run(). * - * @author Michael Smith (michael@transitime.org) + * @author Michael Smith (michael@transitclock.org) * */ public abstract class PollUrlAvlModule extends AvlModule { private static StringConfigValue url = - new StringConfigValue("transitime.avl.url", + new StringConfigValue("transitclock.avl.url", "The URL of the AVL feed to poll."); private static StringConfigValue authenticationUser = - new StringConfigValue("transitime.avl.authenticationUser", + new StringConfigValue("transitclock.avl.authenticationUser", "If authentication used for the feed then this specifies " + "the user."); private static StringConfigValue authenticationPassword = - new StringConfigValue("transitime.avl.authenticationPassword", + new StringConfigValue("transitclock.avl.authenticationPassword", "If authentication used for the feed then this specifies " + "the password."); private static BooleanConfigValue shouldProcessAvl = - new BooleanConfigValue("transitime.avl.shouldProcessAvl", + new BooleanConfigValue("transitclock.avl.shouldProcessAvl", true, "Usually want to process the AVL data when it is read in " + "so that predictions and such are generated. But if " diff --git a/transitclock/src/main/java/org/transitclock/avl/TranslocAvlModule.java b/transitclock/src/main/java/org/transitclock/avl/TranslocAvlModule.java index 4fc6200e5..fc4f320cd 100644 --- a/transitclock/src/main/java/org/transitclock/avl/TranslocAvlModule.java +++ b/transitclock/src/main/java/org/transitclock/avl/TranslocAvlModule.java @@ -45,18 +45,18 @@ */ public class TranslocAvlModule extends PollUrlAvlModule { private static StringConfigValue feedUrl = - new StringConfigValue("transitime.avl.transloc.url", + new StringConfigValue("transitclock.avl.transloc.url", "https://transloc-api-1-2.p.mashape.com/", "The URL of the Transloc API to use."); private static StringConfigValue feedAgencyId = - new StringConfigValue("transitime.avl.transloc.agencyId", + new StringConfigValue("transitclock.avl.transloc.agencyId", "255", "The number Transloc agency ID obtained using the Transloc " + "API agencies.json command."); private static StringConfigValue apiKey = - new StringConfigValue("transitime.avl.transloc.apiKey", + new StringConfigValue("transitclock.avl.transloc.apiKey", "tXHlJmqevJmsh4q37xKuv3k2vfZ5p1VbAvPjsnwErq18jMCSmb", "The API key for the Transloc API."); diff --git a/transitclock/src/main/java/org/transitclock/avl/WorkwaveAvlModule.java b/transitclock/src/main/java/org/transitclock/avl/WorkwaveAvlModule.java index b076179e2..7313413d1 100644 --- a/transitclock/src/main/java/org/transitclock/avl/WorkwaveAvlModule.java +++ b/transitclock/src/main/java/org/transitclock/avl/WorkwaveAvlModule.java @@ -56,7 +56,7 @@ public class WorkwaveAvlModule extends PollUrlAvlModule { new SimpleDateFormat("MM/dd/yy hh:mm:ss a"); private static StringConfigValue apiKey = - new StringConfigValue("transitime.avl.workwaveApiKey", + new StringConfigValue("transitclock.avl.workwaveApiKey", "The API key to use when getting session ID for Workwave " + "AVL feed."); diff --git a/transitclock/src/main/java/org/transitclock/avl/ZonarAvlModule.java b/transitclock/src/main/java/org/transitclock/avl/ZonarAvlModule.java index 8072e1cc8..2a35b70d3 100644 --- a/transitclock/src/main/java/org/transitclock/avl/ZonarAvlModule.java +++ b/transitclock/src/main/java/org/transitclock/avl/ZonarAvlModule.java @@ -40,17 +40,17 @@ public class ZonarAvlModule extends XmlPollingAvlModule { private static StringConfigValue zonarAccount = - new StringConfigValue("transitime.avl.zonarAccount", + new StringConfigValue("transitclock.avl.zonarAccount", "The Zonar count name used as part of the domain name for " + "requests. Consists of 3 lower-case letters and 4 " + "digits, e.g. abc1234."); private static StringConfigValue zonarUserName = - new StringConfigValue("transitime.avl.zonarUserName", + new StringConfigValue("transitclock.avl.zonarUserName", "The Zonar user name for API calls."); private static StringConfigValue zonarPassword = - new StringConfigValue("transitime.avl.zonarPassword", + new StringConfigValue("transitclock.avl.zonarPassword", "The Zonar password for API calls."); private static final double KM_PER_HOUR_TO_METERS_PER_SEC = 0.27777777777778; diff --git a/transitclock/src/main/java/org/transitclock/avl/calAmp/CalAmpAvlModule.java b/transitclock/src/main/java/org/transitclock/avl/calAmp/CalAmpAvlModule.java index 363f6f77a..fdc01df90 100644 --- a/transitclock/src/main/java/org/transitclock/avl/calAmp/CalAmpAvlModule.java +++ b/transitclock/src/main/java/org/transitclock/avl/calAmp/CalAmpAvlModule.java @@ -12,7 +12,7 @@ public class CalAmpAvlModule extends AvlModule { private static IntegerConfigValue calAmpFeedPort = new IntegerConfigValue( - "transitime.avl.calAmpFeedPort", 20500, + "transitclock.avl.calAmpFeedPort", 20500, "The port number for the UDP socket connection for the " + "CalAmp GPS tracker feed."); diff --git a/transitclock/src/main/java/org/transitclock/avl/package-info.java b/transitclock/src/main/java/org/transitclock/avl/package-info.java index f7d372126..9ec29e18a 100644 --- a/transitclock/src/main/java/org/transitclock/avl/package-info.java +++ b/transitclock/src/main/java/org/transitclock/avl/package-info.java @@ -49,17 +49,17 @@ * means it is very easy to start. Also means that the Module.getProjectId() * method is used specify which database the data is to be written to and * the name of the JMS topic for the feed. This also means that the - * command line param -Dtransitime.modules.optionalModulesList=XXX is + * command line param -Dtransitclock.modules.optionalModulesList=XXX is * used to start up the desired AVL modules. *

* Configuration parameters for AVL modules are listed in the AvlConfig.java - * class. Important params include -Dtransitime.db.storeDataInDatabase=false + * class. Important params include -Dtransitclock.db.storeDataInDatabase=false * if the generated data such as arrivals/departures should not be stored * in the database. This is important for when in playback mode for * debugging or such. Another important parameter is - * -Dtransitime.avl.shouldUseJms=true if you want to use JMS. In that case you + * -Dtransitclock.avl.shouldUseJms=true if you want to use JMS. In that case you * also need to specify both an AVL feed module and a JMS client module, such as - * -Dtransitime.modules.optionalModulesList=org.transitclock.avl.MuniNextBusAvlModule;org.transitclock.avl.AvlJmsClientModule + * -Dtransitclock.modules.optionalModulesList=org.transitclock.avl.MuniNextBusAvlModule;org.transitclock.avl.AvlJmsClientModule */ package org.transitclock.avl; diff --git a/transitclock/src/main/java/org/transitclock/avl/via/BatchCsvAvlFeedModule.java b/transitclock/src/main/java/org/transitclock/avl/via/BatchCsvAvlFeedModule.java index 7bd0e2615..f424729b8 100644 --- a/transitclock/src/main/java/org/transitclock/avl/via/BatchCsvAvlFeedModule.java +++ b/transitclock/src/main/java/org/transitclock/avl/via/BatchCsvAvlFeedModule.java @@ -53,13 +53,13 @@ private static String getCsvAvlFeedFileName() { return csvAvlFeedFileName.getValue(); } private static StringConfigValue csvAvlFeedFileName = - new StringConfigValue("transitime.avl.csvAvlFeedFileName", + new StringConfigValue("transitclock.avl.csvAvlFeedFileName", "/Users/Mike/cvsAvlData/testAvlData.csv", "The name of the CSV file containing AVL data to process."); private static BooleanConfigValue processInRealTime = - new BooleanConfigValue("transitime.avl.processInRealTime", + new BooleanConfigValue("transitclock.avl.processInRealTime", false, "For when getting batch of AVL data from a CSV file. " + "When true then when reading in do at the same speed as " diff --git a/transitclock/src/main/java/org/transitclock/config/ConfigFileReader.java b/transitclock/src/main/java/org/transitclock/config/ConfigFileReader.java index e39846d14..0d18f11cd 100644 --- a/transitclock/src/main/java/org/transitclock/config/ConfigFileReader.java +++ b/transitclock/src/main/java/org/transitclock/config/ConfigFileReader.java @@ -62,9 +62,9 @@ * since the properties are not overwritten if already set. *

* The params are configured in an XML or a properties file. The member - * processConfig() first process a file named transitime.properties if one + * processConfig() first process a file named transitclock.properties if one * exists in the classpath. Then files specified by the Java system property - * transitime.configFiles . If the file has a .xml suffix then it will be + * transitclock.configFiles . If the file has a .xml suffix then it will be * processed as XML. Otherwise it will be processed as a regular properties * file. Multiple config files can be used. Each XML file should have a * corresponding configuration class such as CoreConfig.java. In the @@ -145,7 +145,7 @@ private static void processChildren(NodeList nodeList, List names) { } else { // Determine full name of parameter by appending node // names together, separated by a period. So get something - // like "transitime.predictor.radius". + // like "transitclock.predictor.radius". StringBuilder propertyNameBuilder = new StringBuilder(""); for (int j = 0; j < names.size(); ++j) { String name = names.get(j); @@ -199,7 +199,7 @@ private static boolean hasChildNodesThatAreElements(Node node) { * configFileData. The file is expected to be very simple. Attributes are * ignored. Only values are used. The keys for the resulting HashMap are * based on the XML tags and their nesting. So if one is setting a value of - * 75 to a param with a key transitime.predictor.allowableDistanceFromPath + * 75 to a param with a key transitclock.predictor.allowableDistanceFromPath * the XML would look like: {@code * * @@ -376,9 +376,9 @@ public static void processConfig(String fileName) throws ConfigException, Config /** * Process the configuration file specified by a file named - * transitime.properties that is in the classpath. The processes + * transitclock.properties that is in the classpath. The processes * configuration files specified by the Java system property - * transitime.configFiles. The transitime.configFiles property is a ";" + * transitclock.configFiles. The transitclock.configFiles property is a ";" * separated list so can specify multiple files. The files can be either in * either XML or in Java properties format. *

@@ -391,9 +391,9 @@ public static void processConfig(String fileName) throws ConfigException, Config * files. */ public static void processConfig() { - // Determine from the Java system property transitime.configFiles + // Determine from the Java system property transitclock.configFiles // the configuration files to be read - String configFilesStr = System.getProperty("transitime.configFiles"); + String configFilesStr = System.getProperty("transitclock.configFiles"); if (configFilesStr != null) { String configFiles[] = configFilesStr.split(";"); for (String fileName : configFiles) { @@ -406,11 +406,11 @@ public static void processConfig() { } } - // If the file transitime.properties exists in the classpath then - // process it. This is done after the transitime.configFiles files + // If the file transitclock.properties exists in the classpath then + // process it. This is done after the transitclock.configFiles files // are read in so that they have precedence over the file found // in the classpath. - String defaultPropertiesFileName = "transitime.properties"; + String defaultPropertiesFileName = "transitclock.properties"; InputStream propertiesInput = ConfigFileReader.class.getClassLoader() .getResourceAsStream(defaultPropertiesFileName); if (propertiesInput != null) { diff --git a/transitclock/src/main/java/org/transitclock/config/ConfigValue.java b/transitclock/src/main/java/org/transitclock/config/ConfigValue.java index b5f0ff1ed..49a91bdd3 100644 --- a/transitclock/src/main/java/org/transitclock/config/ConfigValue.java +++ b/transitclock/src/main/java/org/transitclock/config/ConfigValue.java @@ -36,7 +36,7 @@ */ public abstract class ConfigValue { // Name of the param. Also used as Java property name - // (e.g. -Dtransitime.limit=2) + // (e.g. -Dtransitclock.limit=2) protected final String id; // Value to use if not specified in config file. Can be null. diff --git a/transitclock/src/main/java/org/transitclock/config/package-info.java b/transitclock/src/main/java/org/transitclock/config/package-info.java index 7bd96a3ea..68c7ef113 100644 --- a/transitclock/src/main/java/org/transitclock/config/package-info.java +++ b/transitclock/src/main/java/org/transitclock/config/package-info.java @@ -28,14 +28,14 @@ * return projectId.getValue(); * } * private static StringConfigValue projectId = - * new StringConfigValue("transitime.core.projectId", "sfmta"); + * new StringConfigValue("transitclock.core.projectId", "sfmta"); * } * * * Such a parameter can be set either using a command line java property when the * application is invoked, such as: * - * -Dtransitime.core.projectId=mbta + * -Dtransitclock.core.projectId=mbta * *

* Or in a configuration file: diff --git a/transitclock/src/main/java/org/transitclock/configData/AgencyConfig.java b/transitclock/src/main/java/org/transitclock/configData/AgencyConfig.java index e259ab6a7..2f52e2b51 100644 --- a/transitclock/src/main/java/org/transitclock/configData/AgencyConfig.java +++ b/transitclock/src/main/java/org/transitclock/configData/AgencyConfig.java @@ -39,7 +39,7 @@ public static String getAgencyId() { return projectId.getValue(); } private static StringConfigValue projectId = - new StringConfigValue("transitime.core.agencyId", + new StringConfigValue("transitclock.core.agencyId", null, "Specifies the ID of the agency. Used for the database " + "name and in the logback configuration to specify the " + diff --git a/transitclock/src/main/java/org/transitclock/configData/AvlConfig.java b/transitclock/src/main/java/org/transitclock/configData/AvlConfig.java index ebe530499..a68783199 100644 --- a/transitclock/src/main/java/org/transitclock/configData/AvlConfig.java +++ b/transitclock/src/main/java/org/transitclock/configData/AvlConfig.java @@ -39,7 +39,7 @@ public static boolean shouldUseJms() { return shouldUseJms.getValue(); } private static BooleanConfigValue shouldUseJms = - new BooleanConfigValue("transitime.avl.shouldUseJms", false, + new BooleanConfigValue("transitclock.avl.shouldUseJms", false, "Specifies whether should use JMS queue for handling " + "AVL reports. Useful for if feed is read on one machine " + "but processed on another."); @@ -52,7 +52,7 @@ public static int getSecondsBetweenAvlFeedPolling() { return secondsBetweenAvlFeedPolling.getValue(); } private static IntegerConfigValue secondsBetweenAvlFeedPolling = - new IntegerConfigValue("transitime.avl.feedPollingRateSecs", 5, + new IntegerConfigValue("transitclock.avl.feedPollingRateSecs", 5, "How frequently an AVL feed should be polled for new data."); /** @@ -63,7 +63,7 @@ public static int getAvlFeedTimeoutInMSecs() { return avlFeedTimeoutInMSecs.getValue(); } private static IntegerConfigValue avlFeedTimeoutInMSecs = - new IntegerConfigValue("transitime.avl.feedTimeoutInMSecs", 10000, + new IntegerConfigValue("transitclock.avl.feedTimeoutInMSecs", 10000, "For when polling AVL XML feed. The feed logs error if " + "the timeout value is exceeded when performing the XML " + "request."); @@ -76,12 +76,12 @@ public static double getMaxAvlSpeed() { return maxAvlSpeed.getValue(); } private static DoubleConfigValue maxAvlSpeed = - new DoubleConfigValue("transitime.avl.maxSpeed", + new DoubleConfigValue("transitclock.avl.maxSpeed", 31.3, // 31.3m/s = 70mph "Max speed between AVL reports for a vehicle. If this " + "value is exceeded then the AVL report is ignored."); - private static DoubleConfigValue alternativeMaxSpeed = new DoubleConfigValue("transitime.avl.alternativemaxspeed", + private static DoubleConfigValue alternativeMaxSpeed = new DoubleConfigValue("transitclock.avl.alternativemaxspeed", 15.0, // 31.3m/s = 70mph "Alernative max speed between AVL reports for a vehicle. If this " + "value is exceeded then the AVL report is ignored."); @@ -100,7 +100,7 @@ public static int getMaxStopPathsAhead() return maxStopPathsAhead.getValue(); } private static IntegerConfigValue maxStopPathsAhead = - new IntegerConfigValue("transitime.avl.maxStopPathsAhead", + new IntegerConfigValue("transitclock.avl.maxStopPathsAhead", 999, "Max stopPaths ahead to look for match."); /** @@ -112,7 +112,7 @@ public static double minSpeedForValidHeading() { return minSpeedForValidHeading.getValue(); } private static DoubleConfigValue minSpeedForValidHeading = - new DoubleConfigValue("transitime.avl.minSpeedForValidHeading", + new DoubleConfigValue("transitclock.avl.minSpeedForValidHeading", 1.5, // 1.5m/s = .34mph "If AVL report speed is below this threshold then the " + "heading is not considered valid."); @@ -132,7 +132,7 @@ public static String getMinAvlLatitudeParamName() { return minAvlLatitude.getID(); } private static FloatConfigValue minAvlLatitude = - new FloatConfigValue("transitime.avl.minLatitude", 15.0f, + new FloatConfigValue("transitclock.avl.minLatitude", 15.0f, "For filtering out bad AVL reports. The default values " + "of latitude 15.0 to 55.0 and longitude of -135.0 to " + "-60.0 are for North America, including Mexico and " + @@ -146,7 +146,7 @@ public static String getMaxAvlLatitudeParamName() { return maxAvlLatitude.getID(); } private static FloatConfigValue maxAvlLatitude = - new FloatConfigValue("transitime.avl.maxLatitude", 55.0f, + new FloatConfigValue("transitclock.avl.maxLatitude", 55.0f, "For filtering out bad AVL reports. The default values " + "of latitude 15.0 to 55.0 and longitude of -135.0 to " + "-60.0 are for North America, including Mexico and " + @@ -160,7 +160,7 @@ public static String getMinAvlLongitudeParamName() { return minAvlLongitude.getID(); } private static FloatConfigValue minAvlLongitude = - new FloatConfigValue("transitime.avl.minLongitude", -135.0f, + new FloatConfigValue("transitclock.avl.minLongitude", -135.0f, "For filtering out bad AVL reports. The default values " + "of latitude 15.0 to 55.0 and longitude of -135.0 to " + "-60.0 are for North America, including Mexico and " + @@ -174,7 +174,7 @@ public static String getMaxAvlLongitudeParamName() { return maxAvlLongitude.getID(); } private static FloatConfigValue maxAvlLongitude = - new FloatConfigValue("transitime.avl.maxLongitude", -60.0f, + new FloatConfigValue("transitclock.avl.maxLongitude", -60.0f, "For filtering out bad AVL reports. The default values " + "of latitude 15.0 to 55.0 and longitude of -135.0 to " + "-60.0 are for North America, including Mexico and " + @@ -185,19 +185,19 @@ public static String getMaxAvlLongitudeParamName() { * So can filter out unpredictable assignments such as for training coaches, * service vehicles, or simply vehicles that are not in service and should * not be attempted to be made predictable. Returns empty string, the - * default value if transitime.avl.unpredictableAssignmentsRegEx is not set. + * default value if transitclock.avl.unpredictableAssignmentsRegEx is not set. */ public static String getUnpredictableAssignmentsRegEx() { return unpredictableAssignmentsRegEx.getValue(); } private static StringConfigValue unpredictableAssignmentsRegEx = - new StringConfigValue("transitime.avl.unpredictableAssignmentsRegEx", + new StringConfigValue("transitclock.avl.unpredictableAssignmentsRegEx", "", // default value "So can filter out unpredictable assignments such as for " + "training coaches, service vehicles, or simply vehicles " + "that are not in service and should not be attempted to " + "be made predictable. Returns empty string, the default " + - "value if transitime.avl.unpredictableAssignmentsRegEx " + + "value if transitclock.avl.unpredictableAssignmentsRegEx " + "is not set."); /** @@ -211,7 +211,7 @@ public static int getMinTimeBetweenAvlReportsSecs() { } private static IntegerConfigValue minTimeBetweenAvlReportsSecs = new IntegerConfigValue( - "transitime.avl.minTimeBetweenAvlReportsSecs", + "transitclock.avl.minTimeBetweenAvlReportsSecs", 5, "Minimum allowable time in seconds between AVL reports for " + "a vehicle. If get a report closer than this number of " @@ -230,7 +230,7 @@ public static boolean shouldLogToStdOut() { return shouldLogToStdOut.getValue(); } private static BooleanConfigValue shouldLogToStdOut = - new BooleanConfigValue("transitime.avl.shouldLogToStdOut", false, + new BooleanConfigValue("transitclock.avl.shouldLogToStdOut", false, "For debugging. Logs each AVL report to stdout if set " + "to true. Default is false."); } diff --git a/transitclock/src/main/java/org/transitclock/configData/CoreConfig.java b/transitclock/src/main/java/org/transitclock/configData/CoreConfig.java index 42c4dca68..6bd984849 100755 --- a/transitclock/src/main/java/org/transitclock/configData/CoreConfig.java +++ b/transitclock/src/main/java/org/transitclock/configData/CoreConfig.java @@ -47,7 +47,7 @@ public static int getDaysPopulateHistoricalCache() { return daysPopulateHistoricalCache.getValue(); } private static IntegerConfigValue daysPopulateHistoricalCache = - new IntegerConfigValue("transitime.cache.daysPopulateHistoricalCache", 4, + new IntegerConfigValue("transitclock.cache.daysPopulateHistoricalCache", 4, "How many days data to read in to populate historical cache on start up."); /** * When in playback mode or some other situations don't want to store @@ -60,7 +60,7 @@ public static boolean storeDataInDatabase() { return storeDataInDatabase.getValue(); } private static BooleanConfigValue storeDataInDatabase = - new BooleanConfigValue("transitime.db.storeDataInDatabase", + new BooleanConfigValue("transitclock.db.storeDataInDatabase", true, "When in playback mode or some other situations don't " + "want to store generated data such as arrivals/" + @@ -72,7 +72,7 @@ public static boolean storeDataInDatabase() { * When batching large amount of AVL data through system to generate * improved schedule time (as has been done for Zhengzhou) it takes huge * amount of time to process everything. To speed things up you can set - * -Dtransitime.core.onlyNeedArrivalDepartures=true such that the system + * -Dtransitclock.core.onlyNeedArrivalDepartures=true such that the system * will be sped up by not generating nor logging predictions, not logging * AVL data nor storing it in db, and not logging nor storing match data in * db. @@ -83,20 +83,20 @@ public static boolean onlyNeedArrivalDepartures() { return onlyNeedArrivalDepartures.getValue(); } private static BooleanConfigValue onlyNeedArrivalDepartures = - new BooleanConfigValue("transitime.core.onlyNeedArrivalDepartures", + new BooleanConfigValue("transitclock.core.onlyNeedArrivalDepartures", false, "When batching large amount of AVL data through system " + "to generate improved schedule time (as has been done " + "for Zhengzhou) it takes huge amount of time to process " + "everything. To speed things up you can set " + - "-Dtransitime.core.onlyNeedArrivalDepartures=true such " + + "-Dtransitclock.core.onlyNeedArrivalDepartures=true such " + "that the system will be sped up by not generating nor " + "logging predictions, not logging AVL data nor storing " + "it in db, and not logging nor storing match data in db."); /** * When in batch mode can flood db with lots of objects. If - * transitime.core.pauseIfDbQueueFilling is set to true then when objects + * transitclock.core.pauseIfDbQueueFilling is set to true then when objects * are put into the DataDbLogger queue the calling thread will be * temporarily suspended so that the separate thread can run to write * to the db and thereby empty out the queue. @@ -106,10 +106,10 @@ public static boolean pauseIfDbQueueFilling() { return pauseIfDbQueueFilling.getValue(); } private static BooleanConfigValue pauseIfDbQueueFilling = - new BooleanConfigValue("transitime.core.pauseIfDbQueueFilling", + new BooleanConfigValue("transitclock.core.pauseIfDbQueueFilling", false, "When in batch mode can flood db with lots of objects. If" + - "transitime.core.pauseIfDbQueueFilling is set to true " + + "transitclock.core.pauseIfDbQueueFilling is set to true " + "then when objects are put into the DataDbLogger queue " + "the calling thread will be temporarily suspended so " + "that the separate thread can run to write to the db and " + @@ -130,7 +130,7 @@ public static List getOptionalModules() { //optionalModulesDefaultList.add("org.transitclock.avl.NextBusAvlModule"); } private static StringListConfigValue optionalModules = - new StringListConfigValue("transitime.modules.optionalModulesList", + new StringListConfigValue("transitclock.modules.optionalModulesList", optionalModulesDefaultList, "The semicolon separated list of names of all of the " + "modules that should be automatically started."); @@ -148,13 +148,13 @@ public static double getMaxDistanceFromSegment() { return maxDistanceFromSegment.getValue(); } private static DoubleConfigValue maxDistanceFromSegment = - new DoubleConfigValue("transitime.core.maxDistanceFromSegment", + new DoubleConfigValue("transitclock.core.maxDistanceFromSegment", 60.0, "How far a location can be from a path segment and still " + "be considered a match. Can be overridden on a per route " + "basis via max_distance supplemental column of route GTFS " + "data. When auto assigning, the parameter " - + "transitime.core.maxDistanceFromSegmentForAutoAssigning " + + "transitclock.core.maxDistanceFromSegmentForAutoAssigning " + "is used instead."); /** @@ -166,7 +166,7 @@ public static double getMaxDistanceFromSegmentForAutoAssigning() { return maxDistanceFromSegmentForAutoAssigning.getValue(); } private static DoubleConfigValue maxDistanceFromSegmentForAutoAssigning = - new DoubleConfigValue("transitime.core.maxDistanceFromSegmentForAutoAssigning", + new DoubleConfigValue("transitclock.core.maxDistanceFromSegmentForAutoAssigning", 60.0, "How far a location can be from a path segment and still " + "be considered a match when auto assigning a vehicle. Auto " @@ -191,7 +191,7 @@ public static int getAllowableNumberOfBadMatches() { return allowableNumberOfBadMatches.getValue(); } private static IntegerConfigValue allowableNumberOfBadMatches = - new IntegerConfigValue("transitime.core.allowableNumberOfBadMatches", + new IntegerConfigValue("transitclock.core.allowableNumberOfBadMatches", 2, "How many bad spatial/temporal matches a predictable " + "vehicle can have in a row before the vehicle is made " + @@ -207,7 +207,7 @@ public static float getMaxHeadingOffsetFromSegment() { return maxHeadingOffsetFromSegment.getValue(); } private static FloatConfigValue maxHeadingOffsetFromSegment = - new FloatConfigValue("transitime.core.maxHeadingOffsetFromSegment", + new FloatConfigValue("transitclock.core.maxHeadingOffsetFromSegment", 360.0f, "How far heading in degrees of vehicle can be away from " + "path segment and still be considered a match. Needs to " + @@ -227,7 +227,7 @@ public static double getDistanceFromEndOfBlockForInitialMatching() { } private static DoubleConfigValue distanceFromEndOfBlockForInitialMatching = new DoubleConfigValue( - "transitime.core.distanceFromEndOfBlockForInitialMatching", + "transitclock.core.distanceFromEndOfBlockForInitialMatching", 250.0, "For initial matching of vehicle to block assignment. If " + "vehicle is closer than this distance from the end of " + @@ -248,7 +248,7 @@ public static double getDistanceFromLastStopForEndMatching() { } private static DoubleConfigValue distanceFromLastStopForEndMatching = new DoubleConfigValue( - "transitime.core.distanceFromLastStopForEndMatching", + "transitclock.core.distanceFromLastStopForEndMatching", 250.0, "How close vehicle needs to be from the last stop of the " + "block such that the next AVL report should possibly be " + @@ -272,7 +272,7 @@ public static float getDeadheadingShortVersusLongDistance() { return deadheadingShortVersusLongDistance.getValue(); } private static FloatConfigValue deadheadingShortVersusLongDistance = - new FloatConfigValue("transitime.core.deadheadingShortVersusLongDistance", + new FloatConfigValue("transitclock.core.deadheadingShortVersusLongDistance", 1000.0f, "For determining if enough time to deadhead to beginning " + "of a trip. If vehicles are far away then they are more " + @@ -289,7 +289,7 @@ public static float getShortDistanceDeadheadingSpeed() { return shortDistanceDeadheadingSpeed.getValue(); } private static FloatConfigValue shortDistanceDeadheadingSpeed = - new FloatConfigValue("transitime.core.shortDistanceDeadheadingSpeed", + new FloatConfigValue("transitclock.core.shortDistanceDeadheadingSpeed", 4.0f, // 4.0m/s is about 8 mph "Part of determining if enough time to deadhead to layover."); @@ -297,7 +297,7 @@ public static float getLongDistanceDeadheadingSpeed() { return longDistanceDeadheadingSpeed.getValue(); } private static FloatConfigValue longDistanceDeadheadingSpeed = - new FloatConfigValue("transitime.core.longDistanceDeadheadingSpeed", + new FloatConfigValue("transitclock.core.longDistanceDeadheadingSpeed", 10.0f, // 10.0m/s is about 20mph "Part of determining if enough time to deadhead to layover."); @@ -318,7 +318,7 @@ public static int getMaxPredictionsTimeForDbSecs() { return maxPredictionsTimeForDbSecs.getValue(); } private static IntegerConfigValue maxPredictionsTimeForDbSecs = - new IntegerConfigValue("transitime.core.maxPredictionTimeForDbSecs", + new IntegerConfigValue("transitclock.core.maxPredictionTimeForDbSecs", 30*Time.SEC_PER_MIN, "For determining if prediction should be stored in db. " + "Set to 0 to never store predictions. A very large " + @@ -339,7 +339,7 @@ public static int getAllowableEarlyForLayoverSeconds() { return allowableEarlyForLayoverSeconds.getValue(); } private static IntegerConfigValue allowableEarlyForLayoverSeconds = - new IntegerConfigValue("transitime.core.allowableEarlyForLayoverSeconds", + new IntegerConfigValue("transitclock.core.allowableEarlyForLayoverSeconds", 60 * Time.SEC_PER_MIN, "How early a vehicle can be and still be matched to a " + "layover. Needs to be pretty large because sometimes " + @@ -365,7 +365,7 @@ public static String getAllowableEarlySecondsId() { return allowableEarlySeconds.getID(); } private static IntegerConfigValue allowableEarlySeconds = - new IntegerConfigValue("transitime.core.allowableEarlySeconds", + new IntegerConfigValue("transitclock.core.allowableEarlySeconds", 15 * Time.SEC_PER_MIN, "How early a vehicle can be and still be matched to its " + "block assignment. If when a new AVL report is received " + @@ -388,7 +388,7 @@ public static String getAllowableLateSecondsId() { return allowableLateSeconds.getID(); } private static IntegerConfigValue allowableLateSeconds = - new IntegerConfigValue("transitime.core.allowableLateSeconds", + new IntegerConfigValue("transitclock.core.allowableLateSeconds", 90 * Time.SEC_PER_MIN, "How late a vehicle can be and still be matched to its " + "block assignment. If when a new AVL report is received " + @@ -405,7 +405,7 @@ public static int getAllowableEarlySecondsForInitialMatching() { return allowableEarlySecondsForInitialMatching.getValue(); } private static IntegerConfigValue allowableEarlySecondsForInitialMatching = - new IntegerConfigValue("transitime.core.allowableEarlySecondsForInitialMatching", + new IntegerConfigValue("transitclock.core.allowableEarlySecondsForInitialMatching", 10 * Time.SEC_PER_MIN, "How early a vehicle can be in seconds and still be " + "matched to its block assignment."); @@ -419,7 +419,7 @@ public static int getAllowableLateSecondsForInitialMatching() { return allowableLateSecondsForInitialMatching.getValue(); } private static IntegerConfigValue allowableLateSecondsForInitialMatching = - new IntegerConfigValue("transitime.core.allowableLateSecondsForInitialMatching", + new IntegerConfigValue("transitclock.core.allowableLateSecondsForInitialMatching", 20 * Time.SEC_PER_MIN, "How late a vehicle can be in seconds and still be " + "matched to its block assignment."); @@ -436,7 +436,7 @@ public static double getDistanceBetweenAvlsForInitialMatchingWithoutHeading() { return distanceBetweenAvlsForInitialMatchingWithoutHeading.getValue(); } private static DoubleConfigValue distanceBetweenAvlsForInitialMatchingWithoutHeading = - new DoubleConfigValue("transitime.core.distanceBetweenAvlsForInitialMatchingWithoutHeading", + new DoubleConfigValue("transitclock.core.distanceBetweenAvlsForInitialMatchingWithoutHeading", 100.0, "For initial matching vehicle to assignment when there " + "isn't any heading information. In that case also want " + @@ -459,7 +459,7 @@ public static double getDistanceFromLayoverForEarlyDeparture() { return distanceFromLayoverForEarlyDeparture.getValue(); } private static DoubleConfigValue distanceFromLayoverForEarlyDeparture = - new DoubleConfigValue("transitime.core.distanceFromLayoverForEarlyDeparture", + new DoubleConfigValue("transitclock.core.distanceFromLayoverForEarlyDeparture", 180.0, "How far along path past a layover stop a vehicle needs " + "to be in order for it to be considered an early " @@ -481,7 +481,7 @@ public static double getLayoverDistance() { return layoverDistance.getValue(); } private static DoubleConfigValue layoverDistance = - new DoubleConfigValue("transitime.core.layoverDistance", + new DoubleConfigValue("transitclock.core.layoverDistance", 2000.0, "How far vehicle can be away from layover stop and still " + "match to it. For when not deadheading to a trip. This " @@ -507,7 +507,7 @@ public static int getAllowableEarlyTimeForEarlyDepartureSecs() { return allowableEarlyTimeForEarlyDepartureSecs.getValue(); } private static IntegerConfigValue allowableEarlyTimeForEarlyDepartureSecs = - new IntegerConfigValue("transitime.core.allowableEarlyTimeForEarlyDepartureSecs", + new IntegerConfigValue("transitclock.core.allowableEarlyTimeForEarlyDepartureSecs", 5*Time.SEC_PER_MIN, "How early in seconds a vehicle can have left terminal and have it be considered " + "an early departure instead of just moving around within " @@ -527,7 +527,7 @@ public static int getAllowableEarlyDepartureTimeForLoggingEvent() { } private static IntegerConfigValue allowableEarlyDepartureTimeForLoggingEvent = new IntegerConfigValue( - "transitime.core.allowableEarlyDepartureTimeForLoggingEvent", + "transitclock.core.allowableEarlyDepartureTimeForLoggingEvent", 60, "How early in seconds a vehicle can depart a terminal " + "before it registers a VehicleEvent indicating a problem."); @@ -543,7 +543,7 @@ public static int getAllowableLateDepartureTimeForLoggingEvent() { } private static IntegerConfigValue allowableLateDepartureTimeForLoggingEvent = new IntegerConfigValue( - "transitime.core.allowableLateDepartureTimeForLoggingEvent", + "transitclock.core.allowableLateDepartureTimeForLoggingEvent", 4*Time.SEC_PER_MIN, "How late in seconds a vehicle can depart a terminal " + "before it registers a VehicleEvent indicating a problem."); @@ -561,7 +561,7 @@ public static int getAllowableLateAtTerminalForLoggingEvent() { } private static IntegerConfigValue allowableLateAtTerminalForLoggingEvent = new IntegerConfigValue( - "transitime.core.allowableLateAtTerminalForLoggingEvent", + "transitclock.core.allowableLateAtTerminalForLoggingEvent", 1*Time.SEC_PER_MIN, "If a vehicle is sitting at a terminal and provides " + "another GPS report indicating that it is more than this " @@ -580,7 +580,7 @@ public static double getBeforeStopDistance() { } private static DoubleConfigValue beforeStopDistance = new DoubleConfigValue( - "transitime.core.beforeStopDistance", + "transitclock.core.beforeStopDistance", 50.0, "How far a vehicle can be ahead of a stop in meters and " + "be considered to have arrived."); @@ -596,7 +596,7 @@ public static double getAfterStopDistance() { } private static DoubleConfigValue afterStopDistance = new DoubleConfigValue( - "transitime.core.afterStopDistance", + "transitclock.core.afterStopDistance", 50.0, "How far a vehicle can be past a stop in meters and " + "still be considered at the stop."); @@ -611,7 +611,7 @@ public static int getDefaultBreakTimeSec() { } private static IntegerConfigValue defaultBreakTimeSec = new IntegerConfigValue( - "transitime.core.defaultBreakTimeSec", + "transitclock.core.defaultBreakTimeSec", 0, "How long driver is expected to have a break for a stop."); @@ -626,7 +626,7 @@ public static double getEarlyToLateRatio() { } private static DoubleConfigValue earlyToLateRatio = new DoubleConfigValue( - "transitime.core.earlyToLateRatio", + "transitclock.core.earlyToLateRatio", 3.0, "How much worse it is for a vehicle to be early as " + "opposed to late when determining schedule adherence."); @@ -644,7 +644,7 @@ public static boolean exclusiveBlockAssignments() { } private static BooleanConfigValue exclusiveBlockAssignments = new BooleanConfigValue( - "transitime.core.exclusiveBlockAssignments", + "transitclock.core.exclusiveBlockAssignments", true, "True if block assignments should be exclusive. If set to " + "true then when a vehicle is assigned to a block the " @@ -661,7 +661,7 @@ public static int getTimeForDeterminingNoProgress() { } private static IntegerConfigValue timeForDeterminingNoProgress = new IntegerConfigValue( - "transitime.core.timeForDeterminingNoProgress", + "transitclock.core.timeForDeterminingNoProgress", 8 * Time.MS_PER_MIN, "The interval in msec at which look at vehicle's history " + "to determine if it is not making any progress. A value" @@ -674,7 +674,7 @@ public static double getMinDistanceForNoProgress() { } private static DoubleConfigValue minDistanceForNoProgress = new DoubleConfigValue( - "transitime.core.minDistanceForNoProgress", + "transitclock.core.minDistanceForNoProgress", 60.0, "Minimum distance vehicle is expected to travel over " + "timeForDeterminingNoProgress to indicate vehicle is " @@ -683,7 +683,7 @@ public static double getMinDistanceForNoProgress() { + "made unpredictable."); /** - * transitime.core.timeForDeterminingDelayedSecs + * transitclock.core.timeForDeterminingDelayedSecs * * @return */ @@ -692,13 +692,13 @@ public static int getTimeForDeterminingDelayedSecs() { } private static IntegerConfigValue timeForDeterminingDelayedSecs = new IntegerConfigValue( - "transitime.core.timeForDeterminingDelayedSecs", + "transitclock.core.timeForDeterminingDelayedSecs", 4 * Time.SEC_PER_MIN, "The interval in msec at which look at vehicle's history " + "to determine if it is delayed."); /** - * transitime.core.minDistanceForDelayed + * transitclock.core.minDistanceForDelayed * * @return */ @@ -707,7 +707,7 @@ public static double getMinDistanceForDelayed() { } private static DoubleConfigValue minDistanceForDelayed = new DoubleConfigValue( - "transitime.core.minDistanceForDelayed", + "transitclock.core.minDistanceForDelayed", 60.0, "Minimum distance vehicle is expected to travel over " + "timeForDeterminingDelayed to indicate vehicle is " @@ -718,7 +718,7 @@ public static int getMatchHistoryMaxSize() { } private static IntegerConfigValue matchHistoryMaxSize = new IntegerConfigValue( - "transitime.core.matchHistoryMaxSize", + "transitclock.core.matchHistoryMaxSize", 20, "How many matches are kept in history for vehicle so that " + "can can do things such as look back at history to " @@ -732,7 +732,7 @@ public static int getAvlHistoryMaxSize() { } private static IntegerConfigValue avlHistoryMaxSize = new IntegerConfigValue( - "transitime.core.avlHistoryMaxSize", + "transitclock.core.avlHistoryMaxSize", 20, "How many AVL reports are kept in history for vehicle so " + "that can can do things such as look back at history to " @@ -743,7 +743,7 @@ public static int getAvlHistoryMaxSize() { private static IntegerConfigValue eventHistoryMaxSize = new IntegerConfigValue( - "transitime.core.eventHistoryMaxSize", + "transitclock.core.eventHistoryMaxSize", 20, "How many arrival depature event reports are kept in history for vehicle so " + "that can can do things such as look back at history"); @@ -756,7 +756,7 @@ public static String getPidFileDirectory() { } private static StringConfigValue pidFileDirectory = new StringConfigValue( - "transitime.core.pidDirectory", + "transitclock.core.pidDirectory", "/home/ec2-user/pids/", "Directory where pid file should be written. The pid file " + "can be used by monit to make sure that core process is " diff --git a/transitclock/src/main/java/org/transitclock/configData/DbSetupConfig.java b/transitclock/src/main/java/org/transitclock/configData/DbSetupConfig.java index 5748eaa88..8b985a14f 100644 --- a/transitclock/src/main/java/org/transitclock/configData/DbSetupConfig.java +++ b/transitclock/src/main/java/org/transitclock/configData/DbSetupConfig.java @@ -32,17 +32,17 @@ public static String getDbName() { return dbName.getValue(); } private static StringConfigValue dbName = - new StringConfigValue("transitime.db.dbName", + new StringConfigValue("transitclock.db.dbName", null, // Null as default to use the projectId "Specifies the name of the database. If not set then the " - + "transitime.core.agencyId will be used."); + + "transitclock.core.agencyId will be used."); public static String getDbHost() { return dbHost.getValue(); } private static StringConfigValue dbHost = - new StringConfigValue("transitime.db.dbHost", + new StringConfigValue("transitclock.db.dbHost", null, // Null as default so can get it from hibernate config "Specifies the name of the machine the database for the " + "project resides on. Use null value to use values from " + @@ -53,7 +53,7 @@ public static String getDbType() { return dbType.getValue(); } private static StringConfigValue dbType = - new StringConfigValue("transitime.db.dbType", + new StringConfigValue("transitclock.db.dbType", "mysql", "Specifies type of database when creating the URL to " + "connect to the database. Can be mysql or postgresql. " @@ -63,7 +63,7 @@ public static String getDbUserName() { return dbUserName.getValue(); } private static StringConfigValue dbUserName = - new StringConfigValue("transitime.db.dbUserName", + new StringConfigValue("transitclock.db.dbUserName", null, "Specifies login for the project database. Use null " + "value to use values from hibernate config file."); @@ -72,7 +72,7 @@ public static String getDbPassword() { return dbPassword.getValue(); } private static StringConfigValue dbPassword = - new StringConfigValue("transitime.db.dbPassword", + new StringConfigValue("transitclock.db.dbPassword", null, "Specifies password for the project database. Use null " + "value to use values from hibernate config file.", @@ -82,7 +82,7 @@ public static Integer getSocketTimeoutSec() { return socketTimeoutSec.getValue(); } public static IntegerConfigValue socketTimeoutSec = - new IntegerConfigValue("transitime.db.socketTimeoutSec", + new IntegerConfigValue("transitclock.db.socketTimeoutSec", 60, "So can set low-level socket timeout for JDBC connections. " + "Useful for when a session dies during a request, such as " @@ -97,7 +97,7 @@ public static String getHibernateConfigFileName() { return hibernateConfigFileName.getValue(); } private static StringConfigValue hibernateConfigFileName = - new StringConfigValue("transitime.hibernate.configFile", + new StringConfigValue("transitclock.hibernate.configFile", "hsql_hibernate.cfg.xml", "Specifies the database dependent hibernate.cfg.xml file " + "to use to configure hibernate. The system will look both " @@ -108,7 +108,7 @@ public static Integer getBatchSize() { return batchSize.getValue(); } private static IntegerConfigValue batchSize = - new IntegerConfigValue("transitime.db.batchSize", + new IntegerConfigValue("transitclock.db.batchSize", 100, "Specifies the database batch size, defaults to 100"); diff --git a/transitclock/src/main/java/org/transitclock/configData/RmiConfig.java b/transitclock/src/main/java/org/transitclock/configData/RmiConfig.java index 54db3f110..e99bb6dbe 100644 --- a/transitclock/src/main/java/org/transitclock/configData/RmiConfig.java +++ b/transitclock/src/main/java/org/transitclock/configData/RmiConfig.java @@ -40,7 +40,7 @@ public static String rmiHost() { return rmiHost.getValue(); } private static StringConfigValue rmiHost = - new StringConfigValue("transitime.rmi.rmiHost", + new StringConfigValue("transitclock.rmi.rmiHost", null, "For a client that needs to connect to an agency server. " + "When null system gets RMI host name from the WebAgencies " @@ -58,7 +58,7 @@ public static int rmiPort() { return rmiPort.getValue(); } private static IntegerConfigValue rmiPort = - new IntegerConfigValue("transitime.rmi.rmiPort", + new IntegerConfigValue("transitclock.rmi.rmiPort", 2099, "Which port to use for RMI calls. Usually RMI uses port " + "1099 but using default of 2099 to not interfere with " @@ -78,7 +78,7 @@ public static int secondaryRmiPort() { return secondaryRmiPort.getValue(); } private static IntegerConfigValue secondaryRmiPort = - new IntegerConfigValue("transitime.rmi.secondaryRmiPort", + new IntegerConfigValue("transitclock.rmi.secondaryRmiPort", 2098, "Which secondary port to use for RMI calls, for once " + "initial communication has been established. Usually " diff --git a/transitclock/src/main/java/org/transitclock/core/ArrivalDepartureGeneratorDefaultImpl.java b/transitclock/src/main/java/org/transitclock/core/ArrivalDepartureGeneratorDefaultImpl.java index 991fc90f0..05d057965 100755 --- a/transitclock/src/main/java/org/transitclock/core/ArrivalDepartureGeneratorDefaultImpl.java +++ b/transitclock/src/main/java/org/transitclock/core/ArrivalDepartureGeneratorDefaultImpl.java @@ -105,7 +105,7 @@ private static int getMaxStopsWhenNoPreviousMatch() { } private static IntegerConfigValue maxStopsWhenNoPreviousMatch = new IntegerConfigValue( - "transitime.arrivalsDepartures.maxStopsWhenNoPreviousMatch", + "transitclock.arrivalsDepartures.maxStopsWhenNoPreviousMatch", 1, "If vehicle just became predictable as indicated by no " + "previous match then still want to determine " + @@ -126,7 +126,7 @@ private static int getMaxStopsBetweenMatches() { } private static IntegerConfigValue maxStopsBetweenMatches = new IntegerConfigValue( - "transitime.arrivalsDepartures.maxStopsBetweenMatches", + "transitclock.arrivalsDepartures.maxStopsBetweenMatches", 12, "If between AVL reports the vehicle appears to traverse " + "many stops then something is likely wrong with the " + @@ -134,7 +134,7 @@ private static int getMaxStopsBetweenMatches() { "arrivals/departures are created between AVL reports."); private static IntegerConfigValue allowableDifferenceBetweenAvlTimeSecs = - new IntegerConfigValue("transitime.arrivalsDepartures.allowableDifferenceBetweenAvlTimeSecs", + new IntegerConfigValue("transitclock.arrivalsDepartures.allowableDifferenceBetweenAvlTimeSecs", // Default is to only log problem if arrival time is more // than a day off 1 * Time.SEC_PER_DAY, diff --git a/transitclock/src/main/java/org/transitclock/core/ArrivalDepartureGeneratorFactory.java b/transitclock/src/main/java/org/transitclock/core/ArrivalDepartureGeneratorFactory.java index 6662b21e1..9ea5163e1 100644 --- a/transitclock/src/main/java/org/transitclock/core/ArrivalDepartureGeneratorFactory.java +++ b/transitclock/src/main/java/org/transitclock/core/ArrivalDepartureGeneratorFactory.java @@ -24,7 +24,7 @@ * For instantiating a ArrivalDepartureGenerator object that generates * arrival/departure data when a new match is generated for a vehicle. The class * to be instantiated can be set using the config variable - * transitime.core.arrivalDepartureGeneratorClass + * transitclock.core.arrivalDepartureGeneratorClass * * @author SkiBu Smith * @@ -33,7 +33,7 @@ public class ArrivalDepartureGeneratorFactory { // The name of the class to instantiate private static StringConfigValue className = - new StringConfigValue("transitime.core.arrivalDepartureGeneratorClass", + new StringConfigValue("transitclock.core.arrivalDepartureGeneratorClass", "org.transitclock.core.ArrivalDepartureGeneratorDefaultImpl", "Specifies the name of the class used for generating " + "arrival/departure data."); diff --git a/transitclock/src/main/java/org/transitclock/core/AvlProcessor.java b/transitclock/src/main/java/org/transitclock/core/AvlProcessor.java index d7cb1e5eb..53664c097 100644 --- a/transitclock/src/main/java/org/transitclock/core/AvlProcessor.java +++ b/transitclock/src/main/java/org/transitclock/core/AvlProcessor.java @@ -79,7 +79,7 @@ private static double getTerminalDistanceForRouteMatching() { private static DoubleConfigValue terminalDistanceForRouteMatching = new DoubleConfigValue( - "transitime.core.terminalDistanceForRouteMatching", + "transitclock.core.terminalDistanceForRouteMatching", 100.0, "How far vehicle must be away from the terminal before doing " + "initial matching. This is important because when vehicle is at " @@ -88,7 +88,7 @@ private static double getTerminalDistanceForRouteMatching() { private static IntegerConfigValue allowableBadAssignments = new IntegerConfigValue( - "transitime.core.allowableBadAssignments", 0, + "transitclock.core.allowableBadAssignments", 0, "If get a bad assignment, such as no assignment, but no " + "more than allowableBadAssignments then will use the " + "previous assignment. Useful for when assignment part " @@ -96,7 +96,7 @@ private static double getTerminalDistanceForRouteMatching() { private static BooleanConfigValue emailMessagesWhenAssignmentGrabImproper = new BooleanConfigValue( - "transitime.core.emailMessagesWhenAssignmentGrabImproper", + "transitclock.core.emailMessagesWhenAssignmentGrabImproper", false, "When one vehicle gets assigned by AVL feed but another " + "vehicle already has that assignment then sometimes the " @@ -109,7 +109,7 @@ private static double getTerminalDistanceForRouteMatching() { private static DoubleConfigValue maxDistanceForAssignmentGrab = new DoubleConfigValue( - "transitime.core.maxDistanceForAssignmentGrab", + "transitclock.core.maxDistanceForAssignmentGrab", 10000.0, "For when another vehicles gets assignment and needs to " + "grab it from another vehicle. The new vehicle must " @@ -118,7 +118,7 @@ private static double getTerminalDistanceForRouteMatching() { private static DoubleConfigValue maxMatchDistanceFromAVLRecord = new DoubleConfigValue( - "transitime.core.maxMatchDistanceFromAVLRecord", + "transitclock.core.maxMatchDistanceFromAVLRecord", 500.0, "For logging distance between spatial match and actual AVL assignment "); @@ -239,8 +239,8 @@ public void makeVehicleUnpredictableAndGrabAssignment( /** * Looks at the previous AVL reports to determine if vehicle is actually * moving. If it is not moving then the vehicle is made unpredictable. Uses - * the system properties transitime.core.timeForDeterminingNoProgress and - * transitime.core.minDistanceForNoProgress + * the system properties transitclock.core.timeForDeterminingNoProgress and + * transitclock.core.minDistanceForNoProgress * * @param bestTemporalMatch * @param vehicleState @@ -310,8 +310,8 @@ private boolean handleIfVehicleNotMakingProgress( * Looks at the previous AVL reports to determine if vehicle is actually * moving. If it is not moving then the vehicle should be marked as being * delayed. Uses the system properties - * transitime.core.timeForDeterminingDelayed and - * transitime.core.minDistanceForDelayed + * transitclock.core.timeForDeterminingDelayed and + * transitclock.core.minDistanceForDelayed * * @param vehicleState * For providing the temporal match and the AVL history. It is @@ -371,9 +371,9 @@ private boolean handlePossibleVehicleDelay(VehicleState vehicleState) { + "traveled only " + Geo.distanceFormat(distanceTraveled) + " while " - + "transitime.core.timeForDeterminingDelayedSecs=" + + "transitclock.core.timeForDeterminingDelayedSecs=" + maxDelayedSecs + " and " - + "transitime.core.minDistanceForDelayed=" + + "transitclock.core.minDistanceForDelayed=" + Geo.distanceFormat(minDistance); // Log the event @@ -945,7 +945,7 @@ private boolean matchProblematicDueOtherVehicleHavingAssignment( /** * For reducing e-mail logging messages when problem grabbing assignment. - * Java property transitime.avl.emailMessagesWhenAssignmentGrabImproper must + * Java property transitclock.avl.emailMessagesWhenAssignmentGrabImproper must * be true for e-mail to be sent when there is an error. * * @param vehicleId @@ -1106,7 +1106,7 @@ private void handlePredictableVehicleWithoutAvlAssignment( + oldAssignment + " but received " + vehicleState.getBadAssignmentsInARow() + " null assignments in a row, which is configured by " - + "transitime.core.allowableBadAssignments to be too many, " + + "transitclock.core.allowableBadAssignments to be too many, " + "so making vehicle unpredictable."; makeVehicleUnpredictable(vehicleState.getVehicleId(), eventDescription, VehicleEvent.ASSIGNMENT_CHANGED); @@ -1555,7 +1555,7 @@ public void processAvlReport(AvlReport avlReport) { if (AutoBlockAssigner.ignoreAvlAssignments() && !avlReport.isForSchedBasedPreds()) { logger.debug("Removing assignment from AVL report because " - + "transitime.autoBlockAssigner.ignoreAvlAssignments=true. {}", + + "transitclock.autoBlockAssigner.ignoreAvlAssignments=true. {}", avlReport); avlReport.setAssignment(null, AssignmentType.UNSET); } diff --git a/transitclock/src/main/java/org/transitclock/core/DwellTimeDetails.java b/transitclock/src/main/java/org/transitclock/core/DwellTimeDetails.java index 1344f3744..cdbfee7c4 100644 --- a/transitclock/src/main/java/org/transitclock/core/DwellTimeDetails.java +++ b/transitclock/src/main/java/org/transitclock/core/DwellTimeDetails.java @@ -13,7 +13,7 @@ public class DwellTimeDetails { .getLogger(DwellTimeDetails.class); private static final IntegerConfigValue maxDwellTime = new IntegerConfigValue( - "transitime.core.maxDwellTime", + "transitclock.core.maxDwellTime", 10 * Time.MS_PER_MIN, "This is a maximum dwell time at a stop to be taken into account for cache or prediction calculations."); diff --git a/transitclock/src/main/java/org/transitclock/core/HeadwayGeneratorFactory.java b/transitclock/src/main/java/org/transitclock/core/HeadwayGeneratorFactory.java index 98a124031..312cfbfa7 100644 --- a/transitclock/src/main/java/org/transitclock/core/HeadwayGeneratorFactory.java +++ b/transitclock/src/main/java/org/transitclock/core/HeadwayGeneratorFactory.java @@ -23,7 +23,7 @@ /** * For instantiating a HeadwayGenerator object that generates headway info when * a new match is generated for a vehicle. The class to be instantiated can be - * set using the config variable transitime.core.headwayGeneratorClass + * set using the config variable transitclock.core.headwayGeneratorClass * * @author SkiBu Smith * @@ -32,7 +32,7 @@ public class HeadwayGeneratorFactory { // The name of the class to instantiate private static StringConfigValue className = - new StringConfigValue("transitime.core.headwayGeneratorClass", + new StringConfigValue("transitclock.core.headwayGeneratorClass", "org.transitclock.core.HeadwayGeneratorDefaultImpl", "Specifies the name of the class used for generating " + "headway data."); diff --git a/transitclock/src/main/java/org/transitclock/core/PredictionGenerator.java b/transitclock/src/main/java/org/transitclock/core/PredictionGenerator.java index f35fd39ce..2311a9ea0 100644 --- a/transitclock/src/main/java/org/transitclock/core/PredictionGenerator.java +++ b/transitclock/src/main/java/org/transitclock/core/PredictionGenerator.java @@ -65,14 +65,14 @@ public abstract class PredictionGenerator { private static final IntegerConfigValue closestVehicleStopsAhead = new IntegerConfigValue( - "transitime.prediction.closestvehiclestopsahead", new Integer(2), + "transitclock.prediction.closestvehiclestopsahead", new Integer(2), "Num stops ahead a vehicle must be to be considers in the closest vehicle calculation"); - protected static BooleanConfigValue storeTravelTimeStopPathPredictions = new BooleanConfigValue("transitime.core.storeTravelTimeStopPathPredictions", + protected static BooleanConfigValue storeTravelTimeStopPathPredictions = new BooleanConfigValue("transitclock.core.storeTravelTimeStopPathPredictions", false, "This is set to true to record all travelTime predictions for individual stopPaths generated. Useful for comparing performance of differant algorithms. (MAPE comparison). Not for normal use as will generate massive amounts of data."); - protected static BooleanConfigValue storeDwellTimeStopPathPredictions = new BooleanConfigValue("transitime.core.storeDwellTimeStopPathPredictions", + protected static BooleanConfigValue storeDwellTimeStopPathPredictions = new BooleanConfigValue("transitclock.core.storeDwellTimeStopPathPredictions", false, "This is set to true to record all travelTime predictions for individual dwell times generated. Useful for comparing performance of differant algorithms. (MAPE comparison). Not for normal use as will generate massive amounts of data."); diff --git a/transitclock/src/main/java/org/transitclock/core/PredictionGeneratorDefaultImpl.java b/transitclock/src/main/java/org/transitclock/core/PredictionGeneratorDefaultImpl.java index 7586733eb..f265297e4 100755 --- a/transitclock/src/main/java/org/transitclock/core/PredictionGeneratorDefaultImpl.java +++ b/transitclock/src/main/java/org/transitclock/core/PredictionGeneratorDefaultImpl.java @@ -72,7 +72,7 @@ public class PredictionGeneratorDefaultImpl extends PredictionGenerator implements PredictionComponentElementsGenerator{ private static IntegerConfigValue maxPredictionsTimeSecs = - new IntegerConfigValue("transitime.core.maxPredictionsTimeSecs", + new IntegerConfigValue("transitclock.core.maxPredictionsTimeSecs", 45 * Time.SEC_PER_MIN, "How far forward into the future should generate " + "predictions for."); @@ -81,19 +81,19 @@ public static int getMaxPredictionsTimeSecs() { } private static LongConfigValue generateHoldingTimeWhenPredictionWithin = - new LongConfigValue("transitime.core.generateHoldingTimeWhenPredictionWithin", + new LongConfigValue("transitclock.core.generateHoldingTimeWhenPredictionWithin", 0L, "If the prediction is less than this number of milliseconds from current time then use it to generate a holding time"); private static BooleanConfigValue useArrivalPredictionsForNormalStops = - new BooleanConfigValue("transitime.core.useArrivalPredictionsForNormalStops", + new BooleanConfigValue("transitclock.core.useArrivalPredictionsForNormalStops", true, "For specifying whether to use arrival predictions or " + "departure predictions for normal, non-wait time, stops."); private static IntegerConfigValue maxLateCutoffPredsForNextTripsSecs = - new IntegerConfigValue("transitime.core.maxLateCutoffPredsForNextTripsSecs", + new IntegerConfigValue("transitclock.core.maxLateCutoffPredsForNextTripsSecs", Integer.MAX_VALUE, "If a vehicle is further behind schedule than this amount " + "then predictions for subsequent trips will be marked as " @@ -102,7 +102,7 @@ public static int getMaxPredictionsTimeSecs() { + "vehicle being late."); private static BooleanConfigValue useExactSchedTimeForWaitStops = - new BooleanConfigValue("transitime.core.useExactSchedTimeForWaitStops", + new BooleanConfigValue("transitclock.core.useExactSchedTimeForWaitStops", true, "The predicted time for wait stops includes the historic " + "wait stop time. This means it will be a bit after the " diff --git a/transitclock/src/main/java/org/transitclock/core/PredictionGeneratorFactory.java b/transitclock/src/main/java/org/transitclock/core/PredictionGeneratorFactory.java index 1535058ac..e79e5a7e6 100644 --- a/transitclock/src/main/java/org/transitclock/core/PredictionGeneratorFactory.java +++ b/transitclock/src/main/java/org/transitclock/core/PredictionGeneratorFactory.java @@ -23,7 +23,7 @@ /** * For instantiating a PredictionGenerator object that generates predictions * when a new match is generated for a vehicle. The class to be instantiated can - * be set using the config variable transitime.core.predictionGeneratorClass + * be set using the config variable transitclock.core.predictionGeneratorClass * * @author SkiBu Smith * @@ -32,7 +32,7 @@ public class PredictionGeneratorFactory { // The name of the class to instantiate private static StringConfigValue className = - new StringConfigValue("transitime.core.predictionGeneratorClass", + new StringConfigValue("transitclock.core.predictionGeneratorClass", "org.transitclock.core.PredictionGeneratorDefaultImpl", "Specifies the name of the class used for generating " + "prediction data."); diff --git a/transitclock/src/main/java/org/transitclock/core/ServiceUtils.java b/transitclock/src/main/java/org/transitclock/core/ServiceUtils.java index 40164a261..e91a835cd 100755 --- a/transitclock/src/main/java/org/transitclock/core/ServiceUtils.java +++ b/transitclock/src/main/java/org/transitclock/core/ServiceUtils.java @@ -51,7 +51,7 @@ public class ServiceUtils { private static IntegerConfigValue minutesIntoMorningToIncludePreviousServiceIds = new IntegerConfigValue( - "transitime.service.minutesIntoMorningToIncludePreviousServiceIds", + "transitclock.service.minutesIntoMorningToIncludePreviousServiceIds", 4*Time.HOUR_IN_MINS, "Early in the morning also want to include at service IDs " + "for previous day since a block might have started on " diff --git a/transitclock/src/main/java/org/transitclock/core/TemporalMatcher.java b/transitclock/src/main/java/org/transitclock/core/TemporalMatcher.java index ea9ca1eeb..cf7162286 100644 --- a/transitclock/src/main/java/org/transitclock/core/TemporalMatcher.java +++ b/transitclock/src/main/java/org/transitclock/core/TemporalMatcher.java @@ -286,7 +286,7 @@ private static boolean currentMatchIsBetter( * since system will expect a longer and longer travel time for vehicle to * go back to layover and then to the spatial match. So could get incorrect * layover match for quiet a while, until the layover distance - * transitime.core.layoverDistance, which can be large, is exceeded. + * transitclock.core.layoverDistance, which can be large, is exceeded. * * Therefore need to filter out such problematic layover matches. This is * done by seeing if past schedule time for the layover match (before the diff --git a/transitclock/src/main/java/org/transitclock/core/TimeoutHandlerModule.java b/transitclock/src/main/java/org/transitclock/core/TimeoutHandlerModule.java index 3b450c4bc..68f2bddfa 100644 --- a/transitclock/src/main/java/org/transitclock/core/TimeoutHandlerModule.java +++ b/transitclock/src/main/java/org/transitclock/core/TimeoutHandlerModule.java @@ -57,7 +57,7 @@ public class TimeoutHandlerModule extends Module { private static IntegerConfigValue pollingRateSecs = new IntegerConfigValue( - "transitime.timeout.pollingRateSecs", + "transitclock.timeout.pollingRateSecs", 30, "Specifies in seconds how frequently the TimeoutHandler " + "should actually look for timeouts. Don't want to do " @@ -68,7 +68,7 @@ public class TimeoutHandlerModule extends Module { private static IntegerConfigValue allowableNoAvlSecs = new IntegerConfigValue( - "transitime.timeout.allowableNoAvlSecs", + "transitclock.timeout.allowableNoAvlSecs", 6*Time.SEC_PER_MIN, "For AVL timeouts. If don't get an AVL report for the " + "vehicle in this amount of time in seconds then the " @@ -76,7 +76,7 @@ public class TimeoutHandlerModule extends Module { private static IntegerConfigValue allowableNoAvlAfterSchedDepartSecs = new IntegerConfigValue( - "transitime.timeout.allowableNoAvlAfterSchedDepartSecs", + "transitclock.timeout.allowableNoAvlAfterSchedDepartSecs", 6 * Time.SEC_PER_MIN, "If a vehicle is at a wait stop, such as " + "sitting at a terminal, and doesn't provide an AVL report " diff --git a/transitclock/src/main/java/org/transitclock/core/TravelTimeDetails.java b/transitclock/src/main/java/org/transitclock/core/TravelTimeDetails.java index b20df50a5..6cd03be97 100644 --- a/transitclock/src/main/java/org/transitclock/core/TravelTimeDetails.java +++ b/transitclock/src/main/java/org/transitclock/core/TravelTimeDetails.java @@ -12,7 +12,7 @@ public class TravelTimeDetails { private static final IntegerConfigValue maxTravelTime = new IntegerConfigValue( - "transitime.core.maxTravelTime", + "transitclock.core.maxTravelTime", 10 * Time.MS_PER_MIN, "This is a maximum allowed for travel between two stops. Used as a sanity check for cache and predictions."); diff --git a/transitclock/src/main/java/org/transitclock/core/VehicleState.java b/transitclock/src/main/java/org/transitclock/core/VehicleState.java index 3b1cc540a..e807d16ed 100644 --- a/transitclock/src/main/java/org/transitclock/core/VehicleState.java +++ b/transitclock/src/main/java/org/transitclock/core/VehicleState.java @@ -292,9 +292,9 @@ public TemporalMatch getPreviousMatch(int minimumAgeMsec) { + "at least {} msec old but match history in VehicleState " + "had only {} entries which was not large enough. The oldest " + "match in history was for {} msec old. Likely " - + "should increase transitime.core.matchHistoryMaxSize " + + "should increase transitclock.core.matchHistoryMaxSize " + "parameter to store more history or reduce " - + "transitime.core.timeForDeterminingNoProgress to look " + + "transitclock.core.timeForDeterminingNoProgress to look " + "back less far.", vehicleId, minimumAgeMsec, @@ -558,7 +558,7 @@ public AvlReport getPreviousAvlReport(int minimumAgeMsec) { logger.error("For vehicleId={} tried to retrieve AVL " + "at least {} msec old but AVL history in VehicleState " + "had only {} entries which was not large enough. Likely " - + "should increase transitime.core.avlHistoryMaxSize " + + "should increase transitclock.core.avlHistoryMaxSize " + "parameter to store more history.", vehicleId, minimumAgeMsec, diff --git a/transitclock/src/main/java/org/transitclock/core/autoAssigner/AutoBlockAssigner.java b/transitclock/src/main/java/org/transitclock/core/autoAssigner/AutoBlockAssigner.java index 72d9b7471..b67abb9f2 100644 --- a/transitclock/src/main/java/org/transitclock/core/autoAssigner/AutoBlockAssigner.java +++ b/transitclock/src/main/java/org/transitclock/core/autoAssigner/AutoBlockAssigner.java @@ -83,14 +83,14 @@ public class AutoBlockAssigner { private static BooleanConfigValue autoAssignerEnabled = new BooleanConfigValue( - "transitime.autoBlockAssigner.autoAssignerEnabled", + "transitclock.autoBlockAssigner.autoAssignerEnabled", false, "Set to true to enable the auto assignment feature where " + "the system tries to assign vehicle to an available block"); private static BooleanConfigValue ignoreAvlAssignments = new BooleanConfigValue( - "transitime.autoBlockAssigner.ignoreAvlAssignments", + "transitclock.autoBlockAssigner.ignoreAvlAssignments", false, "For when want to test automatic assignments. When set to " + "true then system ignores assignments from AVL feed so " @@ -101,7 +101,7 @@ public static boolean ignoreAvlAssignments() { private static DoubleConfigValue minDistanceFromCurrentReport = new DoubleConfigValue( - "transitime.autoBlockAssigner.minDistanceFromCurrentReport", + "transitclock.autoBlockAssigner.minDistanceFromCurrentReport", 100.0, "AutoBlockAssigner looks at two AVL reports to match " + "vehicle. This parameter specifies how far away those " @@ -111,21 +111,21 @@ public static boolean ignoreAvlAssignments() { private static IntegerConfigValue allowableEarlySeconds = new IntegerConfigValue( - "transitime.autoBlockAssigner.allowableEarlySeconds", + "transitclock.autoBlockAssigner.allowableEarlySeconds", 3*Time.SEC_PER_MIN, "How early a vehicle can be in seconds and still be " + "automatically assigned to a block"); private static IntegerConfigValue allowableLateSeconds = new IntegerConfigValue( - "transitime.autoBlockAssigner.allowableLateSeconds", + "transitclock.autoBlockAssigner.allowableLateSeconds", 5*Time.SEC_PER_MIN, "How late a vehicle can be in seconds and still be " + "automatically assigned to a block"); private static IntegerConfigValue minTimeBetweenAutoAssigningSecs = new IntegerConfigValue( - "transitime.autoBlockAssigner.minTimeBetweenAutoAssigningSecs", + "transitclock.autoBlockAssigner.minTimeBetweenAutoAssigningSecs", 30, "Minimum time per vehicle that can do auto assigning. Auto " + "assigning is computationally expensive, especially when " @@ -714,7 +714,7 @@ private List determineTemporalMatches() { /** * Determines if the auto assigner is being called too recently, as specified by - * the transitime.autoBlockAssigner.minTimeBetweenAutoAssigningSecs property. This + * the transitclock.autoBlockAssigner.minTimeBetweenAutoAssigningSecs property. This * is important because auto assigning is quite costly for agencies with many available * blocks. If have high reporting rate and many available blocks then the system can get bogged * down just doing auto assigning. diff --git a/transitclock/src/main/java/org/transitclock/core/dataCache/PredictionDataCache.java b/transitclock/src/main/java/org/transitclock/core/dataCache/PredictionDataCache.java index 7e8844c10..b012d987a 100644 --- a/transitclock/src/main/java/org/transitclock/core/dataCache/PredictionDataCache.java +++ b/transitclock/src/main/java/org/transitclock/core/dataCache/PredictionDataCache.java @@ -67,7 +67,7 @@ public class PredictionDataCache { private static PredictionDataCache singleton = new PredictionDataCache(); - protected static BooleanConfigValue returnArrivalPredictionForEndOfTrip = new BooleanConfigValue("transitime.prediction.returnArrivalPredictionForEndOfTrip", + protected static BooleanConfigValue returnArrivalPredictionForEndOfTrip = new BooleanConfigValue("transitclock.prediction.returnArrivalPredictionForEndOfTrip", false, "This set to false will not return arrival predictions of the last stop on a trip."); diff --git a/transitclock/src/main/java/org/transitclock/core/dataCache/StopArrivalDepartureCache.java b/transitclock/src/main/java/org/transitclock/core/dataCache/StopArrivalDepartureCache.java index 0aa49c256..358533b61 100755 --- a/transitclock/src/main/java/org/transitclock/core/dataCache/StopArrivalDepartureCache.java +++ b/transitclock/src/main/java/org/transitclock/core/dataCache/StopArrivalDepartureCache.java @@ -47,7 +47,7 @@ public class StopArrivalDepartureCache { * Default is 4 as we need 3 days worth for Kalman Filter implementation */ private static final IntegerConfigValue tripDataCacheMaxAgeSec = new IntegerConfigValue( - "transitime.tripdatacache.tripDataCacheMaxAgeSec", 4 * Time.SEC_PER_DAY, + "transitclock.tripdatacache.tripDataCacheMaxAgeSec", 4 * Time.SEC_PER_DAY, "How old an arrivaldeparture has to be before it is removed from the cache "); /** diff --git a/transitclock/src/main/java/org/transitclock/core/dataCache/TripDataHistoryCache.java b/transitclock/src/main/java/org/transitclock/core/dataCache/TripDataHistoryCache.java index 0965e0487..ffb8e08b7 100755 --- a/transitclock/src/main/java/org/transitclock/core/dataCache/TripDataHistoryCache.java +++ b/transitclock/src/main/java/org/transitclock/core/dataCache/TripDataHistoryCache.java @@ -60,7 +60,7 @@ public class TripDataHistoryCache{ * Default is 4 as we need 3 days worth for Kalman Filter implementation */ private static final IntegerConfigValue tripDataCacheMaxAgeSec = new IntegerConfigValue( - "transitime.tripdatacache.tripDataCacheMaxAgeSec", + "transitclock.tripdatacache.tripDataCacheMaxAgeSec", 15 * Time.SEC_PER_DAY, "How old an arrivaldeparture has to be before it is removed from the cache "); diff --git a/transitclock/src/main/java/org/transitclock/core/dataCache/frequency/FrequencyBasedHistoricalAverageCache.java b/transitclock/src/main/java/org/transitclock/core/dataCache/frequency/FrequencyBasedHistoricalAverageCache.java index eb4415d58..5ae9d3068 100755 --- a/transitclock/src/main/java/org/transitclock/core/dataCache/frequency/FrequencyBasedHistoricalAverageCache.java +++ b/transitclock/src/main/java/org/transitclock/core/dataCache/frequency/FrequencyBasedHistoricalAverageCache.java @@ -45,28 +45,28 @@ public class FrequencyBasedHistoricalAverageCache { private static IntegerConfigValue minTravelTimeFilterValue= new IntegerConfigValue( - "transitime.core.frequency.minTravelTimeFilterValue", + "transitclock.core.frequency.minTravelTimeFilterValue", 0, "The value to be included in average calculation for Travel times must exceed this value."); private static IntegerConfigValue maxTravelTimeFilterValue = new IntegerConfigValue( - "transitime.core.frequency.maxTravelTimeFilterValue", + "transitclock.core.frequency.maxTravelTimeFilterValue", 600000, "The value to be included in average calculation for Travel times must be less than this value."); private static IntegerConfigValue minDwellTimeFilterValue = new IntegerConfigValue( - "transitime.core.frequency.minDwellTimeFilterValue", + "transitclock.core.frequency.minDwellTimeFilterValue", 0, "The value to be included in average calculation for dwell time must exceed this value."); private static IntegerConfigValue maxDwellTimeFilterValue = new IntegerConfigValue( - "transitime.core.frequency.maxDwellTimeFilterValue", + "transitclock.core.frequency.maxDwellTimeFilterValue", 600000, "The value to be included in average calculation for dwell time must be less this value."); private static IntegerConfigValue cacheIncrementsForFrequencyService = new IntegerConfigValue( - "transitime.core.frequency.cacheIncrementsForFrequencyService", + "transitclock.core.frequency.cacheIncrementsForFrequencyService", 180*60, "This is the intervals size of the day that the average is applied to. "); diff --git a/transitclock/src/main/java/org/transitclock/core/holdingmethod/HoldingTimeGeneratorDefaultImpl.java b/transitclock/src/main/java/org/transitclock/core/holdingmethod/HoldingTimeGeneratorDefaultImpl.java index 4f6161915..c30567ac2 100755 --- a/transitclock/src/main/java/org/transitclock/core/holdingmethod/HoldingTimeGeneratorDefaultImpl.java +++ b/transitclock/src/main/java/org/transitclock/core/holdingmethod/HoldingTimeGeneratorDefaultImpl.java @@ -41,28 +41,28 @@ public class HoldingTimeGeneratorDefaultImpl implements HoldingTimeGenerator { private static final Logger logger = LoggerFactory.getLogger(HoldingTimeGeneratorDefaultImpl.class); - protected static BooleanConfigValue storeHoldingTimes = new BooleanConfigValue("transitime.holding.storeHoldingTimes", + protected static BooleanConfigValue storeHoldingTimes = new BooleanConfigValue("transitclock.holding.storeHoldingTimes", true, "This is set to true to record all holding times."); - protected static IntegerConfigValue maxPredictionsForHoldingTimeCalculation = new IntegerConfigValue("transitime.holding.maxPredictionsForHoldingTimeCalculation", + protected static IntegerConfigValue maxPredictionsForHoldingTimeCalculation = new IntegerConfigValue("transitclock.holding.maxPredictionsForHoldingTimeCalculation", 3, "This is the maximim number of arrival predictions to include in holding time calculation"); - protected static BooleanConfigValue useArrivalEvents = new BooleanConfigValue("transitime.holding.usearrivalevents", + protected static BooleanConfigValue useArrivalEvents = new BooleanConfigValue("transitclock.holding.usearrivalevents", true, "Generate a holding time on arrival events."); - protected static BooleanConfigValue useArrivalPredictions = new BooleanConfigValue("transitime.holding.usearrivalpredictions", + protected static BooleanConfigValue useArrivalPredictions = new BooleanConfigValue("transitclock.holding.usearrivalpredictions", true, "Generate a holding time on arrival predictions."); - protected static BooleanConfigValue regenerateOnDeparture = new BooleanConfigValue("transitime.holding.regenerateondeparture", + protected static BooleanConfigValue regenerateOnDeparture = new BooleanConfigValue("transitclock.holding.regenerateondeparture", false, "Regenerate a holding time for all vehicles at control point when a vehicle departs the control point."); - protected static IntegerConfigValue plannedHeadwayMsec = new IntegerConfigValue("transitime.holding.plannedHeadwayMsec", 60*1000*9, "Planned Headway"); - protected static StringListConfigValue controlStopList = new StringListConfigValue("transitime.holding.controlStops", null, "This is a list of stops to generate holding times for."); + protected static IntegerConfigValue plannedHeadwayMsec = new IntegerConfigValue("transitclock.holding.plannedHeadwayMsec", 60*1000*9, "Planned Headway"); + protected static StringListConfigValue controlStopList = new StringListConfigValue("transitclock.holding.controlStops", null, "This is a list of stops to generate holding times for."); public HoldingTime generateHoldingTime(VehicleState vehicleState, ArrivalDeparture event) { diff --git a/transitclock/src/main/java/org/transitclock/core/holdingmethod/HoldingTimeGeneratorFactory.java b/transitclock/src/main/java/org/transitclock/core/holdingmethod/HoldingTimeGeneratorFactory.java index 081923e94..bfadaaaba 100755 --- a/transitclock/src/main/java/org/transitclock/core/holdingmethod/HoldingTimeGeneratorFactory.java +++ b/transitclock/src/main/java/org/transitclock/core/holdingmethod/HoldingTimeGeneratorFactory.java @@ -9,7 +9,7 @@ public class HoldingTimeGeneratorFactory { // The name of the class to instantiate private static StringConfigValue className = - new StringConfigValue("transitime.core.holdingTimeGeneratorClass", + new StringConfigValue("transitclock.core.holdingTimeGeneratorClass", "org.transitclock.core.holdingmethod.HoldingTimeGeneratorDefaultImpl", "Specifies the name of the class used for generating " + "holding times."); diff --git a/transitclock/src/main/java/org/transitclock/core/holdingmethod/SimpleHoldingTimeGeneratorImpl.java b/transitclock/src/main/java/org/transitclock/core/holdingmethod/SimpleHoldingTimeGeneratorImpl.java index ee1ab262b..35b573847 100644 --- a/transitclock/src/main/java/org/transitclock/core/holdingmethod/SimpleHoldingTimeGeneratorImpl.java +++ b/transitclock/src/main/java/org/transitclock/core/holdingmethod/SimpleHoldingTimeGeneratorImpl.java @@ -38,12 +38,12 @@ public class SimpleHoldingTimeGeneratorImpl implements HoldingTimeGenerator { private static final Logger logger = LoggerFactory.getLogger(SimpleHoldingTimeGeneratorImpl.class); - protected static BooleanConfigValue storeHoldingTimes = new BooleanConfigValue("transitime.holding.storeHoldingTimes", + protected static BooleanConfigValue storeHoldingTimes = new BooleanConfigValue("transitclock.holding.storeHoldingTimes", true, "This is set to true to record all holding times."); - protected static IntegerConfigValue plannedHeadwayMsec = new IntegerConfigValue("transitime.holding.plannedHeadwayMsec", 60*1000*9, "Planned Headway"); - protected static StringListConfigValue controlStopList = new StringListConfigValue("transitime.holding.controlStops", null, "This is a list of stops to generate holding times for."); + protected static IntegerConfigValue plannedHeadwayMsec = new IntegerConfigValue("transitclock.holding.plannedHeadwayMsec", 60*1000*9, "Planned Headway"); + protected static StringListConfigValue controlStopList = new StringListConfigValue("transitclock.holding.controlStops", null, "This is a list of stops to generate holding times for."); public HoldingTime generateHoldingTime(VehicleState vehicleState, ArrivalDeparture event) { diff --git a/transitclock/src/main/java/org/transitclock/core/predAccuracy/NextBusPredictionAccuracyModule.java b/transitclock/src/main/java/org/transitclock/core/predAccuracy/NextBusPredictionAccuracyModule.java index 57fe9aeb3..0d6a412b4 100755 --- a/transitclock/src/main/java/org/transitclock/core/predAccuracy/NextBusPredictionAccuracyModule.java +++ b/transitclock/src/main/java/org/transitclock/core/predAccuracy/NextBusPredictionAccuracyModule.java @@ -60,7 +60,7 @@ public class NextBusPredictionAccuracyModule extends PredictionAccuracyModule { /********************** Config Params **************************/ private static final StringConfigValue externalPredictionApiUrl = - new StringConfigValue("transitime.predAccuracy.externalPredictionApiUrl", + new StringConfigValue("transitclock.predAccuracy.externalPredictionApiUrl", "http://webservices.nextbus.com/service/publicXMLFeed?", "URL to access to obtain external predictions."); @@ -69,7 +69,7 @@ private static String getExternalPredictionApiUrl() { } private static final StringConfigValue nextBusAgencyIdForApi = - new StringConfigValue("transitime.predAccuracy.nextBusAgencyIdForApi", + new StringConfigValue("transitclock.predAccuracy.nextBusAgencyIdForApi", null, "Name of agency for API"); diff --git a/transitclock/src/main/java/org/transitclock/core/predAccuracy/PredictionAccuracyModule.java b/transitclock/src/main/java/org/transitclock/core/predAccuracy/PredictionAccuracyModule.java index a652613b6..d630008d4 100755 --- a/transitclock/src/main/java/org/transitclock/core/predAccuracy/PredictionAccuracyModule.java +++ b/transitclock/src/main/java/org/transitclock/core/predAccuracy/PredictionAccuracyModule.java @@ -45,7 +45,7 @@ import org.transitclock.utils.Time; /** - * Reads internal predictions every transitime.predAccuracy.pollingRateMsec and + * Reads internal predictions every transitclock.predAccuracy.pollingRateMsec and * stores the predictions into memory. Then when arrivals/departures occur the * prediction accuracy can be determined and stored. * @@ -69,7 +69,7 @@ public class PredictionAccuracyModule extends Module { /********************** Config Params **************************/ private static final IntegerConfigValue timeBetweenPollingPredictionsMsec = - new IntegerConfigValue("transitime.predAccuracy.pollingRateMsec", + new IntegerConfigValue("transitclock.predAccuracy.pollingRateMsec", 4 * Time.MS_PER_MIN, "How frequently to query predictions for determining " + "prediction accuracy."); @@ -79,7 +79,7 @@ protected static int getTimeBetweenPollingPredictionsMsec() { } private static final IntegerConfigValue maxPredTimeMinutes = - new IntegerConfigValue("transitime.predAccuracy.maxPredTimeMinutes", + new IntegerConfigValue("transitclock.predAccuracy.maxPredTimeMinutes", 15, "Maximum time into the future for a pediction for it to " + "be stored in memory for prediction accuracy analysis."); @@ -89,7 +89,7 @@ private static int getMaxPredTimeMinutes() { } private static final IntegerConfigValue maxPredStalenessMinutes = - new IntegerConfigValue("transitime.predAccuracy.maxPredStalenessMinutes", + new IntegerConfigValue("transitclock.predAccuracy.maxPredStalenessMinutes", 15, "Maximum time in minutes a prediction cam be into the " + "past before it is removed from memory because no " @@ -100,7 +100,7 @@ private static int getMaxPredStalenessMinutes() { } private static final IntegerConfigValue stopsPerTrip = - new IntegerConfigValue("transitime.predAccuracy.stopsPerTrip", + new IntegerConfigValue("transitclock.predAccuracy.stopsPerTrip", 5, "Number of stops per trip pattern that should collect " + "prediction data for each polling cycle."); @@ -110,7 +110,7 @@ private static int getStopsPerTrip() { } private static final IntegerConfigValue maxLatenessComparedToPredictionMsec = - new IntegerConfigValue("transitime.predAccuracy.maxLatenessComparedToPredictionMsec", + new IntegerConfigValue("transitclock.predAccuracy.maxLatenessComparedToPredictionMsec", 25 * Time.MS_PER_MIN, "How late in msec a vehicle can arrive/departure a stop " + "compared to the prediction and still have the prediction " @@ -121,7 +121,7 @@ private static int getMaxLatenessComparedToPredictionMsec() { } private static final IntegerConfigValue maxEarlynessComparedToPredictionMsec = - new IntegerConfigValue("transitime.predAccuracy.maxEarlynessComparedToPredictionMsec", + new IntegerConfigValue("transitclock.predAccuracy.maxEarlynessComparedToPredictionMsec", 15 * Time.MS_PER_MIN, "How early in msec a vehicle can arrive/departure a stop " + "compared to the prediction and still have the prediction " @@ -283,7 +283,7 @@ protected List getRoutesAndStops() { /** * Stores prediction in memory so that when arrival/departure generated * can compare with the stored prediction. Will only store prediction - * if it is less then transitime.predAccuracy.maxPredTimeMinutes into + * if it is less then transitclock.predAccuracy.maxPredTimeMinutes into * the future. * * @param pred diff --git a/transitclock/src/main/java/org/transitclock/core/predAccuracy/gtfsrt/GTFSRealtimePredictionAccuracyModule.java b/transitclock/src/main/java/org/transitclock/core/predAccuracy/gtfsrt/GTFSRealtimePredictionAccuracyModule.java index db02ed3f3..e4d3d8c00 100755 --- a/transitclock/src/main/java/org/transitclock/core/predAccuracy/gtfsrt/GTFSRealtimePredictionAccuracyModule.java +++ b/transitclock/src/main/java/org/transitclock/core/predAccuracy/gtfsrt/GTFSRealtimePredictionAccuracyModule.java @@ -61,12 +61,12 @@ public class GTFSRealtimePredictionAccuracyModule extends PredictionAccuracyModu private static final StringConfigValue gtfsTripUpdateUrl = new StringConfigValue( - "transitime.predAccuracy.gtfsTripUpdateUrl", "http://127.0.0.1:8091/trip-updates", + "transitclock.predAccuracy.gtfsTripUpdateUrl", "http://127.0.0.1:8091/trip-updates", "URL to access gtfs-rt trip updates."); private static ClassConfigValue translatorConfig = - new ClassConfigValue("transitime.predAccuracy.RtTranslator", null, + new ClassConfigValue("transitclock.predAccuracy.RtTranslator", null, "Implementation of GTFSRealtimeTranslator to perform " + "the translation of stopIds and other rt quirks"); diff --git a/transitclock/src/main/java/org/transitclock/core/predictiongenerator/average/frequency/HistoricalAveragePredictionGeneratorImpl.java b/transitclock/src/main/java/org/transitclock/core/predictiongenerator/average/frequency/HistoricalAveragePredictionGeneratorImpl.java index c38c849ba..e07b9fb01 100755 --- a/transitclock/src/main/java/org/transitclock/core/predictiongenerator/average/frequency/HistoricalAveragePredictionGeneratorImpl.java +++ b/transitclock/src/main/java/org/transitclock/core/predictiongenerator/average/frequency/HistoricalAveragePredictionGeneratorImpl.java @@ -34,7 +34,7 @@ public class HistoricalAveragePredictionGeneratorImpl extends private String alternative="LastVehiclePredictionGeneratorImpl"; private static final IntegerConfigValue minDays = new IntegerConfigValue( - "transitime.prediction.data.average.mindays", + "transitclock.prediction.data.average.mindays", new Integer(1), "Min number of days trip data that needs to be available before historical average prediciton is used instead of default transiTime prediction."); diff --git a/transitclock/src/main/java/org/transitclock/core/predictiongenerator/average/scheduled/HistoricalAveragePredictionGeneratorImpl.java b/transitclock/src/main/java/org/transitclock/core/predictiongenerator/average/scheduled/HistoricalAveragePredictionGeneratorImpl.java index 3a2d149f7..764aefd2f 100755 --- a/transitclock/src/main/java/org/transitclock/core/predictiongenerator/average/scheduled/HistoricalAveragePredictionGeneratorImpl.java +++ b/transitclock/src/main/java/org/transitclock/core/predictiongenerator/average/scheduled/HistoricalAveragePredictionGeneratorImpl.java @@ -32,7 +32,7 @@ public class HistoricalAveragePredictionGeneratorImpl extends private static final IntegerConfigValue minDays = new IntegerConfigValue( - "transitime.prediction.data.average.mindays", + "transitclock.prediction.data.average.mindays", new Integer(1), "Min number of days trip data that needs to be available before historical average prediciton is used instead of default transiTime prediction."); diff --git a/transitclock/src/main/java/org/transitclock/core/predictiongenerator/kalman/KalmanPredictionGeneratorImpl.java b/transitclock/src/main/java/org/transitclock/core/predictiongenerator/kalman/KalmanPredictionGeneratorImpl.java index 6e3a6976a..0d3dc591a 100755 --- a/transitclock/src/main/java/org/transitclock/core/predictiongenerator/kalman/KalmanPredictionGeneratorImpl.java +++ b/transitclock/src/main/java/org/transitclock/core/predictiongenerator/kalman/KalmanPredictionGeneratorImpl.java @@ -43,19 +43,19 @@ public class KalmanPredictionGeneratorImpl extends HistoricalAveragePredictionGe * historical value. */ private static final IntegerConfigValue minKalmanDays = new IntegerConfigValue( - "transitime.prediction.data.kalman.mindays", new Integer(1), + "transitclock.prediction.data.kalman.mindays", new Integer(1), "Min number of days trip data that needs to be available before Kalman prediciton is used instead of default transiTime prediction."); private static final IntegerConfigValue maxKalmanDays = new IntegerConfigValue( - "transitime.prediction.data.kalman.maxdays", new Integer(3), + "transitclock.prediction.data.kalman.maxdays", new Integer(3), "Max number of historical days trips to include in Kalman prediction calculation."); private static final IntegerConfigValue maxKalmanDaysToSearch = new IntegerConfigValue( - "transitime.prediction.data.kalman.maxdaystoseach", new Integer(21), + "transitclock.prediction.data.kalman.maxdaystoseach", new Integer(21), "Max number of days to look back for data. This will also be effected by how old the data in the cache is."); private static final DoubleConfigValue initialErrorValue = new DoubleConfigValue( - "transitime.prediction.data.kalman.initialerrorvalue", new Double(100), + "transitclock.prediction.data.kalman.initialerrorvalue", new Double(100), "Initial Kalman error value to use to start filter."); private static final Logger logger = LoggerFactory.getLogger(KalmanPredictionGeneratorImpl.class); diff --git a/transitclock/src/main/java/org/transitclock/core/schedBasedPreds/SchedBasedPredsModule.java b/transitclock/src/main/java/org/transitclock/core/schedBasedPreds/SchedBasedPredsModule.java index 7d2659643..e906307f3 100644 --- a/transitclock/src/main/java/org/transitclock/core/schedBasedPreds/SchedBasedPredsModule.java +++ b/transitclock/src/main/java/org/transitclock/core/schedBasedPreds/SchedBasedPredsModule.java @@ -58,7 +58,7 @@ *

* Schedule based predictions are removed once a regular vehicle is assigned to * the block or the schedule based vehicle is timed out via TimeoutHandlerModule - * due to it being transitime.timeout.allowableNoAvlForSchedBasedPredictions + * due to it being transitclock.timeout.allowableNoAvlForSchedBasedPredictions * after the scheduled departure time for the assignment. * * @author SkiBu Smith @@ -73,13 +73,13 @@ public class SchedBasedPredsModule extends Module { private static final IntegerConfigValue timeBetweenPollingMsec = new IntegerConfigValue( - "transitime.schedBasedPreds.pollingRateMsec", + "transitclock.schedBasedPreds.pollingRateMsec", 4 * Time.MS_PER_MIN, "How frequently to look for blocks that do not have " + "associated vehicle."); private static final BooleanConfigValue processImmediatelyAtStartup = - new BooleanConfigValue("transitime.schedBasedPreds.processImmediatelyAtStartup", + new BooleanConfigValue("transitclock.schedBasedPreds.processImmediatelyAtStartup", false, "Whether should start creating schedule based predictions " + "right at startup. Usually want to give AVL data a " @@ -90,13 +90,13 @@ public class SchedBasedPredsModule extends Module { private static final IntegerConfigValue beforeStartTimeMinutes = new IntegerConfigValue( - "transitime.schedBasedPreds.beforeStartTimeMinutes", 60, + "transitclock.schedBasedPreds.beforeStartTimeMinutes", 60, "How many minutes before a block start time should create " + "a schedule based vehicle for that block."); private static IntegerConfigValue afterStartTimeMinutes = new IntegerConfigValue( - "transitime.schedBasedPreds.afterStartTimeMinutes", + "transitclock.schedBasedPreds.afterStartTimeMinutes", 8, // Can take a while to automatically assign a vehicle "If predictions created for a block based on the schedule " + "will remove those predictions this specified " diff --git a/transitclock/src/main/java/org/transitclock/core/travelTimes/DataFetcher.java b/transitclock/src/main/java/org/transitclock/core/travelTimes/DataFetcher.java index 521dd0a43..e8eae470e 100644 --- a/transitclock/src/main/java/org/transitclock/core/travelTimes/DataFetcher.java +++ b/transitclock/src/main/java/org/transitclock/core/travelTimes/DataFetcher.java @@ -50,7 +50,7 @@ private static boolean pageDbReads() { return pageDbReads.getValue(); } private static BooleanConfigValue pageDbReads = - new BooleanConfigValue("transitime.updates.pageDbReads", + new BooleanConfigValue("transitclock.updates.pageDbReads", true, "page database reads to break up long reads. " + "It may impact performance on MySql" @@ -59,7 +59,7 @@ private static Integer pageSize() { return pageSize.getValue(); } private static IntegerConfigValue pageSize = - new IntegerConfigValue("transitime.updates.pageSize", + new IntegerConfigValue("transitclock.updates.pageSize", 50000, "Number of records to read in at a time"); diff --git a/transitclock/src/main/java/org/transitclock/core/travelTimes/TravelTimesProcessor.java b/transitclock/src/main/java/org/transitclock/core/travelTimes/TravelTimesProcessor.java index 79ef28817..b418c5879 100755 --- a/transitclock/src/main/java/org/transitclock/core/travelTimes/TravelTimesProcessor.java +++ b/transitclock/src/main/java/org/transitclock/core/travelTimes/TravelTimesProcessor.java @@ -101,7 +101,7 @@ private static boolean shouldResetEarlyTerminalDepartures() { return resetEarlyTerminalDepartures.getValue(); } private static BooleanConfigValue resetEarlyTerminalDepartures = - new BooleanConfigValue("transitime.travelTimes.resetEarlyTerminalDepartures", + new BooleanConfigValue("transitclock.travelTimes.resetEarlyTerminalDepartures", true, "For some agencies vehicles won't be departing terminal " + "early. If an early departure is detected for such an " @@ -112,7 +112,7 @@ private static double getMaxTravelTimeSegmentLength() { return maxTravelTimeSegmentLength.getValue(); } private static DoubleConfigValue maxTravelTimeSegmentLength = - new DoubleConfigValue("transitime.traveltimes.maxTravelTimeSegmentLength", + new DoubleConfigValue("transitclock.traveltimes.maxTravelTimeSegmentLength", 250.0, "The longest a travel time segment can be. If a stop path " + "is longer than this distance then it will be divided " @@ -122,7 +122,7 @@ private static double getMinSegmentSpeedMps() { return minSegmentSpeedMps.getValue(); } private static DoubleConfigValue minSegmentSpeedMps = - new DoubleConfigValue("transitime.traveltimes.minSegmentSpeedMps", + new DoubleConfigValue("transitclock.traveltimes.minSegmentSpeedMps", 0.0, "If a travel time segment is determined to have a lower " + "speed than this value in meters/sec then the travel time" @@ -131,7 +131,7 @@ private static double getMinSegmentSpeedMps() { + "bad data."); private static DoubleConfigValue maxSegmentSpeedMps = - new DoubleConfigValue("transitime.traveltimes.maxSegmentSpeedMps", + new DoubleConfigValue("transitclock.traveltimes.maxSegmentSpeedMps", 27.0, // 27.0m/s = 60mph "If a travel time segment is determined to have a higher " + "speed than this value in meters/second then the travel " @@ -529,7 +529,7 @@ private List determineTravelTimesForStopPath( && arrDep1.getTime() < arrDep1.getScheduledTime()) { logger.debug("Note: for {} using scheduled departure time instead " + "of the calculated departure time since " - + "transitime.travelTimes.resetEarlyTerminalDepartures is " + + "transitclock.travelTimes.resetEarlyTerminalDepartures is " + "true and the departure time was (likely incorrectly) " + "calculated to be before the scheduled departure time", arrDep1); diff --git a/transitclock/src/main/java/org/transitclock/custom/DbAvlReader.java b/transitclock/src/main/java/org/transitclock/custom/DbAvlReader.java index 0db0af0a1..ee8b4d673 100644 --- a/transitclock/src/main/java/org/transitclock/custom/DbAvlReader.java +++ b/transitclock/src/main/java/org/transitclock/custom/DbAvlReader.java @@ -25,17 +25,17 @@ public class DbAvlReader extends Module { public static final String DB_URL = "url"; private static StringConfigValue dbUrl = - new StringConfigValue("transitime.avl.dbUrl", null, "The jdbc url of the avl database"); + new StringConfigValue("transitclock.avl.dbUrl", null, "The jdbc url of the avl database"); private static StringConfigValue dbQuery = - new StringConfigValue("transitime.avl.dbQuery", "select ID as Id, BusID as busId, " + new StringConfigValue("transitclock.avl.dbQuery", "select ID as Id, BusID as busId, " + " CAST(CONCAT(RptDate, ' ', RptTime) AS DATETIME) AS rptDateTime, " + "LatDD as lat, LonDD as lon, LogonRoute as logonRoute, LogonTrip as logonTrip, " + "RptDate as reportDate from tblbuses;", "The query to execute to receive AVL data"); private static StringConfigValue validationQuery = - new StringConfigValue("transitime.avl.validationQuery", "select 1"); + new StringConfigValue("transitclock.avl.validationQuery", "select 1"); private static IntegerConfigValue numAvlThreads = - new IntegerConfigValue("transitime.avl.jmsNumThreads", 1, + new IntegerConfigValue("transitclock.avl.jmsNumThreads", 1, "How many threads to be used for processing the AVL " + "data. For most applications just using a single thread " + "is probably sufficient and it makes the logging simpler " + @@ -44,12 +44,12 @@ public class DbAvlReader extends Module { "multiple threads, such as 3-5 so that more of the cores " + "are used. Only for when JMS is used."); private static IntegerConfigValue avlQueueSize = - new IntegerConfigValue("transitime.avl.jmsQueueSize", 350, + new IntegerConfigValue("transitclock.avl.jmsQueueSize", 350, "How many items to go into the blocking AVL queue " + "before need to wait for queue to have space. " + "Only for when JMS is used."); private static IntegerConfigValue pollingRateMsec = - new IntegerConfigValue("transitime.avl.pollingRateMsec", 30000, + new IntegerConfigValue("transitclock.avl.pollingRateMsec", 30000, "Milliseconds between AVL database polls"); private final BoundedExecutor _avlClientExecutor; diff --git a/transitclock/src/main/java/org/transitclock/custom/aws/AvlSqsClientModule.java b/transitclock/src/main/java/org/transitclock/custom/aws/AvlSqsClientModule.java index e41a522cd..a728b3a27 100644 --- a/transitclock/src/main/java/org/transitclock/custom/aws/AvlSqsClientModule.java +++ b/transitclock/src/main/java/org/transitclock/custom/aws/AvlSqsClientModule.java @@ -58,13 +58,13 @@ public class AvlSqsClientModule extends Module { private static final int DEFAULT_MESSAGE_LOG_FREQUENCY = 10000; private static IntegerConfigValue avlQueueSize = - new IntegerConfigValue("transitime.avl.jmsQueueSize", 350, + new IntegerConfigValue("transitclock.avl.jmsQueueSize", 350, "How many items to go into the blocking AVL queue " + "before need to wait for queue to have space. " + "Only for when JMS is used."); private static IntegerConfigValue numAvlThreads = - new IntegerConfigValue("transitime.avl.jmsNumThreads", 1, + new IntegerConfigValue("transitclock.avl.jmsNumThreads", 1, "How many threads to be used for processing the AVL " + "data. For most applications just using a single thread " + "is probably sufficient and it makes the logging simpler " + @@ -74,37 +74,37 @@ public class AvlSqsClientModule extends Module { "are used. Only for when JMS is used."); private static IntegerConfigValue messageLogFrequency = - new IntegerConfigValue("transitime.avl.messageLogFrequency", + new IntegerConfigValue("transitclock.avl.messageLogFrequency", DEFAULT_MESSAGE_LOG_FREQUENCY, "How often (in count of message) a log message is output " + "confirming messages have been received"); private static StringConfigValue avlUrl = - new StringConfigValue("transitime.avl.sqsUrl", null, "The SQS URL from AWS"); + new StringConfigValue("transitclock.avl.sqsUrl", null, "The SQS URL from AWS"); private static StringConfigValue sqsKey = - new StringConfigValue("transitime.avl.sqsKey", null, "The AWS Key with SQS read access"); + new StringConfigValue("transitclock.avl.sqsKey", null, "The AWS Key with SQS read access"); private static StringConfigValue sqsSecret = - new StringConfigValue("transitime.avl.sqsSecret", null, "The AWS Secret with SQS read access"); + new StringConfigValue("transitclock.avl.sqsSecret", null, "The AWS Secret with SQS read access"); private static StringConfigValue snsKey = - new StringConfigValue("transitime.avl.snsKey", null, "The AWS Key with SNS write access"); + new StringConfigValue("transitclock.avl.snsKey", null, "The AWS Key with SNS write access"); private static StringConfigValue snsSecret = - new StringConfigValue("transitime.avl.snsSecret", null, "The AWS Secret with SNS write access"); + new StringConfigValue("transitclock.avl.snsSecret", null, "The AWS Secret with SNS write access"); private static StringConfigValue snsArn = - new StringConfigValue("transitime.avl.snsArn", null, "The AWS SNS ARN to write to"); + new StringConfigValue("transitclock.avl.snsArn", null, "The AWS SNS ARN to write to"); private static ClassConfigValue unmarshallerConfig = - new ClassConfigValue("transitime.avl.unmarshaller", WmataAvlTypeUnmarshaller.class, + new ClassConfigValue("transitclock.avl.unmarshaller", WmataAvlTypeUnmarshaller.class, "Implementation of SqsMessageUnmarshaller to perform " + "the deserialization of SQS Message objects into AVLReport objects"); private static StringConfigValue applicableList = - new StringConfigValue("transitime.avl.filterVehicleIdList", null, "List of vehicle Ids to filter on"); + new StringConfigValue("transitclock.avl.filterVehicleIdList", null, "List of vehicle Ids to filter on"); public AvlSqsClientModule(String agencyId) throws Exception { super(agencyId); diff --git a/transitclock/src/main/java/org/transitclock/custom/georgiaTech/GeorgiaTechAvlModule.java b/transitclock/src/main/java/org/transitclock/custom/georgiaTech/GeorgiaTechAvlModule.java index 458e5547e..9332ca394 100644 --- a/transitclock/src/main/java/org/transitclock/custom/georgiaTech/GeorgiaTechAvlModule.java +++ b/transitclock/src/main/java/org/transitclock/custom/georgiaTech/GeorgiaTechAvlModule.java @@ -52,12 +52,12 @@ public class GeorgiaTechAvlModule extends AvlModule { private static StringConfigValue georgiaTechFeedDomainName = - new StringConfigValue("transitime.avl.georgiaTechFeedDomainName", + new StringConfigValue("transitclock.avl.georgiaTechFeedDomainName", "The domain name for the socket connection for the " + "Georgia Tech AVLfeed."); private static IntegerConfigValue georgiaTechFeedPort = - new IntegerConfigValue("transitime.avl.georgiaTechFeedPort", + new IntegerConfigValue("transitclock.avl.georgiaTechFeedPort", "The port number for the socket connection for the " + "Georgia Tech AVLfeed."); diff --git a/transitclock/src/main/java/org/transitclock/custom/gtt/GTTAvlModule.java b/transitclock/src/main/java/org/transitclock/custom/gtt/GTTAvlModule.java index 85699179c..85c7b7ae1 100755 --- a/transitclock/src/main/java/org/transitclock/custom/gtt/GTTAvlModule.java +++ b/transitclock/src/main/java/org/transitclock/custom/gtt/GTTAvlModule.java @@ -22,7 +22,7 @@ public class GTTAvlModule extends PollUrlAvlModule { private static String avlURL="http://m.gatech.edu/api/buses/position"; HashMap avlreports = new HashMap(); - protected static StringListConfigValue vehiclesonredroute = new StringListConfigValue("transitime.gtt.vehiclesonredroute",null, "List of vehicles on read route for HoldingTime trial."); + protected static StringListConfigValue vehiclesonredroute = new StringListConfigValue("transitclock.gtt.vehiclesonredroute",null, "List of vehicles on read route for HoldingTime trial."); public GTTAvlModule(String agencyId) { super(agencyId); diff --git a/transitclock/src/main/java/org/transitclock/custom/gtt/GTTCsvAvlModule.java b/transitclock/src/main/java/org/transitclock/custom/gtt/GTTCsvAvlModule.java index ccaa9764e..98c82c0a4 100644 --- a/transitclock/src/main/java/org/transitclock/custom/gtt/GTTCsvAvlModule.java +++ b/transitclock/src/main/java/org/transitclock/custom/gtt/GTTCsvAvlModule.java @@ -24,13 +24,13 @@ public class GTTCsvAvlModule extends Module { private static final Logger logger = LoggerFactory.getLogger(GTTCsvAvlModule.class); - private static StringConfigValue csvfolder = new StringConfigValue("transitime.gtt.csvfolder", "/data", + private static StringConfigValue csvfolder = new StringConfigValue("transitclock.gtt.csvfolder", "/data", "Folder to find archived GTT avl files."); // For running in real time private long lastAvlReportTimestamp = -1; - private static BooleanConfigValue processInRealTime = new BooleanConfigValue("transitime.avl.processInRealTime", + private static BooleanConfigValue processInRealTime = new BooleanConfigValue("transitclock.avl.processInRealTime", false, "For when getting batch of AVL data from a CSV file. " + "When true then when reading in do at the same speed as " diff --git a/transitclock/src/main/java/org/transitclock/custom/irishrail/GtfsRtAvlModule.java b/transitclock/src/main/java/org/transitclock/custom/irishrail/GtfsRtAvlModule.java index 30d45ecc8..7f91b901e 100755 --- a/transitclock/src/main/java/org/transitclock/custom/irishrail/GtfsRtAvlModule.java +++ b/transitclock/src/main/java/org/transitclock/custom/irishrail/GtfsRtAvlModule.java @@ -47,7 +47,7 @@ public static String getGtfsRealtimeURI() { } private static StringConfigValue gtfsRealtimeFeedURI = - new StringConfigValue("transitime.avl.gtfsRealtimeFeedURI", + new StringConfigValue("transitclock.avl.gtfsRealtimeFeedURI", "http://developer.onebusaway.org/wmata-gtfsr/vehiclePositions", "The URI of the GTFS-realtime feed generated form the gtfs-realtime data."); diff --git a/transitclock/src/main/java/org/transitclock/custom/lametro/LametroRailNextBusAvlModule.java b/transitclock/src/main/java/org/transitclock/custom/lametro/LametroRailNextBusAvlModule.java index cb70987e3..b6a01ca80 100644 --- a/transitclock/src/main/java/org/transitclock/custom/lametro/LametroRailNextBusAvlModule.java +++ b/transitclock/src/main/java/org/transitclock/custom/lametro/LametroRailNextBusAvlModule.java @@ -29,9 +29,9 @@ public class LametroRailNextBusAvlModule extends NextBusAvlModule { private static StringConfigValue agencyNameForFeed = - new StringConfigValue("transitime.custom.lametro.agencyNameForLametroRailFeed", + new StringConfigValue("transitclock.custom.lametro.agencyNameForLametroRailFeed", "If set then specifies the agency name to use for the " - + "feed. If not set then the transitime.core.agencyId " + + "feed. If not set then the transitclock.core.agencyId " + "is used."); @Override protected String getAgencyNameForFeed() { diff --git a/transitclock/src/main/java/org/transitclock/custom/mbta/KeolisAvlModule.java b/transitclock/src/main/java/org/transitclock/custom/mbta/KeolisAvlModule.java index 20655b58e..92680bdae 100644 --- a/transitclock/src/main/java/org/transitclock/custom/mbta/KeolisAvlModule.java +++ b/transitclock/src/main/java/org/transitclock/custom/mbta/KeolisAvlModule.java @@ -37,17 +37,17 @@ /** * AVL module for reading AVL data from Keolis feed. * - * @author Michael Smith (michael@transitime.org) + * @author Michael Smith (michael@transitclock.org) * */ public class KeolisAvlModule extends PollUrlAvlModule { private static StringConfigValue mbtaCommuterRailFeedUrl = - new StringConfigValue("transitime.avl.mbtaCommuterRailFeedUrl", + new StringConfigValue("transitclock.avl.mbtaCommuterRailFeedUrl", "The URL of the Keolis feed to use."); private static IntegerConfigValue keolisFeedAvlTimeOffset = - new IntegerConfigValue("transitime.mbta.keolisFeedAvlTimeOffset", + new IntegerConfigValue("transitclock.mbta.keolisFeedAvlTimeOffset", 5, "The GPS time from the Keolis feed has a strange 4 or 5 " + "hour offset. It appears that it is 4 hours during " diff --git a/transitclock/src/main/java/org/transitclock/custom/mbta/MbtaCommuterRailAvlModule.java b/transitclock/src/main/java/org/transitclock/custom/mbta/MbtaCommuterRailAvlModule.java index c3106eed7..7c94c7b69 100644 --- a/transitclock/src/main/java/org/transitclock/custom/mbta/MbtaCommuterRailAvlModule.java +++ b/transitclock/src/main/java/org/transitclock/custom/mbta/MbtaCommuterRailAvlModule.java @@ -58,7 +58,7 @@ public class MbtaCommuterRailAvlModule extends PollUrlAvlModule { /********************** Member Functions **************************/ private static StringConfigValue mbtaCommuterRailFeedUrl = - new StringConfigValue("transitime.avl.mbtaCommuterRailFeedUrl", + new StringConfigValue("transitclock.avl.mbtaCommuterRailFeedUrl", "The URL of the MBTA commuter rail feed to use."); private static String getMbtaCommuterRailFeedUrl() { diff --git a/transitclock/src/main/java/org/transitclock/custom/mbta/MbtaPredictionAccuracyModule.java b/transitclock/src/main/java/org/transitclock/custom/mbta/MbtaPredictionAccuracyModule.java index 264d7170c..ec3735fac 100644 --- a/transitclock/src/main/java/org/transitclock/custom/mbta/MbtaPredictionAccuracyModule.java +++ b/transitclock/src/main/java/org/transitclock/custom/mbta/MbtaPredictionAccuracyModule.java @@ -62,7 +62,7 @@ public class MbtaPredictionAccuracyModule extends PredictionAccuracyModule { /********************** Config Params **************************/ private static final StringConfigValue externalPredictionApiUrl = - new StringConfigValue("transitime.predAccuracy.externalPredictionApiUrl", + new StringConfigValue("transitclock.predAccuracy.externalPredictionApiUrl", "http://realtime.mbta.com/developer/api/v2/predictionsbyroute?", "URL to access to obtain external predictions."); @@ -71,7 +71,7 @@ private static String getExternalPredictionApiUrl() { } private static final StringConfigValue apiKey = - new StringConfigValue("transitime.predAccuracy.apiKey", + new StringConfigValue("transitclock.predAccuracy.apiKey", "wX9NwuHnZU2ToO7GmGR9uw", "The API key to use when accessing the external prediction " + "feed. The default value is the public MBTA key, which " diff --git a/transitclock/src/main/java/org/transitclock/custom/missionBay/GtfsFromNextBus.java b/transitclock/src/main/java/org/transitclock/custom/missionBay/GtfsFromNextBus.java index c829eac68..9fa5ea76f 100644 --- a/transitclock/src/main/java/org/transitclock/custom/missionBay/GtfsFromNextBus.java +++ b/transitclock/src/main/java/org/transitclock/custom/missionBay/GtfsFromNextBus.java @@ -63,39 +63,39 @@ public class GtfsFromNextBus { /******************* Parameters *************************/ private static StringConfigValue agencyId = - new StringConfigValue("transitime.gtfs.agencyId", + new StringConfigValue("transitclock.gtfs.agencyId", "missionBay", "Agency name used in resulting GTFS files."); private static StringConfigValue nextBusAgencyId = - new StringConfigValue("transitime.gtfs.nextBusAgencyId", + new StringConfigValue("transitclock.gtfs.nextBusAgencyId", "sf-mission-bay", "Agency name that NextBus uses."); private static StringConfigValue nextBusFeedUrl = - new StringConfigValue("transitime.gtfs.nextbusFeedUrl", + new StringConfigValue("transitclock.gtfs.nextbusFeedUrl", "http://webservices.nextbus.com/service/publicXMLFeed", "The URL of the NextBus feed to use."); private static StringConfigValue gtfsDirectory = - new StringConfigValue("transitime.gtfs.gtfsDirectory", + new StringConfigValue("transitclock.gtfs.gtfsDirectory", "C:/GTFS/", "Directory where resulting GTFS files are to be written."); private static StringConfigValue gtfsRouteType = - new StringConfigValue("transitime.gtfs.gtfsRouteType", + new StringConfigValue("transitclock.gtfs.gtfsRouteType", "3", "GTFS definition of the route type. 1=subway 2=rail " + "3=buses."); private static StringConfigValue serviceId = - new StringConfigValue("transitime.gtfs.serviceId", + new StringConfigValue("transitclock.gtfs.serviceId", "wkd", "The service_id to use for the trips.txt file. Currently " + "only can handle a single service ID."); private static StringListConfigValue validBlockIds = - new StringListConfigValue("transitime.gtfs.validBlockIds", + new StringListConfigValue("transitclock.gtfs.validBlockIds", "Only the block IDs from this list will be process from " + "the schedule from the NextBus API. Useful since NextBus " + "doesn't always clean out obsolete blocks");; diff --git a/transitclock/src/main/java/org/transitclock/custom/missionBay/SfmtaApiCaller.java b/transitclock/src/main/java/org/transitclock/custom/missionBay/SfmtaApiCaller.java index 293b56f96..e506a084b 100644 --- a/transitclock/src/main/java/org/transitclock/custom/missionBay/SfmtaApiCaller.java +++ b/transitclock/src/main/java/org/transitclock/custom/missionBay/SfmtaApiCaller.java @@ -48,43 +48,43 @@ public class SfmtaApiCaller { private static StringConfigValue telemetryUrl = - new StringConfigValue("transitime.sfmta.telemetryUrl", + new StringConfigValue("transitclock.sfmta.telemetryUrl", "https://services.sfmta.com/shuttle/api/Telemetries/", "The telemetry URL for the SFMTA API"); private static StringConfigValue stopsUrl = - new StringConfigValue("transitime.sfmta.telemetryUrl", + new StringConfigValue("transitclock.sfmta.telemetryUrl", "https://services.sfmta.com/shuttle/api/StopEvents/", "The stops URL for the SFMTA API"); private static StringConfigValue login = - new StringConfigValue("transitime.sfmta.login", + new StringConfigValue("transitclock.sfmta.login", "TransitTimeApiUser", "Login for basic authentication."); private static StringConfigValue password = - new StringConfigValue("transitime.sfmta.password", + new StringConfigValue("transitclock.sfmta.password", "SFMTA$hutt1e$3G", "Password for basic authentication."); private static StringConfigValue techProviderId = - new StringConfigValue("transitime.sfmta.techProviderId", + new StringConfigValue("transitclock.sfmta.techProviderId", "248", "The TechProviderId for the SFMTA API"); private static StringConfigValue shuttleCompanyId = - new StringConfigValue("transitime.sfmta.shuttleCompanyId", + new StringConfigValue("transitclock.sfmta.shuttleCompanyId", "11", "The ShuttleCompanyId for the SFMTA API"); private static IntegerConfigValue timeout = - new IntegerConfigValue("transitime.sfmta.timeout", + new IntegerConfigValue("transitclock.sfmta.timeout", 10000, "Timeout in msec for API calls. A timeout of 0 is " + "interpreted as an infinit timeout."); private static IntegerConfigValue avlReportsBatchSize = - new IntegerConfigValue("transitime.sfmta.avlReportsBatchSize", + new IntegerConfigValue("transitclock.sfmta.avlReportsBatchSize", 10, "Won't actually post AVL reports to SFMTA API until this " + "many have been received."); diff --git a/transitclock/src/main/java/org/transitclock/custom/vta/VtaAcsAvlModule.java b/transitclock/src/main/java/org/transitclock/custom/vta/VtaAcsAvlModule.java index d40157320..2126ce051 100644 --- a/transitclock/src/main/java/org/transitclock/custom/vta/VtaAcsAvlModule.java +++ b/transitclock/src/main/java/org/transitclock/custom/vta/VtaAcsAvlModule.java @@ -41,7 +41,7 @@ public class VtaAcsAvlModule extends PollUrlAvlModule { private static StringConfigValue feedUrl = - new StringConfigValue("transitime.avl.vta.url", + new StringConfigValue("transitclock.avl.vta.url", "The URL of the ACS feed to use."); private static final Logger logger = LoggerFactory diff --git a/transitclock/src/main/java/org/transitclock/db/hibernate/HibernateUtils.java b/transitclock/src/main/java/org/transitclock/db/hibernate/HibernateUtils.java index a46f77c87..d9af9fd5c 100644 --- a/transitclock/src/main/java/org/transitclock/db/hibernate/HibernateUtils.java +++ b/transitclock/src/main/java/org/transitclock/db/hibernate/HibernateUtils.java @@ -170,7 +170,7 @@ private static SessionFactory createSessionFactory(String dbName, boolean readOn * * @param agencyId * Used as the database name if the property - * transitime.db.dbName is not set + * transitclock.db.dbName is not set * @return */ public static SessionFactory getSessionFactory(String agencyId) @@ -182,7 +182,7 @@ public static SessionFactory getSessionFactory(String agencyId, boolean readOnly throws HibernateException{ // Determine the database name to use. Will usually use the // projectId since each project has a database. But this might - // be overridden by the transitime.core.dbName property. + // be overridden by the transitclock.core.dbName property. String dbName = DbSetupConfig.getDbName(); if (dbName == null) dbName = agencyId; @@ -236,7 +236,7 @@ public static void clearSessionFactory() { * * @param agencyId * Used as the database name if the property - * transitime.core.dbName is not set + * transitclock.core.dbName is not set * @return The Session. Make sure you close it when done because system only * gets limited number of open sessions. * @throws HibernateException @@ -254,7 +254,7 @@ public static Session getSession(String agencyId, boolean readOnly) throws Hiber /** * Returns the session for the database name specified by the - * transitime.db.dbName Java property. + * transitclock.db.dbName Java property. *

* NOTE: Make sure you close the session after the query!! Use a try/catch * around the query and close the session in a finally block to make sure it diff --git a/transitclock/src/main/java/org/transitclock/db/structs/ArrivalDeparture.java b/transitclock/src/main/java/org/transitclock/db/structs/ArrivalDeparture.java index 5e4e86468..0ba67680b 100755 --- a/transitclock/src/main/java/org/transitclock/db/structs/ArrivalDeparture.java +++ b/transitclock/src/main/java/org/transitclock/db/structs/ArrivalDeparture.java @@ -607,7 +607,7 @@ public static List getArrivalsDeparturesFromDb( // Call in standard getArrivalsDeparturesFromDb() but pass in // sql clause return getArrivalsDeparturesFromDb( - null, // Use db specified by transitime.db.dbName + null, // Use db specified by transitclock.db.dbName beginTime, endTime, "AND vehicleId='" + vehicleId + "'", 0, 0, // Don't use batching @@ -749,7 +749,7 @@ public static List getArrivalsDeparturesFromDb( * @param dbName * Name of the database to retrieve data from. If set to null * then will use db name configured by Java property - * transitime.db.dbName + * transitclock.db.dbName * @param beginTime * @param endTime * @param sqlClause @@ -868,7 +868,7 @@ public static Long getArrivalsDeparturesCountFromDb( /** * Same as other getArrivalsDeparturesFromDb() but uses - * -Dtransitime.db.dbName Java property to specify the name of the database. + * -Dtransitclock.db.dbName Java property to specify the name of the database. * * @param beginTime * @param endTime diff --git a/transitclock/src/main/java/org/transitclock/db/structs/AvlReport.java b/transitclock/src/main/java/org/transitclock/db/structs/AvlReport.java index 39dafc37c..e89233c1d 100644 --- a/transitclock/src/main/java/org/transitclock/db/structs/AvlReport.java +++ b/transitclock/src/main/java/org/transitclock/db/structs/AvlReport.java @@ -901,7 +901,7 @@ public boolean hasValidAssignment() { matchesUnpredictableAssignment(assignmentId)) logger.debug("For vehicleId={} was assigned to \"{}\" but that " + "assignment is not considered valid due to " + - "transitime.avl.unpredictableAssignmentsRegEx being set " + + "transitclock.avl.unpredictableAssignmentsRegEx being set " + "to \"{}\"", vehicleId, assignmentId, AvlConfig.getUnpredictableAssignmentsRegEx()); diff --git a/transitclock/src/main/java/org/transitclock/db/structs/Block.java b/transitclock/src/main/java/org/transitclock/db/structs/Block.java index 8a1edb658..f5a2a21a6 100644 --- a/transitclock/src/main/java/org/transitclock/db/structs/Block.java +++ b/transitclock/src/main/java/org/transitclock/db/structs/Block.java @@ -145,7 +145,7 @@ public final class Block implements Serializable { private static final long serialVersionUID = 6511242755235485004L; private static BooleanConfigValue blockLoading = - new BooleanConfigValue("transitime.blockLoading.agressive", false, "Set true to eagerly fetch all blocks into memory on startup"); + new BooleanConfigValue("transitclock.blockLoading.agressive", false, "Set true to eagerly fetch all blocks into memory on startup"); private static final Logger logger = LoggerFactory.getLogger(Block.class); diff --git a/transitclock/src/main/java/org/transitclock/db/structs/ConfigRevision.java b/transitclock/src/main/java/org/transitclock/db/structs/ConfigRevision.java index 7bee86c8e..f60632ab7 100644 --- a/transitclock/src/main/java/org/transitclock/db/structs/ConfigRevision.java +++ b/transitclock/src/main/java/org/transitclock/db/structs/ConfigRevision.java @@ -38,7 +38,7 @@ * This way can keep track of reason for processing config, when it was run, * etc. * - * @author Michael Smith (michael@transitime.org) + * @author Michael Smith (michael@transitclock.org) * */ @Entity @DynamicUpdate diff --git a/transitclock/src/main/java/org/transitclock/db/webstructs/ApiKeyManager.java b/transitclock/src/main/java/org/transitclock/db/webstructs/ApiKeyManager.java index 8720f8d74..483335b04 100644 --- a/transitclock/src/main/java/org/transitclock/db/webstructs/ApiKeyManager.java +++ b/transitclock/src/main/java/org/transitclock/db/webstructs/ApiKeyManager.java @@ -51,7 +51,7 @@ public class ApiKeyManager { private long lastTimeKeysReadIntoCache = 0; private static IntegerConfigValue lastTimeKeysReadLimitSec = new IntegerConfigValue( - "transitime.api.apiKeyLastUpdateLimitSec", 3, + "transitclock.api.apiKeyLastUpdateLimitSec", 3, "Amount of time to wait in sec before updating the apiKeyCache"); // This is a singleton class @@ -132,7 +132,7 @@ public synchronized boolean isKeyValid(String key) { * CoreConfig.getDbHost(), CoreConfig.getDbUserName(), and * CoreConfig.getDbPassword(). The db host, user name, and password can also * be set in the hibernate.cfg.xml file if the parameter - * transitime.hibernate.configFile in the CoreConfig is set. + * transitclock.hibernate.configFile in the CoreConfig is set. * * @return */ diff --git a/transitclock/src/main/java/org/transitclock/db/webstructs/WebAgency.java b/transitclock/src/main/java/org/transitclock/db/webstructs/WebAgency.java index c11a7cdf1..0fa7cce84 100755 --- a/transitclock/src/main/java/org/transitclock/db/webstructs/WebAgency.java +++ b/transitclock/src/main/java/org/transitclock/db/webstructs/WebAgency.java @@ -227,7 +227,7 @@ public String getAgencyName() { /** * Specifies name of database to use for reading in the WebAgency objects. - * Currently using the command line option transitime.core.agencyId . + * Currently using the command line option transitclock.core.agencyId . * * @return Name of db to retrieve WebAgency objects from */ diff --git a/transitclock/src/main/java/org/transitclock/gtfs/DbConfig.java b/transitclock/src/main/java/org/transitclock/gtfs/DbConfig.java index 6d89305da..b39b5fea9 100644 --- a/transitclock/src/main/java/org/transitclock/gtfs/DbConfig.java +++ b/transitclock/src/main/java/org/transitclock/gtfs/DbConfig.java @@ -128,7 +128,7 @@ public class DbConfig { .getLogger(DbConfig.class); private StringConfigValue validateTestQuery - = new StringConfigValue("transitime.db.validateQuery", + = new StringConfigValue("transitclock.db.validateQuery", "SELECT 1", "query to validate database connection"); diff --git a/transitclock/src/main/java/org/transitclock/gtfs/GtfsData.java b/transitclock/src/main/java/org/transitclock/gtfs/GtfsData.java index 0521d0b81..180beea15 100644 --- a/transitclock/src/main/java/org/transitclock/gtfs/GtfsData.java +++ b/transitclock/src/main/java/org/transitclock/gtfs/GtfsData.java @@ -216,7 +216,7 @@ public class GtfsData { // for details on how to filter out matches as opposed to specifying // which ones want to keep. private static StringConfigValue routeIdFilterRegEx = new StringConfigValue( - "transitime.gtfs.routeIdFilterRegEx", + "transitclock.gtfs.routeIdFilterRegEx", null, // Default of null means don't do any filtering "Route is included only if route_id matches the this regular " + "expression. If only want routes with \"SPECIAL\" in the id then " @@ -230,7 +230,7 @@ public class GtfsData { // So can process only trips that match a regular expression. // Default of null means don't do any filtering private static StringConfigValue tripIdFilterRegEx = new StringConfigValue( - "transitime.gtfs.tripIdFilterRegEx", + "transitclock.gtfs.tripIdFilterRegEx", null, // Default of null means don't do any filtering "Trip is included only if trip_id matches the this regular " + "expression. If only want trips with \"SPECIAL\" in the id then " @@ -242,13 +242,13 @@ public class GtfsData { private static Pattern tripIdFilterRegExPattern = null; private static IntegerConfigValue stopCodeBaseValue = - new IntegerConfigValue("transitime.gtfs.stopCodeBaseValue", + new IntegerConfigValue("transitclock.gtfs.stopCodeBaseValue", "If agency doesn't specify stop codes but simply wants to " + "have them be a based number plus the stop ID then this " + "parameter can specify the base value. "); private static DoubleConfigValue minDistanceBetweenStopsToDisambiguateHeadsigns = - new DoubleConfigValue("transitime.gtfs.minDistanceBetweenStopsToDisambiguateHeadsigns", + new DoubleConfigValue("transitclock.gtfs.minDistanceBetweenStopsToDisambiguateHeadsigns", 1000.0, "When disambiguating headsigns by appending the too stop " + "name of the last stop, won't disambiguate if the last " @@ -1613,7 +1613,7 @@ private void makeHeadsignsUniqueIfDifferentLastStop() { logger.warn("Modifying headsign \"{}\" to \"{}\" " + "since it has a different last stop {} away " + "which is further away than " - + "transitime.gtfs.minDistanceBetweenStopsToDisambiguateHeadsigns of {}. " + + "transitclock.gtfs.minDistanceBetweenStopsToDisambiguateHeadsigns of {}. " + "TripPattern {}. Other TripPattern {}", firstTripPatternForHeadsign.getHeadsign(), modifiedHeadsign, @@ -1638,7 +1638,7 @@ private void makeHeadsignsUniqueIfDifferentLastStop() { logger.warn("Modifying headsign \"{}\" to \"{}\" " + "since it has a different last stop {} away " + "which is further away than " - + "transitime.gtfs.minDistanceBetweenStopsToDisambiguateHeadsigns of {}. " + + "transitclock.gtfs.minDistanceBetweenStopsToDisambiguateHeadsigns of {}. " + "TripPattern {}. Other TripPattern {}", tripPattern.getHeadsign(), modifiedHeadsign, @@ -2611,7 +2611,7 @@ public void outputPathsAndStopsForGraphing(String routeId) { /** * Returns true if the tripId isn't supposed to be filtered out, as - * specified by the transitime.gtfs.tripIdRegExPattern property. + * specified by the transitclock.gtfs.tripIdRegExPattern property. * * @param tripId * @return True if trip not to be filtered out @@ -2630,7 +2630,7 @@ public static boolean tripNotFiltered(String tripId) { /** * Returns true if the routeId isn't supposed to be filtered out, as - * specified by the transitime.gtfs.routeIdRegExPattern property. + * specified by the transitclock.gtfs.routeIdRegExPattern property. * * @param routeId * @return True if route not to be filtered out diff --git a/transitclock/src/main/java/org/transitclock/gtfs/GtfsUpdatedModule.java b/transitclock/src/main/java/org/transitclock/gtfs/GtfsUpdatedModule.java index aa0f3a870..318d14a00 100644 --- a/transitclock/src/main/java/org/transitclock/gtfs/GtfsUpdatedModule.java +++ b/transitclock/src/main/java/org/transitclock/gtfs/GtfsUpdatedModule.java @@ -46,7 +46,7 @@ * by an agency. *

* When a GTFS file is downloaded then this module also e-mails recipients - * specified by the parameter transitime.monitoring.emailRecipients + * specified by the parameter transitclock.monitoring.emailRecipients * * @author SkiBu Smith * @@ -56,17 +56,17 @@ public class GtfsUpdatedModule extends Module { // Configuration parameters private static StringConfigValue url = new StringConfigValue( - "transitime.gtfs.url", + "transitclock.gtfs.url", "URL where to retrieve the GTFS file."); private static StringConfigValue dirName = new StringConfigValue( - "transitime.gtfs.dirName", + "transitclock.gtfs.dirName", "Directory on agency server where to place the GTFS file."); private static LongConfigValue intervalMsec = new LongConfigValue( - "transitime.gtfs.intervalMsec", + "transitclock.gtfs.intervalMsec", // Low cost unless file actually downloaded so do pretty // frequently so get updates as soon as possible 4 * Time.MS_PER_HOUR, diff --git a/transitclock/src/main/java/org/transitclock/gtfs/TitleFormatter.java b/transitclock/src/main/java/org/transitclock/gtfs/TitleFormatter.java index 1ac53a544..53674ef1a 100644 --- a/transitclock/src/main/java/org/transitclock/gtfs/TitleFormatter.java +++ b/transitclock/src/main/java/org/transitclock/gtfs/TitleFormatter.java @@ -99,7 +99,7 @@ public RegexInfo(String regex, String replace) { new ArrayList(); private static final BooleanConfigValue capitalize = - new BooleanConfigValue("transitime.gtfs.capitalize", + new BooleanConfigValue("transitclock.gtfs.capitalize", false, "Sometimes GTFS titles have all capital letters or other " + "capitalization issues. If set to true then will properly " diff --git a/transitclock/src/main/java/org/transitclock/gtfs/gtfsStructs/GtfsTrip.java b/transitclock/src/main/java/org/transitclock/gtfs/gtfsStructs/GtfsTrip.java index ab36d49aa..e5724902e 100644 --- a/transitclock/src/main/java/org/transitclock/gtfs/gtfsStructs/GtfsTrip.java +++ b/transitclock/src/main/java/org/transitclock/gtfs/gtfsStructs/GtfsTrip.java @@ -46,7 +46,7 @@ public class GtfsTrip extends CsvBase { // trip_short_name is not specified in GTFS file. // Default of null means simply use trip_id without any modification. private static StringConfigValue tripShortNameRegEx = new StringConfigValue( - "transitime.gtfs.tripShortNameRegEx", + "transitclock.gtfs.tripShortNameRegEx", null, "For agencies where trip short name not specified can use this " + "regular expression to determine the short name from the trip " @@ -57,7 +57,7 @@ public class GtfsTrip extends CsvBase { // For determining proper block_id that corresponds to AVL feed // Default of null means simply use block_id without any modification. private static StringConfigValue blockIdRegEx = new StringConfigValue( - "transitime.gtfs.blockIdRegEx", + "transitclock.gtfs.blockIdRegEx", null, "For agencies where block ID from GTFS datda needs to be modified " + "to match that of the AVL feed. Can use this " @@ -213,7 +213,7 @@ public GtfsTrip(String tripShortName, String blockId) { /** * Many agencies don't specify a trip_short_name. For these use the trip_id - * or if the transitime.gtfs.tripShortNameRegEx is set to determine a group + * or if the transitclock.gtfs.tripShortNameRegEx is set to determine a group * then use that group in the tripId. For example, if tripId is * "345-long unneeded description" and the regex is set to "(.*?)-" then * returned trip short name will be 345. @@ -254,7 +254,7 @@ private static String getTripShortName(String tripShortName, String tripId) { /** * In case block IDs from GTFS needs to be modified to match block IDs from - * AVL feed. Uses the property transitime.gtfs.blockIdRegEx if it is not + * AVL feed. Uses the property transitclock.gtfs.blockIdRegEx if it is not * null. * * @param originalBlockId diff --git a/transitclock/src/main/java/org/transitclock/ipc/jms/JMSWrapper.java b/transitclock/src/main/java/org/transitclock/ipc/jms/JMSWrapper.java index 3ca4dbc87..4fb29e4b9 100644 --- a/transitclock/src/main/java/org/transitclock/ipc/jms/JMSWrapper.java +++ b/transitclock/src/main/java/org/transitclock/ipc/jms/JMSWrapper.java @@ -77,7 +77,7 @@ public class JMSWrapper { // Parameter that specifies URL of where to find the hornetq server private static StringConfigValue hornetqServerURL = - new StringConfigValue("transitime.ipc.hornetqServerURL", + new StringConfigValue("transitclock.ipc.hornetqServerURL", "jnp://localhost:1099", "The URL of the Hornet JMS service to use."); public static String getHornetqServerURL() { diff --git a/transitclock/src/main/java/org/transitclock/ipc/rmi/ClientFactory.java b/transitclock/src/main/java/org/transitclock/ipc/rmi/ClientFactory.java index d93d2d177..092d3e865 100644 --- a/transitclock/src/main/java/org/transitclock/ipc/rmi/ClientFactory.java +++ b/transitclock/src/main/java/org/transitclock/ipc/rmi/ClientFactory.java @@ -49,7 +49,7 @@ public class ClientFactory { private static Boolean rmiTimeoutEnabled = false; private static IntegerConfigValue timeoutSec = new IntegerConfigValue( - "transitime.rmi.timeoutSec", 4, + "transitclock.rmi.timeoutSec", 4, "Specifies the timeout time in seconds for RMI calls. Note " + "that when an RMI failure occurs a second try is done " + "so total timeout time is twice what is specified here."); diff --git a/transitclock/src/main/java/org/transitclock/ipc/rmi/RmiCallInvocationHandler.java b/transitclock/src/main/java/org/transitclock/ipc/rmi/RmiCallInvocationHandler.java index c5f4f17a7..bb8bb15e3 100644 --- a/transitclock/src/main/java/org/transitclock/ipc/rmi/RmiCallInvocationHandler.java +++ b/transitclock/src/main/java/org/transitclock/ipc/rmi/RmiCallInvocationHandler.java @@ -72,7 +72,7 @@ private static class Counts { new ConcurrentHashMap(); private static IntegerConfigValue maxConcurrentCallsPerProjectConfig = new IntegerConfigValue( - "transitime.usage.maxRmiCalls", 100000, + "transitclock.usage.maxRmiCalls", 100000, "Maximum number of concurrent RMI calls to allow"); private static int maxConcurrentCallsPerProject = maxConcurrentCallsPerProjectConfig.getValue().intValue(); @@ -270,7 +270,7 @@ public Object invoke(Object proxy, Method method, Object[] args) + "Is the Java system property java.rmi.server.hostname " + "set to the proper host name? " + "Is the Java system " - + "property transitime.rmi.timeoutSec timeout time of " + + "property transitclock.rmi.timeoutSec timeout time of " + ClientFactory.getTimeoutSec() + " seconds adequate?"; logger.error(message); diff --git a/transitclock/src/main/java/org/transitclock/ipc/rmi/RmiStubInfo.java b/transitclock/src/main/java/org/transitclock/ipc/rmi/RmiStubInfo.java index 54591fd52..824597753 100644 --- a/transitclock/src/main/java/org/transitclock/ipc/rmi/RmiStubInfo.java +++ b/transitclock/src/main/java/org/transitclock/ipc/rmi/RmiStubInfo.java @@ -23,7 +23,7 @@ /** * Contains the info needed for creating an RMI stub, including the agency ID * and the agency host name. The hostname is obtained from the Java property - * transitime.rmi.rmiHost if set. Otherwise gets the host names from the + * transitclock.rmi.rmiHost if set. Otherwise gets the host names from the * WebAgency database. *

* This information exists on the client side. @@ -53,7 +53,7 @@ public String getClassName() { /** * Returns the RMI hostname. Will use command line parameter - * -Dtransitime.core.rmiHost if it is set. If not set then looks in + * -Dtransitclock.core.rmiHost if it is set. If not set then looks in * WebAgencies table in the web database. Returns null if not configured. * * @param rereadIfOlderThanMsecs @@ -84,7 +84,7 @@ private String getHostName(int rereadIfOlderThanMsecs) { /** * Returns the RMI hostname that is cached. Will not update the cache even * if agency not in cache and cache not updated for a long time. Will use - * command line parameter -Dtransitime.core.rmiHost if it is set. If not set + * command line parameter -Dtransitclock.core.rmiHost if it is set. If not set * then looks in cached version of WebAgencies table from the web database. * Returns null if agency not configured. * @@ -98,7 +98,7 @@ public String getHostName() { * Intended for when communication was working but now is not in that this * method will get updated hostname data from db if cache is somewhat old. * Returns the RMI hostname. Will use command line parameter - * -Dtransitime.core.rmiHost if it is set. If not set then looks in cached + * -Dtransitclock.core.rmiHost if it is set. If not set then looks in cached * version of WebAgencies table from the web database. If cached data is * more than 30 seconds old then will reread WebAgency data from db. Returns * null if agency not configured. diff --git a/transitclock/src/main/java/org/transitclock/ipc/rmi/package-info.java b/transitclock/src/main/java/org/transitclock/ipc/rmi/package-info.java index 679c6033b..02674e0c8 100644 --- a/transitclock/src/main/java/org/transitclock/ipc/rmi/package-info.java +++ b/transitclock/src/main/java/org/transitclock/ipc/rmi/package-info.java @@ -30,13 +30,13 @@ C:/Program Files/Java/jdk1.7.0_25/bin/rmiregistry.exe . With changes to the RMI system with version 1.7_20 of Java you need to specify the codebase if you run the rmiregistry manually. It would be started using something like: - /usr/lib/jvm/jre/bin/rmiregistry -J-Djava.rmi.server.codebase=file:/home/ec2-user/jars/transitime.jar 2099 & + /usr/lib/jvm/jre/bin/rmiregistry -J-Djava.rmi.server.codebase=file:/home/ec2-user/jars/transitclock.jar 2099 &

AbstractServer configures RMI to not use port 0, basically a random port, when establishing communication (the main port 2099 is used to establish communication but then communication is handed off to a separate port). Instead of using port 0 for actually sending commands to a server, RMI is configured to use a - special port via the Java property -Dtransitime.rmi.secondaryRmiPort. + special port via the Java property -Dtransitclock.rmi.secondaryRmiPort. The default value is 2098. In this way the firewalls for the servers can be configured to be open just for the ports that are actually used, which is much safer than having to completely @@ -44,7 +44,7 @@ establishing communication (the main port 2099 is used to establish communicatio secondary port for communication. This means that if you have multiple core systems running on a server only one can use the default secondary RMI port. The other core systems will need to have a different port specified by - -Dtransitime.rmi.secondaryRmiPort . + -Dtransitclock.rmi.secondaryRmiPort .

An important issue is that when running on AWS the RMI server needs to be run using Java property -Djava.rmi.server.hostname=PUBLIC_DOMAIN.amazonaws.com . diff --git a/transitclock/src/main/java/org/transitclock/maintenance/ArchiveOldFilesModule.java b/transitclock/src/main/java/org/transitclock/maintenance/ArchiveOldFilesModule.java index f3eaf12d3..5319a160c 100644 --- a/transitclock/src/main/java/org/transitclock/maintenance/ArchiveOldFilesModule.java +++ b/transitclock/src/main/java/org/transitclock/maintenance/ArchiveOldFilesModule.java @@ -41,27 +41,27 @@ public class ArchiveOldFilesModule extends Module { /******************** Parameters ************************************/ private static StringConfigValue timeToArchive = - new StringConfigValue("transitime.maintenance.timeToArchive", + new StringConfigValue("transitclock.maintenance.timeToArchive", "01:00:00", // 1 am "Specified time of day that should archive files. Should " + "usually be run in middle of night when load is less. " + "Time is in the format HH:MM:SS"); private static StringConfigValue awsRegion = - new StringConfigValue("transitime.maintenance.awsRegion", + new StringConfigValue("transitclock.maintenance.awsRegion", AwsGlacier.OREGON_REGION, "The region for Amazon AWS where files should be archive " + "to."); private static StringConfigValue logDirForInventoryFile = - new StringConfigValue("transitime.maintenance.logDirForInventoryFile", + new StringConfigValue("transitclock.maintenance.logDirForInventoryFile", "Directory where to write the inventory file that lists " + "the archiveIds and other info for the data written " + "to the specified vault. Should be something like " + "D:/Logs/mbta"); private static StringConfigValue logFileBaseDir = - new StringConfigValue("transitime.maintenance.logFileBaseDir", + new StringConfigValue("transitclock.maintenance.logFileBaseDir", "Where to find the log files. This part of the directory " + "name is not included in the file description for each " + "file in the archived zip file. This way the file names " @@ -70,39 +70,39 @@ public class ArchiveOldFilesModule extends Module { + "D:/Logs/mbta/core/2014/12/20."); private static StringConfigValue awsVaultName = - new StringConfigValue("transitime.maintenance.awsVaultName", + new StringConfigValue("transitclock.maintenance.awsVaultName", "For creating the vault name for archiving files to AWS " + "Glacier. Should contain the agency name such that will " + "be something like mbta-core"); private static StringConfigValue awsVaultName2 = - new StringConfigValue("transitime.maintenance.awsVaultName2", + new StringConfigValue("transitclock.maintenance.awsVaultName2", null, "For when making two separate archives. Can use two " + "archives if some files should be archived sooner " + "that others. Null means not using second archive."); private static StringConfigValue logFileSubDirectory = - new StringConfigValue("transitime.maintenance.logFileSubDir", + new StringConfigValue("transitclock.maintenance.logFileSubDir", "The subdirectory beyond the base directory. Specifies " + "where to find the log files to be archived. This part " + "of the file names is included in the file descriptions " + "in the zip file. Should be something like mbta/core"); private static StringConfigValue logFileSubDirectory2 = - new StringConfigValue("transitime.maintenance.logFileSubDir2", + new StringConfigValue("transitclock.maintenance.logFileSubDir2", null, "For when making two separate archives. Can use two " + "archives if some files should be archived sooner " + "that others. Null means not using second archive."); private static IntegerConfigValue daysTillFilesArchived = - new IntegerConfigValue("transitime.maintenance.daysTillFilesArchived", + new IntegerConfigValue("transitclock.maintenance.daysTillFilesArchived", 90, "How many days old files can be online before they are archived."); private static IntegerConfigValue daysTillFilesArchived2 = - new IntegerConfigValue("transitime.maintenance.daysTillFilesArchived2", + new IntegerConfigValue("transitclock.maintenance.daysTillFilesArchived2", 90, "For when making two separate archives. Can use two " + "archives if some files should be archived sooner " diff --git a/transitclock/src/main/java/org/transitclock/modules/package-info.java b/transitclock/src/main/java/org/transitclock/modules/package-info.java index 496597cc3..fc9fe2944 100644 --- a/transitclock/src/main/java/org/transitclock/modules/package-info.java +++ b/transitclock/src/main/java/org/transitclock/modules/package-info.java @@ -22,11 +22,11 @@ * For the core predictor application modules can be started simply * by configuring on the command line * which ones should be run by using the VM argument - * -Dtransitime.modules.optionalModulesList. Multiple modules can be specified + * -Dtransitclock.modules.optionalModulesList. Multiple modules can be specified * by separating them with a semicolon. For example, to use one module to * read AVL data and put it into JMS, and another module for reading the * AVL data from JMS and processing it could use something like: - * -Dtransitime.modules.optionalModulesList=org.transitclock.avl.MbtaNextBusAvlModule;org.transitclock.avl.AvlJmsClientModule + * -Dtransitclock.modules.optionalModulesList=org.transitclock.avl.MbtaNextBusAvlModule;org.transitclock.avl.AvlJmsClientModule * * @author SkiBu Smith * diff --git a/transitclock/src/main/java/org/transitclock/monitoring/AgencyMonitor.java b/transitclock/src/main/java/org/transitclock/monitoring/AgencyMonitor.java index 00a94d40b..78b6e2cd9 100644 --- a/transitclock/src/main/java/org/transitclock/monitoring/AgencyMonitor.java +++ b/transitclock/src/main/java/org/transitclock/monitoring/AgencyMonitor.java @@ -52,7 +52,7 @@ public class AgencyMonitor { private static final Logger logger = LoggerFactory .getLogger(AgencyMonitor.class); - private static final String enableSystemMonitoring = System.getProperty("transitime.enableSystemMonitoring"); + private static final String enableSystemMonitoring = System.getProperty("transitclock.enableSystemMonitoring"); /********************** Member Functions **************************/ diff --git a/transitclock/src/main/java/org/transitclock/monitoring/AvlFeedMonitor.java b/transitclock/src/main/java/org/transitclock/monitoring/AvlFeedMonitor.java index 50ac08872..ed7c4c1d5 100644 --- a/transitclock/src/main/java/org/transitclock/monitoring/AvlFeedMonitor.java +++ b/transitclock/src/main/java/org/transitclock/monitoring/AvlFeedMonitor.java @@ -44,15 +44,15 @@ public class AvlFeedMonitor extends MonitorBase { private static IntegerConfigValue allowableNoAvlSecs = new IntegerConfigValue( - "transitime.monitoring.allowableNoAvlSecs", + "transitclock.monitoring.allowableNoAvlSecs", 5 * Time.SEC_PER_MIN, "How long in seconds that can not receive valid AVL data " + "before monitoring triggers an alert."); private static StringConfigValue avlFeedEmailRecipients = new StringConfigValue( - "transitime.monitoring.avlFeedEmailRecipients", - "monitoring@transitime.org", + "transitclock.monitoring.avlFeedEmailRecipients", + "monitoring@transitclock.org", "Comma separated list of e-mail addresses indicating who " + "should be e-mail when monitor state changes for AVL " + "feed."); @@ -75,7 +75,7 @@ public AvlFeedMonitor(CloudwatchService cloudwatchService, EmailSender emailSend /** * Checks GPS time of last AVL report from the AVL feed. If it is recent, as - * specified by transitime.monitoring.allowableAvlFeedTimeNoDataSecs, then + * specified by transitclock.monitoring.allowableAvlFeedTimeNoDataSecs, then * this method returns 0. If no GPS data or the data is too old then returns * age of last AVL report in seconds. * @@ -147,7 +147,7 @@ protected String type() { /** * Returns comma separated list of who should be notified via e-mail when * trigger state changes for the monitor. Specified by the Java property - * transitime.monitoring.emailRecipients . Can be overwritten by an + * transitclock.monitoring.emailRecipients . Can be overwritten by an * implementation of a monitor if want different list for a monitor. * * @return E-mail addresses of who to notify diff --git a/transitclock/src/main/java/org/transitclock/monitoring/CloudwatchService.java b/transitclock/src/main/java/org/transitclock/monitoring/CloudwatchService.java index a09277942..834b07411 100644 --- a/transitclock/src/main/java/org/transitclock/monitoring/CloudwatchService.java +++ b/transitclock/src/main/java/org/transitclock/monitoring/CloudwatchService.java @@ -18,10 +18,10 @@ * Created by dbenoff on 10/6/15. */ public class CloudwatchService { - private String environmentName = System.getProperty("transitime.environmentName"); - private String accessKey = System.getProperty("transitime.cloudwatch.awsAccessKey"); - private String secretKey = System.getProperty("transitime.cloudwatch.awsSecretKey"); - private String endpoint = System.getProperty("transitime.cloudwatch.awsEndpoint"); + private String environmentName = System.getProperty("transitclock.environmentName"); + private String accessKey = System.getProperty("transitclock.cloudwatch.awsAccessKey"); + private String secretKey = System.getProperty("transitclock.cloudwatch.awsSecretKey"); + private String endpoint = System.getProperty("transitclock.cloudwatch.awsEndpoint"); private AmazonCloudWatchClient cloudWatch; private Map metricMap = new ConcurrentHashMap<>(); private ScheduledExecutorService executor; diff --git a/transitclock/src/main/java/org/transitclock/monitoring/DatabaseQueueMonitor.java b/transitclock/src/main/java/org/transitclock/monitoring/DatabaseQueueMonitor.java index 39319edb0..54dd8af38 100644 --- a/transitclock/src/main/java/org/transitclock/monitoring/DatabaseQueueMonitor.java +++ b/transitclock/src/main/java/org/transitclock/monitoring/DatabaseQueueMonitor.java @@ -35,14 +35,14 @@ public class DatabaseQueueMonitor extends MonitorBase { private CloudwatchService cloudwatchService; DoubleConfigValue maxQueueFraction = new DoubleConfigValue( - "transitime.monitoring.maxQueueFraction", + "transitclock.monitoring.maxQueueFraction", 0.4, "If database queue fills up by more than this 0.0 - 1.0 " + "fraction then database monitoring is triggered."); private static DoubleConfigValue maxQueueFractionGap = new DoubleConfigValue( - "transitime.monitoring.maxQueueFractionGap", + "transitclock.monitoring.maxQueueFractionGap", 0.1, "When transitioning from triggered to untriggered don't " + "want to send out an e-mail right away if actually " diff --git a/transitclock/src/main/java/org/transitclock/monitoring/MonitorBase.java b/transitclock/src/main/java/org/transitclock/monitoring/MonitorBase.java index 219fc3aa1..9b7decd5e 100644 --- a/transitclock/src/main/java/org/transitclock/monitoring/MonitorBase.java +++ b/transitclock/src/main/java/org/transitclock/monitoring/MonitorBase.java @@ -57,13 +57,13 @@ public abstract class MonitorBase { private static StringConfigValue emailRecipients = new StringConfigValue( - "transitime.monitoring.emailRecipients", + "transitclock.monitoring.emailRecipients", "Comma separated list of e-mail addresses indicating who " + "should be e-mailed when monitor state changes."); private static IntegerConfigValue retryTimeoutSecs = new IntegerConfigValue( - "transitime.monitoring.retryTimeoutSecs", + "transitclock.monitoring.retryTimeoutSecs", 5, "How long in seconds system should wait before rexamining " + "monitor. This way a short lived outage can be ignored. " @@ -153,7 +153,7 @@ agencyId, type(), isTriggered, wasTriggered, message, emailSender.send(recipients(), subject, message); } else { logger.error("Could not send ERROR e-mail because " - + "transitime.monitoring.emailRecipients Java property " + + "transitclock.monitoring.emailRecipients Java property " + "not set"); } } else if (wasTriggered && !isTriggered) { @@ -168,7 +168,7 @@ agencyId, type(), isTriggered, wasTriggered, message, emailSender.send(recipients(), subject, message); } else { logger.error("Could not send ERROR e-mail because " - + "transitime.monitoring.emailRecipients Java property " + + "transitclock.monitoring.emailRecipients Java property " + "not set"); } } @@ -273,7 +273,7 @@ protected boolean acceptableEvenIfTriggered() { /** * Returns comma separated list of who should be notified via e-mail when * trigger state changes for the monitor. Specified by the Java property - * transitime.monitoring.emailRecipients . Can be overwritten by an + * transitclock.monitoring.emailRecipients . Can be overwritten by an * implementation of a monitor if want different list for a monitor. * * @return E-mail addresses of who to notify @@ -285,7 +285,7 @@ protected String recipients() { /** * Returns comma separated list of who should be notified via e-mail when * trigger state changes for the monitor. Specified by the Java property - * transitime.monitoring.emailRecipients . A static class so cannot be + * transitclock.monitoring.emailRecipients . A static class so cannot be * overwritten. * * @return E-mail addresses of who to notify diff --git a/transitclock/src/main/java/org/transitclock/monitoring/MonitoringModule.java b/transitclock/src/main/java/org/transitclock/monitoring/MonitoringModule.java index fc3735757..cc0f72b52 100644 --- a/transitclock/src/main/java/org/transitclock/monitoring/MonitoringModule.java +++ b/transitclock/src/main/java/org/transitclock/monitoring/MonitoringModule.java @@ -32,7 +32,7 @@ * AgencyMonitor is used notification e-mails are automatically sent. *

* To use with a core project use: - * -Dtransitime.modules.optionalModulesList=org.transitclock.monitor.MonitoringModule + * -Dtransitclock.modules.optionalModulesList=org.transitclock.monitor.MonitoringModule * * @author SkiBu Smith * @@ -41,7 +41,7 @@ public class MonitoringModule extends Module { private static IntegerConfigValue secondsBetweenMonitorinPolling = new IntegerConfigValue( - "transitime.monitoring.secondsBetweenMonitorinPolling", + "transitclock.monitoring.secondsBetweenMonitorinPolling", 120, "How frequently an monitoring should be run to look for " + "problems."); diff --git a/transitclock/src/main/java/org/transitclock/monitoring/PredictabilityMonitor.java b/transitclock/src/main/java/org/transitclock/monitoring/PredictabilityMonitor.java index a72e51e98..21a935a84 100644 --- a/transitclock/src/main/java/org/transitclock/monitoring/PredictabilityMonitor.java +++ b/transitclock/src/main/java/org/transitclock/monitoring/PredictabilityMonitor.java @@ -46,14 +46,14 @@ public class PredictabilityMonitor extends MonitorBase { private static DoubleConfigValue minPredictableBlocks = new DoubleConfigValue( - "transitime.monitoring.minPredictableBlocks", + "transitclock.monitoring.minPredictableBlocks", 0.50, "The minimum fraction of currently active blocks that " + "should have a predictable vehicle"); private static DoubleConfigValue minPredictableBlocksGap = new DoubleConfigValue( - "transitime.monitoring.minPredictableBlocksGap", + "transitclock.monitoring.minPredictableBlocksGap", 0.25, "When transitioning from triggered to untriggered don't " + "want to send out an e-mail right away if actually " @@ -63,7 +63,7 @@ public class PredictabilityMonitor extends MonitorBase { private static IntegerConfigValue minimumPredictableVehicles = new IntegerConfigValue( - "transitime.monitoring.minimumPredictableVehicles", + "transitclock.monitoring.minimumPredictableVehicles", 3, "When looking at small number of vehicles it is too easy " + "to get below minimumPredictableBlocks. So number of " diff --git a/transitclock/src/main/java/org/transitclock/monitoring/SystemCpuMonitor.java b/transitclock/src/main/java/org/transitclock/monitoring/SystemCpuMonitor.java index f0a6dafb9..66821c083 100644 --- a/transitclock/src/main/java/org/transitclock/monitoring/SystemCpuMonitor.java +++ b/transitclock/src/main/java/org/transitclock/monitoring/SystemCpuMonitor.java @@ -36,14 +36,14 @@ public class SystemCpuMonitor extends MonitorBase { DoubleConfigValue cpuThreshold = new DoubleConfigValue( - "transitime.monitoring.cpuThreshold", + "transitclock.monitoring.cpuThreshold", 0.99, "If CPU load averaged over a minute exceeds this 0.0 - 1.0 " + "value then CPU monitoring is triggered."); private static DoubleConfigValue cpuThresholdGap = new DoubleConfigValue( - "transitime.monitoring.cpuThresholdGap", + "transitclock.monitoring.cpuThresholdGap", 0.1, "When transitioning from triggered to untriggered don't " + "want to send out an e-mail right away if actually " diff --git a/transitclock/src/main/java/org/transitclock/monitoring/SystemDiskSpaceMonitor.java b/transitclock/src/main/java/org/transitclock/monitoring/SystemDiskSpaceMonitor.java index d73a6a544..477f520f5 100644 --- a/transitclock/src/main/java/org/transitclock/monitoring/SystemDiskSpaceMonitor.java +++ b/transitclock/src/main/java/org/transitclock/monitoring/SystemDiskSpaceMonitor.java @@ -32,14 +32,14 @@ public class SystemDiskSpaceMonitor extends MonitorBase { private LongConfigValue usableDiskSpaceThreshold = new LongConfigValue( - "transitime.monitoring.usableDiskSpaceThreshold", + "transitclock.monitoring.usableDiskSpaceThreshold", 1024 * 1024 * 1024L, // ~1 GB "If usable disk space is less than this " + "value then file space monitoring is triggered."); private static LongConfigValue usableDiskSpaceThresholdGap = new LongConfigValue( - "transitime.monitoring.usableDiskSpaceThresholdGap", + "transitclock.monitoring.usableDiskSpaceThresholdGap", 100 * 1024 * 1024L, // ~100 MB "When transitioning from triggered to untriggered don't " + "want to send out an e-mail right away if actually " diff --git a/transitclock/src/main/java/org/transitclock/monitoring/SystemMemoryMonitor.java b/transitclock/src/main/java/org/transitclock/monitoring/SystemMemoryMonitor.java index bfa39c655..10f1b189a 100644 --- a/transitclock/src/main/java/org/transitclock/monitoring/SystemMemoryMonitor.java +++ b/transitclock/src/main/java/org/transitclock/monitoring/SystemMemoryMonitor.java @@ -41,7 +41,7 @@ public class SystemMemoryMonitor extends MonitorBase { LongConfigValue availableFreePhysicalMemoryThreshold = new LongConfigValue( - "transitime.monitoring.availableFreePhysicalMemoryThreshold", + "transitclock.monitoring.availableFreePhysicalMemoryThreshold", 10 * 1024 * 1024L, // ~10 MB "If available free physical memory is less than this " + "value then free memory monitoring is triggered. This should be " @@ -52,7 +52,7 @@ public class SystemMemoryMonitor extends MonitorBase { private static LongConfigValue availableFreePhysicalMemoryThresholdGap = new LongConfigValue( - "transitime.monitoring.availableFreePhysicalMemoryThresholdGap", + "transitclock.monitoring.availableFreePhysicalMemoryThresholdGap", 150 * 1024 * 1024L, // ~150 MB "When transitioning from triggered to untriggered don't " + "want to send out an e-mail right away if actually " diff --git a/transitclock/src/main/java/org/transitclock/utils/EmailSender.java b/transitclock/src/main/java/org/transitclock/utils/EmailSender.java index 4273ff200..9fff85722 100644 --- a/transitclock/src/main/java/org/transitclock/utils/EmailSender.java +++ b/transitclock/src/main/java/org/transitclock/utils/EmailSender.java @@ -41,7 +41,7 @@ /** * For programmatically sending out an e-mail. Uses a file specified by - * Java property transitime.utils.emailConfigFile to configure parameters. + * Java property transitclock.utils.emailConfigFile to configure parameters. * * @author SkiBu Smith * @@ -55,7 +55,7 @@ public class EmailSender { /********************** Parameters ********************************/ private static StringConfigValue emailConfigFile = - new StringConfigValue("transitime.utils.emailConfigFile", + new StringConfigValue("transitclock.utils.emailConfigFile", "/home/ec2-user/transitimeScripts/emailConfig.txt", "Specifies name of configuration file used for sending " + "out e-mails."); @@ -154,7 +154,7 @@ public void send(String recipients, String subject, String messageBody) { */ public static void main(String[] args) { EmailSender email = new EmailSender(); - email.send("monitoring@transitime.org", "test subject", "test message"); + email.send("monitoring@transitclock.org", "test subject", "test message"); } } diff --git a/transitclock/src/main/java/org/transitclock/utils/Encryption.java b/transitclock/src/main/java/org/transitclock/utils/Encryption.java index 27790dd10..03a82a138 100644 --- a/transitclock/src/main/java/org/transitclock/utils/Encryption.java +++ b/transitclock/src/main/java/org/transitclock/utils/Encryption.java @@ -33,7 +33,7 @@ public class Encryption { private static final StringConfigValue encryptionPassword = - new StringConfigValue("transitime.db.encryptionPassword", + new StringConfigValue("transitclock.db.encryptionPassword", "SET THIS!", "Used for encrypting, deencrypting passwords for storage " + "in a database. This value should be customized for each " diff --git a/transitclock/src/main/java/org/transitclock/utils/TimeZoneSetter.java b/transitclock/src/main/java/org/transitclock/utils/TimeZoneSetter.java index 432762ad9..e63cbe1e0 100644 --- a/transitclock/src/main/java/org/transitclock/utils/TimeZoneSetter.java +++ b/transitclock/src/main/java/org/transitclock/utils/TimeZoneSetter.java @@ -33,7 +33,7 @@ public static String getTimezone() { return timezone.getValue(); } private static StringConfigValue timezone = - new StringConfigValue("transitime.core.timezone", + new StringConfigValue("transitclock.core.timezone", "For setting timezone for application. Ideally would get " + "timezone from the agency db but once a Hibernate " + "session factory is created, such as for reading " @@ -43,7 +43,7 @@ public static String getTimezone() { /** * For setting timezone for application to name specified by the Java - * property transitime.core.timezone. Ideally would get timezone from the + * property transitclock.core.timezone. Ideally would get timezone from the * agency db but once a Hibernate session factory is created, such as for * reading timezone from db, then it is too late to set the timezone. * Therefore this provides ability to set it manually. diff --git a/transitclock/src/main/java/org/transitclock/web/WebConfigParams.java b/transitclock/src/main/java/org/transitclock/web/WebConfigParams.java index 1936fdd8f..6817e4bee 100644 --- a/transitclock/src/main/java/org/transitclock/web/WebConfigParams.java +++ b/transitclock/src/main/java/org/transitclock/web/WebConfigParams.java @@ -30,7 +30,7 @@ public static String getMapTileUrl() { return mapTileUrl.getValue(); } private static StringConfigValue mapTileUrl = - new StringConfigValue("transitime.web.mapTileUrl", + new StringConfigValue("transitclock.web.mapTileUrl", "http://otile4.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png", "Specifies the URL used by Leaflet maps to fetch map " + "tiles."); @@ -39,7 +39,7 @@ public static String getMapTileCopyright() { return mapTileCopyright.getValue(); } private static StringConfigValue mapTileCopyright = - new StringConfigValue("transitime.web.mapTileCopyright", + new StringConfigValue("transitclock.web.mapTileCopyright", "MapQuest", "For displaying as map attributing for the where map tiles " + "from."); diff --git a/transitclock/src/main/resources/logback.xml b/transitclock/src/main/resources/logback.xml index 5928ba973..ac0762f1a 100755 --- a/transitclock/src/main/resources/logback.xml +++ b/transitclock/src/main/resources/logback.xml @@ -8,13 +8,13 @@ automatically reloaded if needed and take effect every 30 seconds. --> - + value="${transitclock.logging.dir:-/Logs}/${transitclock.core.agencyId:-DEFAULT}/core/%d{yyyy/MM/dd}" /> + value="${transitclock.logging.dir:-/Logs}/${transitclock.core.agencyId:-DEFAULT}/core/%d{yyyy/MM/dd}" /> + value="${transitclock.logging.dir:-/Logs}/${transitclock.core.agencyId:-DEFAULT}/core/%d{yyyy/MM/dd}" /> diff --git a/transitclock/src/main/resources/logbackGtfsWithSql.xml b/transitclock/src/main/resources/logbackGtfsWithSql.xml index 748fdfcd7..f224a6102 100644 --- a/transitclock/src/main/resources/logbackGtfsWithSql.xml +++ b/transitclock/src/main/resources/logbackGtfsWithSql.xml @@ -13,7 +13,7 @@ + value="${transitclock.logging.dir:-/Logs}/${transitclock.core.agencyId:-DEFAULT}/gtfsConfig/" /> diff --git a/transitclock/src/main/resources/logbackPlayback.xml b/transitclock/src/main/resources/logbackPlayback.xml index 98ab4f211..4127a8e4e 100644 --- a/transitclock/src/main/resources/logbackPlayback.xml +++ b/transitclock/src/main/resources/logbackPlayback.xml @@ -11,7 +11,7 @@ + value="${transitclock.logging.dir:-/Logs}/${transitclock.core.agencyId:-DEFAULT}/core/%d{yyyy/MM/dd}" /> + value="${transitclock.logging.dir:-/Logs}/tomcat/%d{yyyy/MM/dd}" /> - - org.hibernate.dialect.MySQLDialect - - - com.mysql.jdbc.Driver - - - - - true - true - - - - - - - 25 - - - - - - - - - diff --git a/transitclockApi/src/main/resources/postgres_hibernate.cfg.xml b/transitclockApi/src/main/resources/postgres_hibernate.cfg.xml deleted file mode 100644 index 60959a506..000000000 --- a/transitclockApi/src/main/resources/postgres_hibernate.cfg.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - org.hibernate.dialect.PostgreSQLDialect - - - org.postgresql.Driver - - - - - true - true - - - - 2 - - 20 - - 300 - - 50 - - - 25 - - - - - - - - - diff --git a/transitclockIntegration/pom.xml b/transitclockIntegration/pom.xml index 07d15245d..29f5c9bd6 100644 --- a/transitclockIntegration/pom.xml +++ b/transitclockIntegration/pom.xml @@ -68,7 +68,7 @@ 2.19.1 - -Dtransitime.logging.dir="/tmp" + -Dtransitclock.logging.dir="/tmp" false diff --git a/transitclockIntegration/src/main/java/org/transitclock/playback/PlaybackModule.java b/transitclockIntegration/src/main/java/org/transitclock/playback/PlaybackModule.java index 2321ee80f..7ba9b01be 100644 --- a/transitclockIntegration/src/main/java/org/transitclock/playback/PlaybackModule.java +++ b/transitclockIntegration/src/main/java/org/transitclock/playback/PlaybackModule.java @@ -77,9 +77,9 @@ public static void main(String[] args) { } public static void runTrace(String gtfsDirectoryName, String avlReportsCsv, boolean addPredictionAccuracy, boolean log, AvlPostProcessor processor) { - System.setProperty("transitime.avl.csvAvlFeedFileName", avlReportsCsv); - System.setProperty("transitime.configFiles", transitimeConfigFile); - System.setProperty("transitime.core.agencyId", agencyId); + System.setProperty("transitclock.avl.csvAvlFeedFileName", avlReportsCsv); + System.setProperty("transitclock.configFiles", transitimeConfigFile); + System.setProperty("transitclock.core.agencyId", agencyId); ConfigFileReader.processConfig(); diff --git a/transitclockIntegration/src/test/java/org/transitime/integration_tests/EffectiveScheduleDifferenceDuringLayoverTest.java b/transitclockIntegration/src/test/java/org/transitime/integration_tests/EffectiveScheduleDifferenceDuringLayoverTest.java index 6a9e0bcb5..485be04c3 100644 --- a/transitclockIntegration/src/test/java/org/transitime/integration_tests/EffectiveScheduleDifferenceDuringLayoverTest.java +++ b/transitclockIntegration/src/test/java/org/transitime/integration_tests/EffectiveScheduleDifferenceDuringLayoverTest.java @@ -1,4 +1,4 @@ -package org.transitime.integration_tests; +package org.transitclock.integration_tests; import org.junit.Test; import org.slf4j.Logger; diff --git a/transitclockIntegration/src/test/java/org/transitime/integration_tests/GenerateEffectiveScheduleDifferenceTest.java b/transitclockIntegration/src/test/java/org/transitime/integration_tests/GenerateEffectiveScheduleDifferenceTest.java index 662fe867d..3fc415b36 100644 --- a/transitclockIntegration/src/test/java/org/transitime/integration_tests/GenerateEffectiveScheduleDifferenceTest.java +++ b/transitclockIntegration/src/test/java/org/transitime/integration_tests/GenerateEffectiveScheduleDifferenceTest.java @@ -1,4 +1,4 @@ -package org.transitime.integration_tests; +package org.transitclock.integration_tests; import org.junit.Test; import org.slf4j.Logger; diff --git a/transitclockIntegration/src/test/java/org/transitime/integration_tests/RecoverFromDetourTest.java b/transitclockIntegration/src/test/java/org/transitime/integration_tests/RecoverFromDetourTest.java index 5a2303ba5..5a97ed3e4 100644 --- a/transitclockIntegration/src/test/java/org/transitime/integration_tests/RecoverFromDetourTest.java +++ b/transitclockIntegration/src/test/java/org/transitime/integration_tests/RecoverFromDetourTest.java @@ -1,4 +1,4 @@ -package org.transitime.integration_tests; +package org.transitclock.integration_tests; import org.junit.Test; import org.transitclock.core.dataCache.VehicleDataCache; diff --git a/transitclockIntegration/src/test/java/org/transitime/integration_tests/prediction/PredictionAccuracyIntegrationTest.java b/transitclockIntegration/src/test/java/org/transitime/integration_tests/prediction/PredictionAccuracyIntegrationTest.java index 4141ba14a..a193e0d49 100644 --- a/transitclockIntegration/src/test/java/org/transitime/integration_tests/prediction/PredictionAccuracyIntegrationTest.java +++ b/transitclockIntegration/src/test/java/org/transitime/integration_tests/prediction/PredictionAccuracyIntegrationTest.java @@ -1,4 +1,4 @@ -package org.transitime.integration_tests.prediction; +package org.transitclock.integration_tests.prediction; import junit.framework.TestCase; import org.apache.commons.csv.CSVFormat; diff --git a/transitclockQuickStart/src/main/java/org/transitclock/gui/InputPanel.java b/transitclockQuickStart/src/main/java/org/transitclock/gui/InputPanel.java index 8d53860aa..1b60ca6fc 100644 --- a/transitclockQuickStart/src/main/java/org/transitclock/gui/InputPanel.java +++ b/transitclockQuickStart/src/main/java/org/transitclock/gui/InputPanel.java @@ -227,7 +227,7 @@ public void actionPerformed(ActionEvent e) { // uses current directory if one none specified by user. loglocation = System.getProperty("user.dir"); } - System.getProperties().setProperty("transitime.logging.dir", loglocation); + System.getProperties().setProperty("transitclock.logging.dir", loglocation); // Creates a thread which calls all the methods of the transitimeQuickStart TransitimeQuickStartThread quickstartthread = new TransitimeQuickStartThread(); diff --git a/transitclockQuickStart/src/main/java/org/transitclock/gui/OutputPanel.java b/transitclockQuickStart/src/main/java/org/transitclock/gui/OutputPanel.java index 956e386cb..4eac7d70e 100644 --- a/transitclockQuickStart/src/main/java/org/transitclock/gui/OutputPanel.java +++ b/transitclockQuickStart/src/main/java/org/transitclock/gui/OutputPanel.java @@ -92,7 +92,7 @@ private void initialize() { textField = new JTextField(); textField.setColumns(10); //gets the agencyid - agencyid=System.getProperties().getProperty("transitime.core.agencyId"); + agencyid=System.getProperties().getProperty("transitclock.core.agencyId"); textField.setText("http://127.0.0.1:8080/api/v1/key/"+apiKey+"/agency/"+agencyid+"/command/gtfs-rt/tripUpdates"); JLabel lblVechiclePositionsUrl = new JLabel("Vechicle Positions URL"); diff --git a/transitclockQuickStart/src/main/java/org/transitclock/gui/TransitimeQuickStart.java b/transitclockQuickStart/src/main/java/org/transitclock/gui/TransitimeQuickStart.java index da02847ab..cc150f8c4 100644 --- a/transitclockQuickStart/src/main/java/org/transitclock/gui/TransitimeQuickStart.java +++ b/transitclockQuickStart/src/main/java/org/transitclock/gui/TransitimeQuickStart.java @@ -79,7 +79,7 @@ public static void main(String args[]) { public void extractResources() throws QuickStartException { try { ExtractResource.extractResourceNIO(TransitimeQuickStart.class.getClassLoader(), "hibernate.cfg.xml"); - ExtractResource.extractResourceNIO(TransitimeQuickStart.class.getClassLoader(), "transitime.properties"); + ExtractResource.extractResourceNIO(TransitimeQuickStart.class.getClassLoader(), "transitclock.properties"); ExtractResource.extractResourceNIO(TransitimeQuickStart.class.getClassLoader(), "api.war"); ExtractResource.extractResourceNIO(TransitimeQuickStart.class.getClassLoader(), "web.war"); } catch (Exception e) { @@ -148,7 +148,7 @@ public void createApiKey() throws QuickStartException { ConfigFileReader.processConfig(); String name = "Joe bloggs"; - String url = "http://www.transitime.org"; + String url = "http://www.transitclock.org"; String email = "foo@default.com"; String phone = "123456789"; String description = "Foo"; @@ -179,13 +179,13 @@ public void startCore(String realtimefeedURL, String loglocation) throws QuickSt try { ConfigFileReader.processConfig(); // TODO set the agency id by getting it from the gtfs file. - String agencyid = System.getProperties().getProperty("transitime.core.agencyId"); - System.getProperties().setProperty("transitime.core.configRevStr", "0"); + String agencyid = System.getProperties().getProperty("transitclock.core.agencyId"); + System.getProperties().setProperty("transitclock.core.configRevStr", "0"); // uses default if nothing entered // only set the paramater for realtimeURLfeed if specified by user if (!realtimefeedURL.equals("")) { - System.getProperties().setProperty("transitime.avl.url", realtimefeedURL); + System.getProperties().setProperty("transitclock.avl.url", realtimefeedURL); } // Initialize the core now @@ -193,7 +193,7 @@ public void startCore(String realtimefeedURL, String loglocation) throws QuickSt List optionalModuleNames = CoreConfig.getOptionalModules(); if (optionalModuleNames.size() > 0) logger.info("Starting up optional modules specified via " - + "transitime.modules.optionalModulesList param:"); + + "transitclock.modules.optionalModulesList param:"); else logger.info("No optional modules to start up."); for (String moduleName : optionalModuleNames) { @@ -293,7 +293,7 @@ public void addWebapp() throws QuickStartException { ".*/[^/]*servlet-api-[^/]*\\.jar$|.*/javax.servlet.jsp.jstl-.*\\.jar$|.*/[^/]*taglibs.*\\.jar$"); webapp.setOverrideDescriptor("override-web.xml"); - System.setProperty("transitime.apikey", apiKey.getKey()); + System.setProperty("transitclock.apikey", apiKey.getKey()); // server.join(); logger.info("add Webapp successful"); } catch (Exception e) { @@ -334,7 +334,7 @@ public void webAgency() throws QuickStartException { */ try { // TODO have this set up right,right values for variables - String agencyId = System.getProperties().getProperty("transitime.core.agencyId"); + String agencyId = System.getProperties().getProperty("transitclock.core.agencyId"); String hostName = "127.0.0.1"; boolean active = true; String dbName = "02"; diff --git a/transitclockQuickStart/src/main/resources/logback.xml b/transitclockQuickStart/src/main/resources/logback.xml index 722ff1ee3..1e6922b07 100644 --- a/transitclockQuickStart/src/main/resources/logback.xml +++ b/transitclockQuickStart/src/main/resources/logback.xml @@ -11,14 +11,14 @@ + value="${transitclock.logging.dir:-/Logs}/${transitclock.core.agencyId:-DEFAULT}/core/%d{yyyy/MM/dd}" /> - - org.hibernate.dialect.PostgreSQLDialect - - - org.postgresql.Driver - - - - - true - true - - - - 2 - - 20 - - 300 - - 50 - - - 25 - - - - - jdbc:mysql://localhost/transitime - - - root - - - changeme - - - - - - - - diff --git a/transitclockWebapp/src/main/resources/logbackTomcat.xml b/transitclockWebapp/src/main/resources/logbackTomcat.xml index 2174e276e..2498bf3cc 100644 --- a/transitclockWebapp/src/main/resources/logbackTomcat.xml +++ b/transitclockWebapp/src/main/resources/logbackTomcat.xml @@ -7,14 +7,14 @@ + value="${transitclock.logging.dir:-/Logs}/tomcat/%d{yyyy/MM/dd}" /> - - org.hibernate.dialect.MySQLDialect - - - com.mysql.jdbc.Driver - - - - - true - true - - - - - - - 25 - - - - - jdbc:mysql://localhost/transitime - - - root - - - changeme - - - - - - - - diff --git a/transitclockWebapp/src/main/resources/postgres_hibernate.cfg.xml b/transitclockWebapp/src/main/resources/postgres_hibernate.cfg.xml deleted file mode 100644 index c9f4056f2..000000000 --- a/transitclockWebapp/src/main/resources/postgres_hibernate.cfg.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - org.hibernate.dialect.PostgreSQLDialect - - - org.postgresql.Driver - - - - true - true - true - - - - 2 - - 20 - - 300 - - 50 - - - 25 - - - - - - - - - diff --git a/transitclockWebapp/src/main/resources/transiTimeConfig.xml b/transitclockWebapp/src/main/resources/transiTimeConfig.xml deleted file mode 100755 index e883ddd27..000000000 --- a/transitclockWebapp/src/main/resources/transiTimeConfig.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - org.transitclock.avl.PlaybackModule --> - - - - 4560595:6 - - - - true - false - 600 - 600 - - - - org.transitclock.core.predictiongenerator.average.frequency.HistoricalAveragePredictionGeneratorImpl - org.transitclock.core.headwaygenerator.LastArrivalsHeadwayGenerator - 100 - true - true - - false - 4800 - 25 - 25 - 25 - 15 - 0 - 0 - - 10800 - - true - - - 30 - - 10 - - atlanta-sc - - 02-01-2017 09:00:00 - 02-03-2017 21:00:00 - 1003 - 20 - - - 0 - - - - atlanta-sc - 127.0.0.1:5432 - postgresql - postgres - w1e2l3 - - - true - - - C:/Users/ogcrudden/core/transitimeWebapp/src/main/resources/postgres_hibernate.cfg.xml - - http://tile.openstreetmap.org/{z}/{x}/{y}.png - - false - - - diff --git a/transitclockWebapp/src/main/webapp/template/includes.jsp b/transitclockWebapp/src/main/webapp/template/includes.jsp index 91c3b4b2e..eab79cbc0 100644 --- a/transitclockWebapp/src/main/webapp/template/includes.jsp +++ b/transitclockWebapp/src/main/webapp/template/includes.jsp @@ -15,7 +15,7 @@