Skip to content

feat(edint-aparcamiento): add 5 candidate models for parking - #8

Open
albertoabellagarcia wants to merge 1 commit into
masterfrom
edint-aparcamiento-candidates
Open

feat(edint-aparcamiento): add 5 candidate models for parking#8
albertoabellagarcia wants to merge 1 commit into
masterfrom
edint-aparcamiento-candidates

Conversation

@albertoabellagarcia

Copy link
Copy Markdown
Contributor

Summary

Translates the EDINT Parking Ontology (v0.1.0) from
https://github.com/EDINT-Ontologia/edint-ontologia-aparcamiento — on-street
and off-street public/private parking, fees, individual spots, and spot
groupings by permit type or vehicle type. Closely related to
edint-infraestructura (Parking subClassOf Facility, explicitly stated by
the source: "Parking facilities are part of the city's infrastructure...
their access points are represented as a relationship to the
infrastructure's sensor representation"), edint-zona-regulatoria
(RegulatedParkingZone is one of its 22 RegulatedZone subtypes), and
edint-censo-vehiculos (reuses its VehicleType/VehiclePermitType
controlled vocabularies).

Five entities

  • Parking: collapses the source's two concrete subclasses
    (OnStreetParking/OffStreetParking) into one entity with a parkingType
    discriminator — bare Parking is never directly instantiated in the
    source's own real example data, and OnStreetParking's only distinguishing
    property (isPartOfZone) is small enough to keep as an always-optional
    field rather than a second entity type. Inherits edint-infraestructura's
    full Facility property set, confirmed by the source's own real examples
    using several of them directly (belongsTo, containsFacility,
    hasInfrastructureType, hasObservationPoint, hasRegisteredOwner,
    address, openingHours).
  • ParkingFee, ParkingSpot: thin entities, no source-declared
    properties of their own (same treatment as edint-infraestructura's
    ObservationPoint/edint-zona-regulatoria's RegulatedZone/
    CadastralProperty).
  • ParkingSpotsByPermitType, ParkingSpotsByVehicleType: group
    individual spots and carry the vocabulary-backed enums.

All 5 examples are grounded in the source's own real examples/example.ttl
(5 real Madrid/Zaragoza parking instances).

Two source ontology bugs found, worked around rather than copied literally

  • permitType's rdfs:domain is declared as ParkingSpotsByVehicleType,
    not ParkingSpotsByPermitType — almost certainly a copy-paste error given
    the property's own name and comment ("group of places by TYPE OF PERMIT").
  • vehicleType has no rdfs:domain declared at all.

Copying either literally would produce a nonsensical schema
(ParkingSpotsByVehicleType with a permitType property and no
vehicleType anywhere), so both are assigned per their evident intent
instead. Flagged for the EDINT maintainers, not silently papered over.

⚠️ Known issue, not resolved here (see standard-metadata.yaml)

Same pattern as RegulatedZone/Vehicle in prior PRs: edint-infraestructura
already has its own thin Parking entity from its first translation pass
("modeled as a thin Facility specialization... no attributes of its own").
This candidate's much fuller Parking reuses the same entity type name with
a different property set — a real NGSI-LD type collision, left unresolved
here per the same reasoning already applied to the two prior cases (most
likely resolution: replace the thin stub with this one).

Testing

  • All schema.json/context.jsonld/example files parse as JSON, all 5
    example.json validate against their own schema.json.
  • standard-metadata.yaml parses as YAML.
  • Candidates index regenerated.

Note: based on current master, which doesn't yet include the still-open
#6 (edint-zona-regulatoria) or #7 (edint-censo-vehiculos) — no dependency
between any of them.

Translates the EDINT Parking Ontology (v0.1.0), covering on-street
and off-street public/private parking, fees, individual spots, and
spot groupings by permit type or vehicle type.

Parking collapses the source's two concrete subclasses
(OnStreetParking/OffStreetParking) into one entity with a parkingType
discriminator, since bare Parking is never directly instantiated in
the source's own real example data and the only distinguishing
property (isPartOfZone) is small enough to keep as an always-optional
field. Parking inherits edint-infraestructura's full Facility
property set, confirmed by the source's own real examples using
several of them directly (belongsTo, containsFacility,
hasInfrastructureType, hasObservationPoint, hasRegisteredOwner,
address, openingHours).

ParkingFee and ParkingSpot are thin entities (no source-declared
properties). ParkingSpotsByPermitType/ByVehicleType group individual
spots and reuse edint-censo-vehiculos's VehicleType/VehiclePermitType
controlled vocabularies.

Real example data used throughout, grounded in the source's own
examples/example.ttl (5 real Madrid/Zaragoza parking instances).

Known issues, documented in standard-metadata.yaml and left
unresolved per this candidate family's established pattern: a type
collision with edint-infraestructura's existing thin "Parking" stub
(same as the RegulatedZone/Vehicle situations already flagged in
prior PRs), and two apparent domain-declaration bugs in the source
ontology (permitType/vehicleType) worked around rather than copied
literally.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant