aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorcedricnjanga2017-09-19 15:22:55 +0200
committercedricnjanga2017-09-19 15:27:58 +0200
commit5ffc337dfc86017840a5402058d490fd20d29bf4 (patch)
treedbe6f7290ea86baacec1c49033d0e16ac6db9606 /app
parentfaa11cd4dcde1fafb92c5b5a99be4d3fe356e8f0 (diff)
downloadchouette-core-5ffc337dfc86017840a5402058d490fd20d29bf4.tar.bz2
Add the rest of the other compliance control models
Diffstat (limited to 'app')
-rw-r--r--app/models/journey_pattern_control/duplicates.rb13
-rw-r--r--app/models/route_control/duplicates.rb1
-rw-r--r--app/models/route_control/speed.rb15
-rw-r--r--app/models/route_control/time_table.rb13
-rw-r--r--app/models/route_control/vehicle_journey_at_stops.rb13
-rw-r--r--app/models/routing_constaint_zone_control/unactivated_stop_point.rb13
-rw-r--r--app/models/vechicle_journey_control/delta.rb15
-rw-r--r--app/models/vechicle_journey_control/waiting_time.rb13
8 files changed, 95 insertions, 1 deletions
diff --git a/app/models/journey_pattern_control/duplicates.rb b/app/models/journey_pattern_control/duplicates.rb
new file mode 100644
index 000000000..78ca07e90
--- /dev/null
+++ b/app/models/journey_pattern_control/duplicates.rb
@@ -0,0 +1,13 @@
+module JourneyPatternControl
+ class Duplicates < ComplianceControl
+
+ @@default_criticity = :warning
+ @@default_code = "3-JourneyPattern-1"
+
+ after_initialize do
+ self.name = self.class.name
+ self.code = @@default_code
+ self.criticity = @@default_criticity
+ end
+ end
+end
diff --git a/app/models/route_control/duplicates.rb b/app/models/route_control/duplicates.rb
index 803ac063e..379d7cf98 100644
--- a/app/models/route_control/duplicates.rb
+++ b/app/models/route_control/duplicates.rb
@@ -9,6 +9,5 @@ module RouteControl
self.code = @@default_code
self.criticity = @@default_criticity
end
-
end
end
diff --git a/app/models/route_control/speed.rb b/app/models/route_control/speed.rb
new file mode 100644
index 000000000..fb07b5c87
--- /dev/null
+++ b/app/models/route_control/speed.rb
@@ -0,0 +1,15 @@
+module VehicleJourneyControl
+ class Speed < ComplianceControl
+
+ hstore_accessor :control_attributes, minimum: :integer, maximum: :integer
+
+ @@default_criticity = :warning
+ @@default_code = "3-VehicleJourney-2"
+
+ after_initialize do
+ self.name = self.class.name
+ self.code = @@default_code
+ self.criticity = @@default_criticity
+ end
+ end
+end
diff --git a/app/models/route_control/time_table.rb b/app/models/route_control/time_table.rb
new file mode 100644
index 000000000..911807ba9
--- /dev/null
+++ b/app/models/route_control/time_table.rb
@@ -0,0 +1,13 @@
+module VehicleJourneyControl
+ class TimeTable < ComplianceControl
+
+ @@default_criticity = :error
+ @@default_code = "3-VehicleJourney-4"
+
+ after_initialize do
+ self.name = self.class.name
+ self.code = @@default_code
+ self.criticity = @@default_criticity
+ end
+ end
+end
diff --git a/app/models/route_control/vehicle_journey_at_stops.rb b/app/models/route_control/vehicle_journey_at_stops.rb
new file mode 100644
index 000000000..02a43fb10
--- /dev/null
+++ b/app/models/route_control/vehicle_journey_at_stops.rb
@@ -0,0 +1,13 @@
+module VehicleJourneyControl
+ class VehicleJourneyAtStops < ComplianceControl
+
+ @@default_criticity = :error
+ @@default_code = "3-VehicleJourney-5"
+
+ after_initialize do
+ self.name = self.class.name
+ self.code = @@default_code
+ self.criticity = @@default_criticity
+ end
+ end
+end
diff --git a/app/models/routing_constaint_zone_control/unactivated_stop_point.rb b/app/models/routing_constaint_zone_control/unactivated_stop_point.rb
new file mode 100644
index 000000000..92a1d1a58
--- /dev/null
+++ b/app/models/routing_constaint_zone_control/unactivated_stop_point.rb
@@ -0,0 +1,13 @@
+module RoutingConstaintZoneControl
+ class UnactivatedStopPoint < ComplianceControl
+
+ @@default_criticity = :warning
+ @@default_code = "3-ITL-1"
+
+ after_initialize do
+ self.name = self.class.name
+ self.code = @@default_code
+ self.criticity = @@default_criticity
+ end
+ end
+end
diff --git a/app/models/vechicle_journey_control/delta.rb b/app/models/vechicle_journey_control/delta.rb
new file mode 100644
index 000000000..d4e1e6eca
--- /dev/null
+++ b/app/models/vechicle_journey_control/delta.rb
@@ -0,0 +1,15 @@
+module VehicleJourneyControl
+ class Delta < ComplianceControl
+
+ hstore_accessor :control_attributes, delta: :integer
+
+ @@default_criticity = :warning
+ @@default_code = "3-VehicleJourney-3"
+
+ after_initialize do
+ self.name = self.class.name
+ self.code = @@default_code
+ self.criticity = @@default_criticity
+ end
+ end
+end
diff --git a/app/models/vechicle_journey_control/waiting_time.rb b/app/models/vechicle_journey_control/waiting_time.rb
new file mode 100644
index 000000000..a7e90b6ac
--- /dev/null
+++ b/app/models/vechicle_journey_control/waiting_time.rb
@@ -0,0 +1,13 @@
+module VehicleJourneyControl
+ class WatingTime < ComplianceControl
+
+ @@default_criticity = :warning
+ @@default_code = "3-VehicleJourney-1"
+
+ after_initialize do
+ self.name = self.class.name
+ self.code = @@default_code
+ self.criticity = @@default_criticity
+ end
+ end
+end