NeTEx-CEN/NeTEx

Unreferenced complexTypes

Opened this issue · 8 comments

Based on a very quick and dirty test, I have found a list of complexTypes which are currently never referenced via an element or as base.

#!/bin/bash
find . -type f -name "*.xsd" | xargs grep -h "complexType name" | sed 's/.*name="\(.*\)".*/\1/g;s/" abstract.*//g' | sort -u | while read i; do
COUNT=`find . -type f -name "*.xsd" | xargs grep -h "type=\"\(.*:\)*${i}\"\|base=\"\(.*:\)*${i}\"" | wc -l`
        if [ "$COUNT" -eq "0" ]; then
                echo ${i}
                find . -type f -name "*.xsd" | xargs grep \"${i}\"
        fi
done
AbstractIdentifiedItemStructure
AbstractMemberType
AbstractMetadataPropertyType
AbstractPermissionStructure
AbstractReferencingItemStructure
AbstractRequiredIdentifiedItemStructure
AbstractRequiredReferencingItemStructure
AbstractTopicPermissionStructure
accessibilityAssessments_RelStructure
accessRefs_RelStructure
accessZones_RelStructure
activationTypeRefs_RelStructure
administrativeZoneRefs_RelStructure
allowedLineDirectionRefs_RelStructure
AllSubmodeStructure
assistanceBookingServices_RelStructure
availabilityConditions_RelStructure
blacklists_RelStructure
boardingPositionRefs_RelStructure
CapabilityAccessControlStructure
CapabilityRefStructure
CapabilitySubscriptionPolicyStructure
CellPriceStructure
cellRefs_RelStructure
chargingEquipmenProfilesInFrame_RelStructure
ClassInFrameRefs_RelStructure
ClosedTimeRangeStructure
CodeListType
CodeOrNilReasonListType
codespacesInFrame_RelStructure
CommonCell_VersionedChildStructure
commonVehicleServiceRefs_RelStructure
compositePrices_RelStructure
contactRefs_RelStructure
contractRefs_RelStructure
ControlCentres_RelStructure
controllableElements_RelStructure
ControlParameterAssignmentRefStructure
CoordinatesType
CrossingEquipmentRefStructure
CurveArrayPropertyType
customerAccountRefs_RelStructure
customerAccountSecurityListingRefs_RelStructure
customerAccountStatusRefs_RelStructure
customerEligibilityRefs_RelStructure
customerPaymentMeanRefs_RelStructure
CustomerPurchasePackageElementAccessRefStructure
CustomerPurchaseParameterAssignmentRefStructure
customerRefs_RelStructure
CustomerSecurityListingRefs_RelStructure
customers_RelStructure
DatedSpecialServiceRefs_RelStructure
DatedVehicleJourneyRefStructure
defaultDeadRunRunTimes_RelStructure
defaultServiceJourneyRunTimes_RelStructure
DeliveriesStructure
deltas_RelStructure
departmentRefs_RelStructure
departmentsInFrame_RelStructure
destinationDisplayVariantRefs_RelStructure
DeviceParameterAssignmentRefStructure
distanceMatrixElementRefs_RelStructure
distanceMatrixElementsInFrame_RelStructure
dummyPlaceRefs_RelStructure
dynamicVehicleMeetingPointAssignmentRefs_RelStructure
entitlementGivenRefs_RelStructure
entitlementRequiredRefs_RelStructure
entityInVersionInFrame_RelStructure
EscalatorEquipmentRefStructure
estimatedPassingTimes_RelStructure
explicitLocalServices_RelStructure
explicitPlaceEquipments_RelStructure
FareContractSecurityListingRefs_RelStructure
fareDemandFactors_RelStructure
fareQuotaFactors_RelStructure
fareScheduledStopPointRefs_RelStructure
fareStructureFactors_RelStructure
fareTableRefs_RelStructure
featureTypeRefs_RelStructure
flexibleAreas_RelStructure
flexibleLineRefs_RelStructure
flexibleQuays_RelStructure
flexibleServiceProperties_RelStructure
flexibleStopPlaceRefs_RelStructure
flexibleStopPlaces_RelStructure
fulfilmentMethodRefs_RelStructure
fulfilmentMethods_RelStructure
GaragePoint_VersionStructure
GenericParameterAssignmentRefStructure
GeometricPrimitivePropertyType
GeometryArrayPropertyType
GeometryPropertyType
groupOfcustomerPurchasePackageRefs_RelStructure
groupOfDistanceMatrixElementsRefs_RelStructure
GroupOfLinkSequencesRefStructure
groupOfLinkSequences_RelStructure
groupOfTimebands_RelStructure
groupOfTimingLinksInFrame_RelStructure
groupsOfDistanceMatrixElementsInFrame_RelStructure
groupsOfPlacesInFrame_RelStructure
hailAndRideAreas_RelStructure
HalfOpenTimeRangeStructure
HalfOpenTimestampRangeStructure
IndividualPassengerInfoRefs_RelStructure
individualTravellerRefs_RelStructure
individualTravellers_RelStructure
interchangeRuleFilters_RelStructure
InterchangeRuleFilter_VersionedChildStructure
journeyPartCouples_RelStructure
journeyPartsInFrame_RelStructure
JourneyPatternHeadwayRefStructure
JourneyPatternWaitTimeRefStructure
LiftEquipmentRefStructure
LimitationRefStructure
LinearRingPropertyType
MeasureListType
MeasureOrNilReasonListType
MeasureType
mediumAccessDeviceSecurityListingRefs_RelStructure
mediumApplicationInstanceRefs_RelStructure
mobilityServiceConstraintZoneRefs_RelStructure
mobilityServiceConstraintZones_RelStructure
ModalLinkRefByValue2Structure
monitoredCalls_RelStructure
NaturalLanguagePlaceNameStructure
navigationPathRefs_RelStructure
notices_RelStructure
observedPassingTimes_RelStructure
offeredTravelSpecifications_RelStructure
onlineServiceOperatorRefs_RelStructure
OpenTimeRangeStructure
OpenTimestampRangeStructure
openTransportModeRefs_RelStructure
organisationalUnits_RelStructure
parkingAreaCapacityAssignmentRefs_RelStructure
ParkingBayConditionRefStructure
parkingBayRefs_RelStructure
parkingLogEntries_RelStructure
parkingPrices_RelStructure
PassengerCarryingPassengerCarrying_ViewStructure
passengerEquipments_RelStructure
passengerJourneysInFrame_RelStructure
pathLinkRefs_RelStructure
PlaceLightingEquipmentRefStructure
PointArrayPropertyType
PointInSingleJourneyPathRefs_RelStructure
pointOfInterestRefs_RelStructure
pointsOnLinkInFrame_RelStructure
PoolOfVehiclesRefs_RelStructure
priceUnitRefs_RelStructure
purposesOfGroupingInFrame_RelStructure
quayRefs_RelStructure
QueueingEquipmentRefStructure
RampEquipmentRefStructure
RentalAvailabilityRefStructure
ResponsibilityRoles_RelStructure
retailConsortiumRefs_RelStructure
retailConsortiums_RelStructure
retailDeviceRefs_RelStructure
RetailDeviceSecurityListingRefs_RelStructure
routes_RelStructure
SalesNoticeAssignmentRefStructure
salesTransactions_RelStructure
scheduledStopPointRefs_RelStructure
SecurityListingRefs_RelStructure
securitylistRefs_RelStructure
securityLists_RelStructure
serviceAccessCodeRefs_RelStructure
serviceAccessRightRefs_RelStructure
simpleVehicleTypeRefs_RelStructure
singleJourneyPathRefs_RelStructure
SiriSchema
SitePathLinkRefStructure
specialServiceRefs_RelStructure
specialServices_RelStructure
SpecificParameterAssignmentRefStructure
StandardFareTableRefs_RelStructure
StartTimeAtStopPointRefStructure
StopPathLinkRefStructure
stopPlaces_RelStructure
stopPlaceVehicleEntrances_RelStructure
SubscriptionFilterStructure
SurfaceArrayPropertyType
taxiRankRefs_RelStructure
TaxiServicePlaceAssignmentRefs_RelStructure
topographicPlaces_RelStructure
TrainComponentLabelAssignmentRefs_RelStructure
transportOperatorsInFrame_RelStructure
TravelDocumentSecurityListingRefs_RelStructure
travelSpecificationRefs_RelStructure
turnaroundTimeLimitTimes_RelStructure
TypeOfAccessRightAssignmentRefs_RelStructure
TypeOfAccessRightAssignments_RelStructure
typeOfConcessions_RelStructure
typeOfCustomerAccountRefs_RelStructure
typeOfFacilityRefs_RelStructure
typeOfFareContractEntryRefs_RelStructure
typeOfFareContractRefs_RelStructure
typeOfFareProducts_RelStructure
typeOfFrameRefs_RelStructure
TypeOfMachineReadabilityRefs_RelStructure
TypeOfPricingRuleRefs_RelStructure
typeOfProductCategoryRefs_RelStructure
typeOfRetailDeviceRefs_RelStructure
typeOfsalesOfferPackageRefs_RelStructure
typeOfSecurityListRefs_RelStructure
typeOfServiceRefs_RelStructure
typeOfThingRefs_RelStructure
typeOfUsageParameters_RelStructure
typesOfAccountStatus_RelStructure
typesOfCustomerAccount_RelStructure
typesOfFacility_RelStructure
typesOfFareContractEntry_RelStructure
typesOfFareContract_RelStructure
typesOfRetailDevice_RelStructure
typesOfSalesOfferPackage_RelStructure
typesOfSecurityList_RelStructure
typesOfTravelDocuments_RelStructure
UicOperatingPeriodRefStructure
usageParameterPriceRefs_RelStructure
validityConditionRefs_RelStructure
validityParameterAssignmentsInFrame_RelStructure
validityRuleParameterRefs_RelStructure
validityRuleParameters_RelStructure
validityTriggerRefs_RelStructure
validityTriggers_RelStructure
vehicleAccessCredentialsAssignmentRefs_RelStructure
vehicleEntrances_RelStructure
vehicleJourneyHeadways_RelStructure
vehicleMeetingPointAssignmentRefs_RelStructure
vehicleMeetingPointRefs_RelStructure
vehicleMeetingPoints_RelStructure
vehiclePoolingDriverInfoRefs_RelStructure
VehiclePoolingPlaceAssignmentRefs_RelStructure
vehicleServicePlaceAssignmentRefs_RelStructure
VehicleSharingPlaceAssignmentRefs_RelStructure
vehicleTypeRefs_RelStructure
vehicleTypeStopAssignments_RelStructure
vehicleTypeZoneRestrictionRefs_RelStructure
versionsInFrame_RelStructure
whitelists_RelStructure
WsGetCapabilitiesRequestStructure
zoneRefs_RelStructure
Aurige commented

Huge list
Most are xxx_RelStructure ... This is part of the NeTEx XSD design rules, as explained in Part 1 "One-to-many relationships are implemented with an explicit data structure for each relationship. For example, the “StopPlace - quays - Quay” relationship is implemented with an explicit complex structure quays_relStructure."
So the xxx_RelStructure is generally automatically created weh you create xxx in order to use it inside relations

Same for xxxRefStructure (One-to-one relationships are implemented with the Ref mechanism indicated above. There is a data structure and element for referencing each element. For example, StopPointRef of type, StopPointRefStructure.)

This is the explanation... but we can still decide to remove the unused ones now.

@Aurige I don't understand why you would make a complex structure which is never referenced, hence also not within relationships. If the idea is 'future references' that is fine but I would like to make the distinction between intended and garbage.

Aurige commented

That's just the working process, when you create an new object you also create all the service stuff, it(s a kind of template. A bit like when you crate a Class in OO language, you often create all assessors, without knowing if they will be used or not.
But now that we are more stabilised, we can decide to remove all these still unused types.

I love to see the documentation of your template :-)

Aurige commented

It's in Part 1 document (as mentioned above) but can be complemented if needed ... but that's another topic
I will add this removal of unused types as a discussion point

Group decision: remove the bloat.

@skinkie How do we progress here?

We can start cleaning. But lets not do this before the rest is merged.