Skip to content

Commit

Permalink
Occupancy -> OccupancyView
Browse files Browse the repository at this point in the history
* added checking as well.
  • Loading branch information
ue71603 committed Jul 5, 2024
1 parent b3654ba commit 37e7000
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,15 @@ The Calendar is shown coded as
<Departure>
<Time>14:20:00.0Z</Time>
<occupancies>
<Occupancy version="any" id="occ1">
<OccupancyView version="any" id="occ1">
<OccupancyLevel>fewSeatsAvailable</OccupancyLevel>
<OccupancyPercentage>40</OccupancyPercentage>
<WheelchairsOnboardCount>1</WheelchairsOnboardCount>
<GroupReservation>
<NameOfGroup>a group</NameOfGroup>
<NumberOfReservedSeats>4</NumberOfReservedSeats>
</GroupReservation>
</Occupancy>
</OccupancyView>
</occupancies>
</Departure>
</Call>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,12 @@ The TIMETABLE FRAME groups the servicee elements
<ServiceJourney version="any" id="bbd:sj_447">
<Description>447 Amsterdam to Warsaw</Description>
<occupancies>
<Occupancy>
<OccupancyView>
<TrainRef version="any" ref="bbd:trn_447"/>
<TrainElementRef version="any" ref="bbd:trne_447_02"/>
<FareClass>businessClass</FareClass>
<OccupancyPercentage>20</OccupancyPercentage>
</Occupancy>
</OccupancyView>
</occupancies>
<DepartureTime>09:00:00Z</DepartureTime>
<ServiceJourneyPatternRef version="any" ref="bbd:JP_447_amsterdam_warsaw"/>
Expand Down Expand Up @@ -400,9 +400,9 @@ The TIMETABLE FRAME groups the servicee elements
<EndTime>12:00:00Z</EndTime>
<PurposeOfJourneyPartitionRef ref="bbd:coupling">coupling</PurposeOfJourneyPartitionRef>
<occupancies>
<Occupancy version="any" id="bbd:occ:1">
<OccupancyView version="any" id="bbd:occ:1">
<OccupancyLevel>fewSeatsAvailable</OccupancyLevel>
</Occupancy>
</OccupancyView>
</occupancies>
</JourneyPart>
<JourneyPart version="any" id="bbd:jpt_447_02">
Expand Down
20 changes: 10 additions & 10 deletions examples/functions/timetable/Netex_51.1_Occupancy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,9 @@
<TimingPointInJourneyPatternRef version="any" ref="hde:tpijp_24o_02"/>
<DepartureTime>14:10:00.0Z</DepartureTime>
<occupancies>
<Occupancy>
<OccupancyView>
<OccupancyLevel>fewSeatsAvailable</OccupancyLevel>
</Occupancy>
</OccupancyView>
</occupancies>
</TimetabledPassingTime>
<TimetabledPassingTime version="any" id="hde:tpt_24o_01_SSP_001_t2">
Expand All @@ -545,11 +545,11 @@
<TimingPointInJourneyPatternRef version="any" ref="hde:tpijp_24o_05"/>
<DepartureTime>14:50:00.0Z</DepartureTime>
<occupancies>
<Occupancy>
<OccupancyView>
<PassengerCategory>adult</PassengerCategory>
<OccupancyPercentage>60</OccupancyPercentage>
</Occupancy>
<OccupancyRef version="any" ref="occ4"/>
</OccupancyView>
<OccupancyViewRef version="any" ref="occ4"/>
</occupancies>
</TimetabledPassingTime>
<TimetabledPassingTime version="any" id="mybus:tpt_24o_01_SSP_077">
Expand Down Expand Up @@ -586,10 +586,10 @@
<Time>14:32:00.0Z</Time>
<WaitTime>PT2M</WaitTime>
<occupancies>
<Occupancy>
<OccupancyView>
<OnboardCount>20</OnboardCount>
</Occupancy>
<OccupancyRef ref="occ4" version="any"/>
</OccupancyView>
<OccupancyViewRef ref="occ4" version="any"/>
</occupancies>
</Departure>
<Note>Arrival at Terminus</Note>
Expand Down Expand Up @@ -729,9 +729,9 @@
</ServiceFacilitySet>
</serviceFacilitySets>
<occupancies>
<Occupancy version="any" id="occ4">
<OccupancyView version="any" id="occ4">
<WheelchairsOnboardCount>2</WheelchairsOnboardCount>
</Occupancy>
</OccupancyView>
</occupancies>
</TimetableFrame>
<!-- Service Calendar Nov 2010 COMPACT Coding === -->
Expand Down
13 changes: 12 additions & 1 deletion xsd/NeTEx_publication.xsd

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Rail transport, Roads and Road transport
<xsd:group ref="InterchangeInFrameGroup"/>
<xsd:group ref="VehicleTypeInFrameGroup"/>
<xsd:group ref="JourneyAccountingInFrameGroup"/>
<xsd:group ref="OccupancyInFrameGroup"/>
<xsd:group ref="OccupancyViewInFrameGroup"/>
</xsd:sequence>
</xsd:group>
<xsd:group name="TimetableDefaultsGroup">
Expand Down
2 changes: 1 addition & 1 deletion xsd/netex_part_2/part2_journeyTimes/netex_call_version.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ Rail transport, Roads and Road transport
</xsd:annotation>
</xsd:element>
<xsd:group ref="CallPartGroup"/>
<xsd:element name="occupancies" type="Occupancy_RelStructure" minOccurs="0">
<xsd:element name="occupancies" type="OccupancyView_RelStructure" minOccurs="0">
<xsd:annotation>
<xsd:documentation>OCCUPANCYs associated with this journey.</xsd:documentation>
</xsd:annotation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ of the corresponding VEHICLE TYPE. true for forward.</xsd:documentation>
<xsd:documentation>Positions in Train of JOURNEY PART.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="occupancies" type="Occupancy_RelStructure" minOccurs="0">
<xsd:element name="occupancies" type="OccupancyView_RelStructure" minOccurs="0">
<xsd:annotation>
<xsd:documentation>OCCUPANCYs associated with this journey.</xsd:documentation>
</xsd:annotation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Rail transport, Roads and Road transport
<xsd:documentation>NOTICEs relevant for the whole GROUP OF SERVICEs.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="occupancies" type="Occupancy_RelStructure" minOccurs="0">
<xsd:element name="occupancies" type="OccupancyView_RelStructure" minOccurs="0">
<xsd:annotation>
<xsd:documentation>OCCUPANCYs associated with this journey.</xsd:documentation>
</xsd:annotation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Rail transport, Roads and Road transport
<xsd:documentation>Number of days after the starting time of the journey if not same calendar day. Default is 0 for same day.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="occupancies" type="Occupancy_RelStructure" minOccurs="0">
<xsd:element name="occupancies" type="OccupancyView_RelStructure" minOccurs="0">
<xsd:annotation>
<xsd:documentation>OCCUPANCYs associated with this journey.</xsd:documentation>
</xsd:annotation>
Expand Down
35 changes: 15 additions & 20 deletions xsd/netex_part_2/part2_occupancy/netex_oc_occupancy_version.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,13 @@ More accurate data can be provided by the individual occupancies or capacities b
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="Occupancy_" type="Occupancy_VersionStructure" abstract="true" substitutionGroup="DataManagedObject">
<xsd:element name="OccupancyView">
<xsd:annotation>
<xsd:documentation>Dummy supertype for Occupancy.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Occupancy" abstract="true" substitutionGroup="Occupancy_">
<xsd:annotation>
<xsd:documentation>An OCCUPANCY.</xsd:documentation>
<xsd:documentation>A simple VIEW of OCCUPANCY as a first implementation without full support of DECK PLAN.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="Occupancy_VersionStructure">
<xsd:restriction base="OccupancyView_VersionStructure">
<xsd:sequence>
<xsd:sequence>
<xsd:group ref="EntityInVersionGroup" minOccurs="0"/>
Expand All @@ -129,12 +124,12 @@ More accurate data can be provided by the individual occupancies or capacities b
</xsd:group>
</xsd:sequence>
</xsd:sequence>
<xsd:attribute name="id" type="OccupancyIdType"/>
<xsd:attribute name="id" type="OccupancyViewIdType"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="Occupancy_VersionStructure" abstract="false">
<xsd:complexType name="OccupancyView_VersionStructure" abstract="false">
<xsd:annotation>
<xsd:documentation>Type for an Occupancy.</xsd:documentation>
</xsd:annotation>
Expand Down Expand Up @@ -184,59 +179,59 @@ More accurate data can be provided by the individual occupancies or capacities b
</xsd:element>
</xsd:sequence>
</xsd:group>
<xsd:group name="OccupancyInFrameGroup">
<xsd:group name="OccupancyViewInFrameGroup">
<xsd:annotation>
<xsd:documentation>Elements for a OCCUPANCY in frame.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="occupancies" type="OccupancyInFrame_RelStructure" minOccurs="0">
<xsd:element name="occupancies" type="OccupancyViewInFrame_RelStructure" minOccurs="0">
<xsd:annotation>
<xsd:documentation>OCCUPANCYs in frame.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="OccupancyRefStructure">
<xsd:complexType name="OccupancyViewRefStructure">
<xsd:annotation>
<xsd:documentation>Type for a reference to an OCCUPANCY.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="VersionOfObjectRefStructure">
<xsd:attribute name="ref" type="OccupancyIdType" use="required">
<xsd:attribute name="ref" type="OccupancyViewIdType" use="required">
<xsd:annotation>
<xsd:documentation>Identifier of referenced entity.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<xsd:simpleType name="OccupancyIdType">
<xsd:simpleType name="OccupancyViewIdType">
<xsd:annotation>
<xsd:documentation>Type for identifier of a OCCUPANCY.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="ObjectIdType"/>
</xsd:simpleType>
<xsd:complexType name="Occupancy_RelStructure">
<xsd:complexType name="OccupancyView_RelStructure">
<xsd:annotation>
<xsd:documentation>Type for containment for multiple OCCUPANCYs.</xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="containmentAggregationStructure">
<xsd:choice maxOccurs="unbounded">
<xsd:element name="Occupancy" type="Occupancy_VersionStructure"/>
<xsd:element name="OccupancyRef" type="OccupancyRefStructure"/>
<xsd:element name="OccupancyView" type="OccupancyView_VersionStructure"/>
<xsd:element name="OccupancyViewRef" type="OccupancyViewRefStructure"/>
</xsd:choice>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="OccupancyInFrame_RelStructure">
<xsd:complexType name="OccupancyViewInFrame_RelStructure">
<xsd:annotation>
<xsd:documentation>Type for containment in FRAME of OCCUPANCYs.</xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="containmentAggregationStructure">
<xsd:sequence>
<xsd:element name="Occupancy" type="Occupancy_VersionStructure"/>
<xsd:element name="OccupancyView" type="OccupancyView_VersionStructure"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
Expand Down

0 comments on commit 37e7000

Please sign in to comment.