This is kind of a logical trap which in its current form blocks importing both StopPlaces and Parkings in one go.
What happens is that since import reassigns NeTEx id:s for all entities, one cannot know beforehand what the id:s will be and thus there isn't a valid parentSiteRef for Parking at time of creation - unless by accident at which point the Parking gets added to wrong Site, as it's relatively easy to believe that the stable NeTEx id given to the ref is the same as earlier defined in the same file.
To make this work in expected manner, the import should probably allow referring to StopPlace's imported-id key value property in place of the parentSiteRef. This is probably OK, as the Site > ParentSiteRef documentation simply states
Value dependent on context.
Alternatively to get this working as expected we'd need to split the import to two separate files, but as it's about the same effort to
- Import
StopPlaces
- Get generated NeTEx id:s for imported
StopPlaces
- Remap
parkings list with correct id references
as to
- Import
StopPlaces
- Use the UI to insert Parking information
the import for parkings is somewhat infeasible for us at the moment.
Relevant lookup logic here: ParkingVersionedSaverService.java#L104-L114
This is kind of a logical trap which in its current form blocks importing both
StopPlacesandParkingsin one go.What happens is that since import reassigns NeTEx id:s for all entities, one cannot know beforehand what the id:s will be and thus there isn't a valid
parentSiteRefforParkingat time of creation - unless by accident at which point theParkinggets added to wrongSite, as it's relatively easy to believe that the stable NeTEx id given to the ref is the same as earlier defined in the same file.To make this work in expected manner, the import should probably allow referring to
StopPlace'simported-idkey value property in place of theparentSiteRef. This is probably OK, as theSite > ParentSiteRefdocumentation simply statesAlternatively to get this working as expected we'd need to split the import to two separate files, but as it's about the same effort to
StopPlacesStopPlacesparkingslist with correct id referencesas to
StopPlacesthe import for parkings is somewhat infeasible for us at the moment.
Relevant lookup logic here: ParkingVersionedSaverService.java#L104-L114