- Introduced the ImageTilingServiceEndpoint class for tiled high-resolution image delivery, including deep-zoom and transformation capabilities, with multilingual descriptions and structured aliases. - Archived the ID class as a backwards-compatible alias for Identifier, marking it as deprecated to enforce the use of the canonical Identifier model.
2.7 KiB
2.7 KiB
Rule: Slot Nouns Must Be Singular
🚨 CRITICAL: LinkML slot names MUST use singular nouns, even for multivalued slots. The multivalued: true property indicates cardinality, not the slot name.
Rationale
- Predicate semantics: Slots represent predicates/relationships. In RDF,
hasCollectioncan have multiple objects without changing the predicate name. - Consistency: Singular names work for both single-valued and multivalued slots.
- Ontology alignment: Standard ontologies use singular predicates (
skos:broader,org:hasMember,rico:hasOrHadHolder). - Readability:
custodian.has_or_had_custodian_typereads naturally as "custodian has (or had) custodian type".
Correct Pattern
slots:
has_or_had_custodian_type: # ✅ CORRECT - singular noun
slot_uri: org:classification
range: CustodianType
multivalued: true # Cardinality expressed here, not in name
has_or_had_collection: # ✅ CORRECT - singular noun
slot_uri: rico:hasOrHadPart
range: CustodianCollection
multivalued: true
has_or_had_member: # ✅ CORRECT - singular noun
slot_uri: org:hasMember
range: Custodian
multivalued: true
Incorrect Pattern
slots:
has_or_had_custodian_types: # ❌ WRONG - plural noun
multivalued: true
collections: # ❌ WRONG - plural noun
multivalued: true
members: # ❌ WRONG - plural noun
multivalued: true
Migration Examples
| Old (Plural) | New (Singular) |
|---|---|
custodian_types |
has_or_had_custodian_type |
collections |
has_or_had_collection |
identifiers |
identifier |
alternative_names |
alternative_name |
staff_members |
staff_member |
Exceptions
Compound concepts where the plural is part of the concept name itself:
archives_regionales- French administrative term (proper noun)united_states- Geographic proper noun
NOT exceptions (still use singular):
has_or_had_identifiernothas_or_had_identifiers(even if institution has multiple)broader_typenotbroader_types(even if multiple broader types)
Implementation
When creating or renaming slots:
- Extract the noun from the slot name
- Convert to singular form
- Combine with relationship prefix (
has_or_had_,is_or_was_, etc.) - Set
multivalued: trueif multiple values are expected
See Also
.opencode/rules/slot-naming-convention-current-style.md- Current slot naming patterns.opencode/rules/slot-centralization-and-semantic-uri-rule.md- Slot centralization requirements