TT:category: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
(@trainUsage: Änderung 2.4→2.5)
No edit summary
Line 38: Line 38:
|constraints =
|constraints =
{{InheritIdNameConstraints}}
{{InheritIdNameConstraints}}
*{{constraint|trainUsage|rml|tUsageType}}
*{{anchor|tUsageType}}{{constraint|trainUsage|rml|tUsageType}}
*{{constraint|deadrun|xsd|boolean}}
*{{constraint|deadrun|xsd|boolean}}
*{{constraint|categoryPriority|xsd|string}}
*{{constraint|categoryPriority|xsd|string}}

Revision as of 15:19, 13 March 2023


category
 


Scheme description / Schemenbeschreibung

Position of category in the XML-Tree / Position von category im XML-Baum

Multiplicity / Anzahl

[1..∞]

Semantics / Bedeutung

The Element <category> describes a "train type" or "train category". Depending on the system, these terms are defined quite differently.

Das Element <category> beschreibt einen "Zugtyp", bzw. eine "Zuggattung" oder auch eine "Zugkategorie". Je nach System werden diese Begriffe sehr unterschiedlich definiert.

Attributes of category / Attribute von category

  • id: XML-file-wide unique, machine-interpretable identity, required for later referencing that element internally. For a detailed explanation see Dev:identities.
    XML-Datei-weit eindeutige, maschineninterpretierbare Identität, die für die spätere interne Referenzierung dieses Elements erforderlich ist. Für eine detaillierte Erklärung siehe Dev:identities.
  • code (introduced with version 2.1): Machine-interpretable string (e.g. an abbreviation) used for identification of the object across exchange partners, usecase specific uniqueness constraints may apply. Please see our description of the differences between id, code and human-readable identifiers.
    Maschineninterpretierbare Zeichenkette (z.B. Abkürzung), die zur Identifizierung des Objekts auch bei Austauschpartnern verwendet wird, wobei spezifische Eindeutigkeitsbeschränkungen gelten können. Bitte beachten Sie unsere Erläuterung zu den Unterschieden zwischen id, code and menschenlesbaren Kennzeichnungen.
  • name: Established, human-readable short string, giving the object a name. Not intended for machine interpretation, please see our notice on human interpretable data fields.
    Etablierte, menschenlesbare kurze Zeichenkette, die das Objekt benennt. Nicht zur maschinellen Interpretation bestimmt, siehe Hinweise zu menschenlesbaren Datenfeldern.
  • description: Human-readable, more detailed description as addition to the name. It should give additional explanations or hints to the contents of this element. Not intended for machine interpretation, please see our notice on human interpretable data fields.
    Menschenlesbare, detailliertere Beschreibung als Ergänzung zu name. Sie soll zusätzliche Erläuterungen oder Hinweise auf den Inhalt dieses Elements geben. Nicht zur maschinellen Interpretation bestimmt, siehe Hinweise zu menschenlesbaren Datenfeldern.
  • xml:lang (introduced with version 2.1): This is a unique identifier of language. It uses basically the language standard IETF BCP 47 (external link) which may be different to ISO 639-1 (external link) or ISO 639-2 (external link). For mapping hints see relation to other standards (external link).
    This defines the language used for name and description. Use <additionalName> to provide a name and/or description in other languages.
  • trainUsage: This defines the purpose of the train journey for service, representation and information applications. (Not to be confused with ETCS Operational Train Categories from Annex B of Technical Specifications OPE (external link).) Possible values are:
    Damit wird der Zweck der Zugfahrt für Service-, Darstellungs- und Informationsanwendungen definiert. (Nicht zu verwechseln mit ETCS Operational Train Kategorien aus Anhang B der Technischen Spezifikationen OPE.)
  • passenger: The train consists of passenger wagons only (independent of the amount of passengers on board; for full and empty trains).
    Der Zug besteht nur aus Personenwagen (unabhängig von der Anzahl der an Bord befindlichen Personen; für Voll- und Leerzüge).
  • goods: The train consists of cargo wagons only (independent of the amount of goods on board; for full and empty trains).
    Der Zug besteht nur aus Güterwagen (unabhängig von der Menge der an Bord befindlichen Güter; für Voll- und Leerzüge).
  • mixed: The train consists of both passenger and cargo wagons (independent of the amount of passengers and goods on board).
    Der Zug besteht sowohl aus Personen- als auch aus Güterwagen (unabhängig von der Anzahl der Personen und Güter an Bord).
  • deadrun: This is true if a train with this category runs empty, for operational purposes only.
  • categoryPriority: It describes the importance of a category in relationship to other categories (e.g. passengers higher than goods, or privileged long distance trains).
  • parentRef: (introduced with version 2.5) Allows organizing categories in hierarchies. Together with the attribute organizationalUnitRef this allows to exchange company specific categories that can be aggregated to a generic top level category.
    Erlaubt es Kategorien in Hierarchien zu verwalten. Zusammen mit dem Attribut organizationalUnitRef können so Unternehmensspezifische Kategorien ausgetauscht werden, die zu allgemeinen Top-Level Kategorien zusammengefasst werden können.

Syntactic Constraints / Syntaktische Beschränkungen

  • id: xs:ID, required
    a string, starting with a letter (a..zA..Z) or an underscore (_),
    followed by a non-colonized and non-spaced string consisting of letters, digits, points (.), dashes (-) or underscores (_)
  • code: xs:string, optional
  • name: xs:string, optional
  • description: xs:string, optional
  • xml:lang: xs:language, language identification, optional
  • trainUsage: tUsageType (Enumeration of xs:string values "passenger" OR "goods" OR "mixed";
    (introduced with version 2.5) combined with tOtherEnumerationValue.); optional
  • deadrun: xs:boolean; optional
  • categoryPriority: xs:string; optional
  • parentRef: tGenericRef (xs:IDREF); optional
  • organizationalUnitRef: tGenericRef (xs:IDREF); optional

Best practice & Examples / Empfohlene Anwendung & Beispiele

Data type of the @categoryPriority

Even if the data type was modeled as xs:string in the past, it is recommended to specify categoryPriority as an numerical value (integer and positive; 0 - ∞), the lower the value, the higher the priority. The use according to the schema definition as a character string is still allowed, but the interpretation would then have to be agreed bilaterally between consumer and producer of the data.
Auch wenn der Datentyp in der Vergangenheit als Zeichenkette (xs:string) modelliert wurde, wird empfohlen, für categoryPriority numerische Werte (ganzzahlig und positiv; 0 – ∞) anzugeben, wobei ein kleinerer Wert eine höhere Priorität beschreiben würde. Die Verwendung entsprechend der Schemendefinition als Zeichenkette ist weiterhin zulässig, allerdings wäre die Interpretation dann zwischen Konsument und Produzent der Daten bilateral zu vereinbaren.

<category id="cat00" code="ROY" name="Royal train" description="Train for the royal family and their guests with special protection and surveillance requirements" lang="en" trainUsage="passenger" categoryPriority="0"/>
<category id="cat01" code="THA" name="Thalys" description="Train à grande vitesse qui circule en France, en Belgique, en Allemagne et aux Pays-Bas" lang="fr" trainUsage="passenger" categoryPriority="1"/>
<category id="cat02" code="EC" name="EuroCity" description="International passenger trains with special comfort, catering facilities on the train and an average speed ≥ 90 km/h" lang="en" trainUsage="passenger" categoryPriority="5"/>
<category id="cat03" code="IC" name="InterCity" description="National passenger trains with special comfort, bistro facilities on the train" lang="en" trainUsage="passenger" categoryPriority="5"/>
<category id="cat04" code="R" name="Regional" description="Zug des Regionalverkehrs, welcher in der Regel alle Halte bedient" lang="de" trainUsage="passenger" categoryPriority="10"/>
<category id="cat05" code="WT" name="WorkTrain" description="Trains for IM's own purposes (signal inspection runs, runs for inspection or maintenance of tracks including rail grinding trains, etc.), " lang="en" categoryPriority="381"/>

Examples for attributes @organizationalUnitRef and @parentRef

<railml>
  <metadata>
    <organizationalUnits>
      <infrastructureManager id="ou_dbn" code="DBN" name="DB Netz AG" description="German railway infrastructure manager" lang="en"/>
      <railwayUndertaking id="ou_cd" code="CD" name="České dráhy, a.s." description="State owned train operation company in the Czech Republic" lang="en"/>
      <railwayUndertaking id="ou_oebb-p" code="ÖBB-PV" name="ÖBB-Personenverkehr AG" description="Largest austrian passenger railway operator" lang="en"/>
    </organizationalUnits>
  </metadata>
  <timetable>
    <categories>
      <category id="cat_R" code="R" name="Regional train" description="Train of regional traffice, which usually serves all stops" lang="en"/>
      <category id="cat_R_CD" code="R" name="Rychlik" description="Vlak regionální dopravy, který obvykle obsluhuje všechny zastávky" lang="cz" organizationalUnitRef="ou_cd" parentRef="cat_R"/>
      <category id="cat_R_OeBB" code="R" name="Regionalzug" description="Train of the regional traffic, which usually serves all stops" lang="en" organizationalUnitRef="ou_oebb-p" parentRef="cat_R"/>
      <category id="cat_DPF" code="DPF" name="Fernreisezug externe EVU" description="long-distance service of external (non DB group) RU" lang="en" organizationalUnitRef="ou_dbn" />
    </categories>
  </timetable>
</railml>

Further reading

For more information on categories and their usage please also visit Train types, categories, products, and passenger usage

Notes / Anmerkungen

Not yet described. / Noch nicht beschrieben.

Open issues / Offene Punkte/Pendenzen

Unclear usage of @trainUsage

Up to railML 2.4 there seems to be no clear definition for some specials train usage purposes, e.g. a train consisting of a single universal locomotive, or a working train like a tamping machine.
Hinweis: Bis einschließlich railML 2.4 scheint es keine klare Definition für einige besondere Zwecke zu geben, z.B. für einen Zug, der nur aus einer einzigen (Universal-)Lokomotive besteht oder einen Arbeitszug wie eine Stopfmaschine.