NeTEx-CEN/NeTEx

Elements missing the unique constraint

Opened this issue · 7 comments

The following element have id and version attributes, but lack the unique constraint. Hence the examples will not be correctly checked.

AccessibilityAssessment
AccessibilityLimitation
AccessRightParameterAssignment
AccessZone
ActivatedEquipment
AdditionalDriverOption
Address
AddressablePlace
AdministrativeZone
AlternativeModeOfOperation
AlternativeQuayDescriptor
AvailabilityCondition
Call-Z
CallZ
Cancelling
CellInContext
CellPrice
Centroid
ClassificationDescriptor
ClassificationHierarchyMember
CodespaceAssignment
CollectionPointRef
CommonSectionPointMember
ComplexFeatureMember
ComplexFeatureProjection
Country
CustomerPurchasePackageElementAccess
CustomerPurchasePackagePrice
DatedCall
DatedCall-Z
DatedCallZ
DatedPassingTime
DatedServiceJourney
DatedVehicleJourney
DeadRunCall
DefaultDeadRunRunTime
DefaultServiceJourneyRunTime
DeliveryVariant
Descriptor
DestinationDisplayVariant'
Duty
Entrance
EstimatedPassingTime
EstimatedPassingTimeView
FacilityRequirement
FareContractEntry_
FareInterval
FareProductPrice
FareQuotaFactor
FareStructureElementInSequence
FareStructureFactor
FareTableInContext
FareUnit
FlexibleLine
FlexibleLinkProperties
FlexiblePointProperties
FlexibleQuay
FlexibleRoute
FlexibleServiceProperties
FlexibleStopAssignment
GeneralFrameMember
GeneralZone
GenericParameterAssignmentInContext
GeographicalIntervalPrice
GroupConstraintMember
GroupMember
GroupOfLinks
GroupOfPlaces
GroupOfPoints
GroupOfTimingLinks
HelpPointEquipment
InterchangeRuleTiming
JourneyHeadway
JourneyLayover
JourneyPatternHeadway
JourneyWaitTime
Layer
LimitingRuleInContext
LineSectionPointMember
LineShape
ManagementAgent
MediumAccessDevice
MonitoredCall
MonthValidityOffset
NormalDatedVehicleJourney
ObservedPassingTime
ObservedPassingTimeView
OfferedTravelSpecification
OnwardCall
OperatingDay
OrganisationalUnit
OrganisationDayType
OtherOrganisation
OtherPlaceEquipment
ParkingChargeBand
ParkingComponent
PassengerCapacity
PassengerCarryingRequirement
PassengerCarryingRequirementsView
PassingTime
PassingTimeView
Point
Point2
PointOfInterestVehicleEntrance
PointOnLineSection
PreviousCall
PurposeOfJourneyPartition
QueueingEquipment
Refunding
RentalOption
RequestedTravelSpecification
Reselling
ResidentialQualification
RoundingStep
RouteInstruction
SalesOfferPackageEntitlementGiven
SalesOfferPackageEntitlementRequired
SchematicMap
SchematicMapMember
ServiceAccessRight
ServiceAccessRight_
ServiceAccessRight1
ServiceAccessRight2
SignEquipment
SimpleAvailabilityCondition
SimpleValidityCondition
SitePathLink
SpatialFeature
StairFlight
StartTimeAtStopPoint
StopPlaceVehicleEntrance
Subscribing
Suitability
Suspending
TargetPassingTime
TargetPassingTimeView
TemplateServiceJourney
TimeDemandProfileMember
TimetabledPassingTime
TimetabledPassingTimeView
TimingAlgorithmType
TopographicPlaceDescriptor
TopographicProjection
TransportType
TravelAgent
TravelSpecification_
TravelSpecification1
TravelSpecification2
TurnaroundTimeLimitTime
TypeOfCodespaceAssignment
TypeOfCongestion
TypeOfDeliveryVariant
TypeOfEntity
TypeOfFacility
TypeOfFareProduct
TypeOfLink
TypeOfMobilityService
TypeOfModeOfOperation
TypeOfNotice
TypeOfOperation
TypeOfOrganisationPart
TypeOfPaymentMethod
TypeOfSecurityList
TypeOfServiceFeature
TypeOfTariff
TypeOfTimeDemandType
TypeOfVersion
TypeOfZone
typesOfPaymentMethod
UserNeed
ValidBetween
ValidDuring
ValidityParameterAssignment
ValidityPeriod
VehicleJourneyHeadway
VehicleJourneyLayover
VehicleJourneyRunTime
VehicleJourneyStopAssignment
VehicleJourneyWaitTime
VehicleManoeuvringRequirement
VehicleMeetingPlace_
VehicleMeetingPlace1
VehicleMeetingPlace2
VehicleMeetingPointAssignment_
VehicleMeetingPointAssignment1
VehicleMeetingPointAssignment2
VehiclePoolingMeetingPlace
VehicleServicePlaceAssignment
VehicleServicePlaceAssignment_
VehicleServicePlaceAssignment1
VehicleServicePlaceAssignment2
VehicleTypePreference
VehicleTypeZoneRestriction
Via
Zone
Aurige commented

I globally agree but I'm puzzled because some, like OperatingDay had constraints that were commented (see below).
We need to ask @nick-knowles if he remembers why

<!-- =====OperatingDay============================== --> <!-- =====OperatingDay unique========================== --> <!-- <xsd:unique name="OperatingDay_UniqueBy_Id_Version"> <xsd:annotation> <xsd:documentation>Every [OperatingDay Id + Version] must be unique within document.</xsd:documentation> </xsd:annotation> <xsd:selector xpath=".//netex:OperatingDay"/> <xsd:field xpath="@id"/> <xsd:field xpath="@version"/> </xsd:unique>--> <!-- =====OperatingDay unique==In Calendar======================== -->

These fall into various different categories and it will take some time to check them all

Here is a start

(1) Missing uniqueness constraint.

Yes there are surprising number of these
It looks like quite a lot of changes to netex_publication have been lost. (it is a merge bottleneck) Some I know for sure I had previously fixed as I have prepared quiet complex examples for some elements

AccessZone
ActivatedEquipmentAdministrativeZone
AvailabilityCondition

ComplexFeatureProjection
CustomerPurchasePackageElementAccess
CustomerPurchasePackagePrice
DefaultDeadRunRunTime
DefaultServiceJourneyRunTime
EstimatedPassingTime
EstimatedPassingTimeView

FareProductPrice
FareQuotaFactor
FlexibleLine
FlexibleLinkProperties
FlexiblePointProperties
FlexibleQuay
FlexibleRoute
FlexibleServiceProperties
FlexibleStopAssignment

GeneralZone
GeographicalIntervalPrice
GroupOfPlaces
GroupOfTimingLinks
HelpPointEquipment
ManagementAgent

NormalDatedVehicleJourney
ObservedPassingTime
ObservedPassingTimeView
OnwardCall
OfferedTravelSpecification
OperatingDay
OrganisationalUnit
OrganisationDayType

ParkingChargeBand
PassengerCapacity
PassengerCarryingRequirement
PassengerCarryingRequirementsView
PointOfInterestVehicleEntrance
PreviousCall
PurposeOfJourneyPartition

QueueingEquipment
RequestedTravelSpecification
ResidentialQualification
RoundingStep
RouteInstruction
SchematicMap
SchematicMapMember
StartTimeAtStopPoint
StopPlaceVehicleEntrance
TemplateServiceJourney

TravelAgent
TopographicProjection
TurnaroundTimeLimitTime
TypeOfCongestion
TypeOfDeliveryVariant
TypeOfEntity
TypeOfFacility
TypeOfFareProduct
TypeOfLink
TypeOfMobilityService
TypeOfModeOfOperation
TypeOfNotice
TypeOfOperation
TypeOfOrganisationPart
TypeOfPaymentMethod
TypeOfSecurityList
TypeOfServiceFeature
TypeOfTariff
TypeOfTimeDemandType
TypeOfVersion
TypeOfZone

VehicleJourneyHeadway
VehicleJourneyLayover
VehicleJourneyRunTime
VehicleJourneyStopAssignment
VehicleJourneyWaitTime
VehicleManoeuvringRequirement
VehiclePoolingMeetingPlace
VehicleServicePlaceAssignment
VehicleTypePreference
VehicleTypeZoneRestriction

These usage parameters should all be unique

Cancelling
Subscribing
Suspending
AdditionalDriverOption
Refunding
RentalOption
SalesOfferPackageEntitlementGiven
SalesOfferPackageEntitlementRequired

(2) Elements which are already fixed in pending changes

Duty

(3) Elements which are abstract and do not need constraints

(but Should at least be marked as abstract)

AccessRightParameterAssignment
Address
AddressablePlace
AlternativeModeOfOperation
Entrance

GroupOfLinks
GroupOfPoints
JourneyHeadway
JourneyLayover
JourneyPatternHeadway
JourneyWaitTime

FareInterval
FareUnit
FareStructureElementInSequence
FareStructureFactor
Layer
MediumAccessDevice
ParkingComponent
PassingTime
Point
Reselling
SignEquipment
SpatialFeature
TransportType
OtherOrganisation
ServiceAccessRight
SimpleAvailabilityCondition
ValidityParameterAssignment
Zone

NB. Anythings with _ on the end is abstract

FareContractEntry_
ServiceAccessRight_
TravelSpecification_
VehicleMeetingPlace_
VehicleMeetingPointAssignment_
VehicleServicePlaceAssignment_

(4) Elements which are for inline use and do not need keys

(parent key can be used if desired)

AccessibilityAssessment
AccessibilityLimitation
CellPrice
Centroid
Descriptor
LineShape
TopographicPlaceDescriptor
ValidBetween
ValidDuring

(5) Elements which were intended to allow alternate encoding  of child elemenyts without an id 

This was done years ago to try and code some very lareg timetables can probbaly be dropped
Itekmes end in -Z or InCOntext . Can probabkly be scrapopoed

Call-Z
CellInContext
DatedCall-Z
FareTableInContext
LimitingRuleInContext
GenericParameterAssignmentInContext

(6) Special cases

a.  Country . Uses enum of IANA codes
b.  typesOfPaymentMethod  This is rferencing the wrong type should be a list
c. ValdityPeriod - part of Siri? Ignore
d. CodespaceAssignment metadat should be unique on prefix
e.  CollectionPointRef This is a reference to any Point

(7) Junk that can be deleted

AlternativeQuayDescriptor
CallZ
DatedCallZ

(3) Search artefacts which can be ignored??

I could not find..

Point2
ServiceAccessRight1
ServiceAccessRight2
TravelSpecification1
TravelSpecification2

VehicleMeetingPlace1
VehicleMeetingPlace2

VehicleMeetingPointAssignment1
VehicleMeetingPointAssignment2

VehicleServicePlaceAssignment1
VehicleServicePlaceAssignment2

===============

STILL TO CHECK

ClassificationDescriptor
ClassificationHierarchyMember
CommonSectionPointMember
ComplexFeatureMember

DatedCall

DatedPassingTime
DatedServiceJourney
DatedVehicleJourney
DeadRunCall

DeliveryVariant

DestinationDisplayVariant'

FacilityRequirement

GeneralFrameMember
GroupConstraintMember
GroupMember

InterchangeRuleTiming

LineSectionPointMember

MonitoredCall
MonthValidityOffset

OtherPlaceEquipment

PassingTimeView

PointOnLineSection

Suitability

SimpleValidityCondition
SitePathLink

StairFlight

Suitability
TargetPassingTime
TargetPassingTimeView
TimeDemandProfileMember
TimetabledPassingTime
TimetabledPassingTimeView
TimingAlgorithmType

TypeOfCodespaceAssignment

UserNeed
Via

@nick-knowles why is CallZ and DatedCallZ junk?

XSD Key constraint means also unique

@nick-knowles will check these constraints

Group Decision: Drop Call-Z (PR to be drafted)

how to we proceed and when? @skinkie