Ero sivun ”Journeys API” versioiden välillä

176 merkkiä lisätty ,  6. lokakuuta 2014 kello 01.03
Rivi 16: Rivi 16:
[[File:API_Entities_1.1.png|none]]
[[File:API_Entities_1.1.png|none]]


In the picture above, entities are drawn with purple color. Boxes with blue color are properties of the entities, but drawn out to explain the concepts. Lines in the picture represent UML-styled relations. Lines with filled diamond represent relation with ownership rule: the entity which has a diamond shape attached to it, owns the entity or property at other end of the line. Lines with empty diamond represent relation reference rule: the entity which has an empty diamond shape attached to it, is referred by entity or property at other end of the line. For example ROUTE owns POINTS ON ROUTE, and JOURNEY references a STOP POINT. Numbers at the end of lines are multiplicity rules, which tell how many entities or properties are included in the relation. If number is not present at the end of a line, it is assumed that number one would exist at the end of that line. For example: Route and PointOnRoute share a relation. In this relation, a PointOnRoute relates to one Route, whereas a Route relates to two or more PointOnRoutes.
In the picture above, entities are drawn with purple color. Boxes with blue color are properties of the entities, but drawn out to explain the concepts. Lines in the picture represent UML-styled relations. Lines with filled diamond represent relation with ownership rule: the entity which has a diamond shape attached to it, owns the entity or property at other end of the line. Lines with empty diamond represent relation reference rule: the entity which has an empty diamond shape attached to it, is referred by entity or property at other end of the line. For example ROUTE owns JOURNEY PATTERN, and JOURNEY references a STOP POINT. Numbers at the end of lines are multiplicity rules, which tell how many entities or properties are included in the relation. If number is not present at the end of a line, it is assumed that number one would exist at the end of that line. For example: LINE and ROUTE share a relation. In this relation, a ROUTE relates to one LINE, whereas a LINE relates to zero or more ROUTEs.
===Routes and Points on Route===
===Routes and Points on Route===
ROUTE entity describes a path through (a road or a rail) network, which is used by a public transport service (such as bus or a tram). ROUTE consists of sequence of POINTS ON ROUTE, each having a location. The first POINT ON ROUTE is the starting point of the ROUTE and the last POINT ON ROUTE is the termination point of the ROUTE. Following picture is taken from Tampere "reittikartta" and outlines a ROUTE through Tampere. [[File:Journ_Line_2.png|400px|none]]
ROUTE entity describes a path through (a road or a rail) network, which is used by a public transport service (such as bus or a tram). ROUTE has typically one or more projections. Projection is a way to describe a ROUTE on selected canvas. For example a route could be presented on a map by drawing it as a line on it. Another way would be project a ROUTE for example to OpenStreetMap by using OpenStreetMap roads to present the ROUTE. Journeys API currently supports only projecting the ROUTE as coordinate shape. Following picture is taken from Tampere "reittikartta" and outlines a ROUTE through Tampere. [[File:Journ_Line_2.png|400px|none]]


===Line===
===Line===
LINE entity is a grouping of ROUTES that is generally known to the public with a common name, such as "Line 2". ROUTES on the same LINE usually follow similar ROUTEs.
LINE entity is a grouping of ROUTES that is generally known to the public with a common name, such as "Line 2". ROUTES on the same LINE usually follow similar ROUTEs.


===Journey, DayType, DayTypeException and StopPoint===
===Journey, Journey Pattern, DayType, DayTypeException and StopPoint===
JOURNEY describes public transport vehicle's run on a given ROUTE through the city. Typically the run occurs at the same time on multiple days during a week. For example a certain JOURNEY on given ROUTE could start 10:00 AM on Mondays, Tuesdays, Wednesdays, Thursdays and Fridays. DAY TYPE, attached to a JOURNEY, classifies the conditions on which kind of days the JOURNEY occurs. Conditions can be week day names, but other kind of conditions can apply too (such as "busy day" or "all weekdays"). DAY TYPE EXCEPTION provides mechanism to temporarily deviate from conditions imposed by a DAY TYPE. For example if a JOURNEY would occur on all weekdays, public holidays could be modeled as DAY TYPE EXCEPTIONS. In other words we could say "This JOURNEY runs on every week day except 21.5.2014, because this day is Labor Day".  
JOURNEY describes public transport vehicle's run on a given ROUTE through the city. Typically the run occurs at the same time on multiple days during a week. For example a certain JOURNEY on given ROUTE could start 10:00 AM on Mondays, Tuesdays, Wednesdays, Thursdays and Fridays. DAY TYPE, attached to a JOURNEY, classifies the conditions on which kind of days the JOURNEY occurs. Conditions can be week day names, but other kind of conditions can apply too (such as "busy day" or "all weekdays"). DAY TYPE EXCEPTION provides mechanism to temporarily deviate from conditions imposed by a DAY TYPE. For example if a JOURNEY would occur on all weekdays, public holidays could be modeled as DAY TYPE EXCEPTIONS. In other words we could say "This JOURNEY runs on every week day except 21.5.2014, because this day is Labor Day".  
<br><br>
<br><br>
0

muokkausta