Drupal's internal naming convention for fields and entities differs from the naming convention used by OFDS. To preserve traceability and simplify attribute-to-entity mapping between the two schemas, the following prefixing rules will be applied to all field machine names in the Commons Database:

PrefixMeaningExample
(none)Native Drupal fields (internally stored with Drupal's own field_ machine-name prefix)field_title, field_status
ofdsAttributes taken directly from the OFDS schemaOFDS collectionDatefield_ofds_collectiondate
commonsAttributes added to extend OFDS and implement full last-mile / community-network functionalityfield_commons_devicetype
Back to top

Rationale

Every Drupal field already carries a system-level field_ prefix as part of its machine name, regardless of its origin. Layering a second, semantic prefix on top of that (ofds or commons) turns the machine name itself into a lightweight index of provenance: anyone inspecting the schema — via the UI, the REST/JSON:API output, or the database — can immediately tell whether an attribute originates from the OFDS standard, was extended by the Commons project, or is a plain Drupal-native field, without needing to cross-reference external documentation first.

This convention is applied consistently at the attribute level. For instance, the OFDS property collectionDate is implemented as the Drupal field field_ofds_collectiondate; an attribute needed for last-mile modeling that has no OFDS equivalent, such as a device type classification, is implemented as field_commons_devicetype.

Note that some fields may come also either from OFS and commons, but when an attribute maps directly to a native drupal field, will not have a prefix.

Back to top

Entity-Level Mapping Documentation

For each entity in the schema, a mapping table will be documented that lists every field's Drupal machine name alongside its corresponding OFDS property (where applicable), its data type, and a short description of its purpose. This mapping serves as the authoritative cross-reference between the Drupal implementation and the OFDS specification, and will be kept up to date as the schema evolves or as new commons_-prefixed extensions are introduced.

Back to top

Separation of Internal Naming and User-Facing Labels

This prefixing scheme is strictly an internal convention, governing machine names, API field keys, and schema documentation. It is not intended to be exposed to end users. For display purposes — in the UI, on public-facing pages, or in exported reports — each field will instead use a human-readable label, translated into the appropriate language for the audience viewing it, independent of its underlying ofds/commons/native machine name.

Back to top
Enviado por webmestre el