Skip to content

Refine the reverse-link names in #97 - #110

Open
apdavison wants to merge 2 commits into
openMetadataInitiative:lzehl_addReverseLinkNamesfrom
apdavison:add-reverse-link-names
Open

Refine the reverse-link names in #97#110
apdavison wants to merge 2 commits into
openMetadataInitiative:lzehl_addReverseLinkNamesfrom
apdavison:add-reverse-link-names

Conversation

@apdavison

@apdavison apdavison commented Sep 11, 2026

Copy link
Copy Markdown
Member

This builds on #97. It keeps the principle of having one reverse name per property, but proposes some refinements to the names themselves.

Principles

These changes are mostly based on the following principles, with a few justified exceptions.

P1. Do not repeat the type in the name of its own property, unless no meaningful alternative exists.

46 of the names in #97 are exact self-repeats: Handedness.isHandednessOf, License.isLicenseOf, Person.isPersonOf, AnatomicalAxesOrientation.isAnatomicalAxesOrientationOf. The reader already knows the type, whether querying in the KG Query Builder or using fairgraph; the more useful information is what lies at the other end of the link.

The "meaningful alternative" qualifier is important. 37 of the 46 exact repeats are changed here, and 24 of a further 37 partial repeats; 9 and 13 respectively are left alone, because their far end mixes unrelated types and no single name describes what the reverse returns: Laterality.isLateralityOf reaches both annotations and tissue samples, DataType.isDataTypeOf reaches ContentType, DatasetVersion and File, and Technique.isTechniqueOf reaches seven computational activities plus Protocol and DatasetVersion. Where there is no coherent far end, is<X>Of remains the only stable choice.

Where the far end is coherent, the reverse is named for it. Fifteen of the changes take the form appliesTo<FarEnd> (Handedness.appliesToSubjectState, MRIWeighting.appliesToMRIScannerUsage), and others take a more specific verb than "applies" where the relation has an obvious one (configures, runs, usedForComputation, insulates, containsLocation).

Where the far-end types belong to an openMINDS category (researchProduct, computationalActivity, chemicalProduct) I've used the category name, e.g., appliesToResearchProductVersion. Where a property could plausibly widen in a future openMINDS revision I've also used category-based names. For example, language (English, German, Chinese) is reached only from SoftwareVersion today, but I can imagine adding language to other research products, so I propose calling the reverse appliesToResearchProductVersion instead of appliesToSoftwareVersion for the sake of future-proofing.

I also note that the forward vocabulary almost never uses the is<X>Of construction. Of the 441 distinct forward property names across v4.0 and v5.0, only five have this form (isPartOf, isVersionOf, isNewVersionOf, isVariantOf, isAlternativeVersionOf) and all five name structural relations between parts or versions, where "of" genuinely is the relation. Nothing on the forward side is called isSpeciesOf or isLicenseOf. #97 applies the construction to 90% of reverse names in use (299 of 332). This PR reduces that to 64%, but is<X>Of is still needed for a majority of reverse property names.

P2. Use has for possession, not as a past-tense marker.

hasPerformed, hasStarted, hasGenerated, hasInformed and hasInspired become the bare past participle (performed, etc). hasPart, hasMember, hasVersion, hasChild and the other possessive uses are untouched.

A corollary: has<Noun> promises that a <Noun> is what the reverse returns. It works where the type exists — hasMembership returns Membership, hasAffiliation returns Affiliation — and misleads where it does not. hasImplementation would return SoftwareVersion (openMINDS has no Implementation type), so isImplementedBy is proposed instead; the schema's own instruction for that property reads "Add all interface versions that are implemented by this software version". The same test rejects hasDependent, which returns the research-product versions, and hasMeasurement, which returns devices and collides with the real Measurement type.

P3. Past tense for events, present for standing states.

Metadata outlives the activity it describes: a grant that ended in 2019 no longer funds anything, but it funded something permanently. Hence funded, developed, edited, published, manufactured, emitted; and identifies, specifies, configures for relations that hold as long as both nodes do.

P4. Reverse names stay singular.

This ollows the general rule for property names, with the same exception the forward vocabulary already makes for a tuple of genuinely distinct values (Trapezoid.baseLengths, the major and minor bases; ElectrodeArrayUsage.contactResistances, one per electrode in order). A reverse link returns a homogeneous collection rather than a tuple, so every name here is singular.

The changes

(Note: these tables are wide, you'll probably need to scroll horizontally)

(P1) The reverse name repeats the type it lives on

Exact repeats (Handedness.isHandednessOf) and partial ones (ModelAbstractionLevel.isAbstractionLevelOf).
Two further self-repeats, diseaseModel and contribution, are listed under Inaccurate below, where the stronger argument lies.

forward property reverse lives on points to #97 proposed
MRIWeighting MRIWeighting MRIScannerUsage isMRIWeightingOf appliesToMRIScannerUsage
MTPulseShape PulseShape MRIScannerUsage isPulseShapeOf appliesToMRIScannerUsage
abstractionLevel ModelAbstractionLevel Model isAbstractionLevelOf appliesToModel
accessibility Accessibility +1 AnatomicalAtlasVersion +13 isAccessibilityOf appliesToResearchProductVersion
ageCategory AgeCategory SubjectGroupState +1 isAgeCategoryOf appliesToSubjectState
anatomicalAxesOrientation AnatomicalAxesOrientation CommonCoordinateFrameworkVersion +3 isAnatomicalAxesOrientationOf isOrientationOf
applicationCategory SoftwareApplicationCategory SoftwareVersion isApplicationCategoryOf appliesToSoftwareVersion
attribute SubjectAttribute +1 SubjectGroupState +3 isAttributeOf appliesToSpecimenState
breedingType BreedingType Strain isBreedingTypeOf appliesToStrain
channel AccessChannel +1 Accessibility +1 isChannelOf appliesToAccessibility
communicationProtocol CommunicationProtocol Interface isCommunicationProtocolOf usedByInterface
configuration Configuration +3 Environment +3 isConfigurationOf configures
constructionType CranialWindowConstructionType CranialWindowPreparation isConstructionTypeOf appliesToCranialWindowPreparation
contactInformation ContactInformation Consortium +1 isContactInformationOf appliesToLegalPerson
contentType ContentType ContentTypePattern isContentTypeOf contentTypePattern
contentTypePattern ContentTypePattern FileRepository isContentTypePatternOf definesContentTypeFor
cultureType CellCultureType TissueCulturePreparation isCultureTypeOf appliesToTissueCulturePreparation
deviceType DeviceType Electrode +3 isDeviceTypeOf appliesToDevice
educationalLevel EducationalLevel LearningResource isEducationalLevelOf appliesToLearningResource
eligibility AccessEligibilityType Accessibility isEligibilityOf appliesToAccessibility
environment Environment +2 DataAnalysis +7 isEnvironmentOf usedForComputation
ethicsAssessment EthicsAssessment DatasetVersion isEthicsAssessmentOf appliesToResearchProductVersion
experimentalApproach ExperimentalApproach DatasetVersion isExperimentalApproachOf appliesToDatasetVersion
fatSuppressionTechnique MRIFatSuppressionTechnique MRIScannerUsage isFatSuppressionTechniqueOf appliesToMRIScannerUsage
feature SoftwareFeature SoftwareVersion isFeatureOf appliesToSoftwareVersion
fileRepository FileRepository File isFileRepositoryOf file
form AccessForm Accessibility isFormOf appliesToAccessibility
funding Funding AnatomicalAtlasVersion +16 isFundingOf funded
geneticStrainType GeneticStrainType Strain isGeneticStrainTypeOf appliesToStrain
handedness Handedness SubjectGroupState +1 isHandednessOf appliesToSubjectState
hasEntity ParcellationEntity +1 ParcellationTerminology +1 isEntityOf appliesToParcellationTerminology
interfaceType CommunicationInterfaceType Interface isInterfaceTypeOf appliesToInterface
language Language SoftwareVersion isLanguageOf appliesToResearchProductVersion
license License +1 Book +12 isLicenseOf isAppliedTo
measuredQuantity MeasuredQuantity Measurement isMeasuredQuantityOf appliesToMeasurement
molecularEntity MolecularEntity ChemicalSubstance isMolecularEntityOf composes
mountingType DeviceMountingType MRICoil isMountingTypeOf appliesToDevice
operatingDevice OperatingDevice SoftwareVersion isOperatingDeviceOf runs
operatingSystem OperatingSystem SoftwareVersion isOperatingSystemOf runs
organization Organization Affiliation isOrganizationOf hasAffiliation
parallelAcquisitionTechnique MRIParallelAcquisitionTechnique MRIScannerUsage isParallelAcquisitionTechniqueOf appliesToMRIScannerUsage
paymentModel PaymentModelType Accessibility isPaymentModelOf appliesToAccessibility
person Person Affiliation isPersonOf hasAffiliation
preparationType PreparationType DatasetVersion isPreparationTypeOf appliesToDatasetVersion
process AccessProcessType Accessibility isProcessOf appliesToAccessibility
productSource ProductSource ChemicalMixture +1 isProductSourceOf appliesToChemicalProduct
programmingLanguage ProgrammingLanguage SoftwareVersion isProgrammingLanguageOf usedInSoftwareVersion
publicationStatus PublicationStatus AnatomicalAtlasVersion +9 isPublicationStatusOf appliesToResearchProductVersion
qualitativeOverlap QualitativeOverlap QualitativeRelationAssessment isQualitativeOverlapOf appliesToAssessment
reference AgeReference SpecimenAge isReferenceOf appliesToSpecimenAge
reinforcementType CranialWindowReinforcementType CranialWindowPreparation isReinforcementTypeOf appliesToCranialWindowPreparation
signalDirectionality SignalDirectionality MRICoilUsage isSignalDirectionalityOf appliesToMRICoilUsage
spatialEncoding SpatialEncoding MRIScannerUsage isSpatialEncodingOf appliesToMRIScannerUsage
spoilingTechnique MRISpoilingTechnique MRIScannerUsage isSpoilingTechniqueOf appliesToMRIScannerUsage
status ActionStatusType DataAnalysis +6 isStatusOf appliesToComputation
stimulation StimulationApproach +1 BehavioralProtocol isStimulationOf appliesToProtocol
stimulus EphysStimulus StimulationActivity isStimulusOf isStimulusFor
stimulusType AuditoryStimulusType +6 BehavioralProtocol +1 isStimulusTypeOf appliesToProtocol
typeOfUncertainty TypeOfUncertainty QuantitativeValue +1 isTypeOfUncertaintyOf appliesToValue
variation PatchClampVariation CellPatching isVariationOf appliesToCellPatching

(P2 / P3) The name should be a verb, in the right tense

forward property reverse lives on points to #97 proposed
author Consortium +2 Book +11 isAuthorOf authored
commenter Person Comment isCommenterOf commented
coordinator Consortium +2 Project isCoordinatorOf coordinatedProject
country SovereignState Location isCountryOf containsLocation
cultureMedium ChemicalMixture TissueCulturePreparation isCultureMediumOf usedForTissueCulture
deliveredBy ElectrodeArrayUsage +5 EphysStimulus hasDelivered deliveredStimulus
developer Consortium +2 MetaDataModel +11 isDeveloperOf developed
digitalIdentifier DOI +11 AnatomicalAtlas +37 isDigitalIdentifierOf identifies
editor Person Book +3 isEditorOf edited
emitter Organization GenericIdentifier isEmitterOf emitted
environmentVariable PropertyValueList LaunchConfiguration isEnvironmentVariableOf definesEnvironmentOf
fulfilledBy Configuration +4 Dependency hasFulfilled fulfils
fullDocumentation DOI +3 BrainAtlasVersion +9 isFullDocumentationOf fullyDocuments
generatedBy ElectrodeArrayUsage +5 EphysStimulus hasGenerated generated
inspiredBy File AtlasAnnotation +1 hasInspired inspired
insulatorMaterial ChemicalMixture +2 Electrode +1 isInsulatorMaterialOf insulates
labelingCompound ChemicalMixture +2 PipetteUsage isLabelingCompoundOf usedToLabel
manufacturer Consortium +2 Electrode +4 isManufacturerOf manufactured
performedBy Person +1 CellPatching +16 hasPerformed performed
publisher Consortium +2 Book +3 isPublisherOf published
specification Configuration +4 AtlasAnnotation +4 isSpecificationOf specifies
startedBy Person +1 DataAnalysis +7 hasStarted started
studyTarget AnatomicalCavity +36 CellPatching +19 isStudyTargetOf studiedIn
wasInformedBy DataAnalysis +6 DataAnalysis +6 hasInformed informed

Inaccurate or ambiguous

The name asserts something the schema does not, or does not say what the reverse returns

forward property reverse lives on points to #97 proposed why
chemicalProduct ChemicalMixture +2 AmountOfChemical isChemicalProductOf usedInAmount the substance is not a product of the amount
contribution Contribution +2 AnatomicalAtlas +32 isContributionOf contributedTo Person.isContributionOf asserts that a person is a contribution: see the note below
contributor Consortium +2 Contribution isContributorOf contribution reads backwards, as member does: a person is not a contributor of a contribution record, they are the contributor named in it
dependsOn AnatomicalAtlasVersion +6 ServiceDeployment hasDependent isDependencyOf "dependent" and "dependency" are easy to confuse, and the bare word "dependent" appears nowhere else in openMINDS
diseaseModel Disease +1 Strain isDiseaseModelOf isModeledBy the reverse lands on Disease, so isDiseaseModelOf asserts that the disease is the model — it is the strain that is
holder Consortium +2 Copyright isHolderOf holdsCopyright holder of what? The reverse returns Copyright records
launchConfiguration LaunchConfiguration DataAnalysis +6 isConfiguredBy configures isConfiguredBy inverts the direction — the reverse lives on LaunchConfiguration, which configures rather than is configured
measuredWith ElectrodeArrayUsage +3 Measurement hasMeasurement usedToMeasure the device did not have a measurement, and the name collides with the Measurement type
member Consortium +2 Membership isMemberOf hasMembership reads backwards: a consortium is not a member of a membership record, it has one
obtainedWith ElectrodeArrayUsage +5 GridImage +4 hasObtained usedToObtain the device did not obtain anything
recordedWith ElectrodeArrayUsage +3 Recording hasRecord usedToRecord "record" as a noun is a different concept from the act of recording

Note on contribution. The property is used two ways in v5. Twenty-six research-product types embed a Contribution record, while seven device types (Electrode, ElectrodeArray, MRICoil, MRIScanner, Pipette, SlicingDevice and HardwareProduct) link straight to Person/Organization. A single reverse name has to serve both, so #97's lands on Person and Organization as well as on Contribution. It is correct on Contribution (Contribution.isContributionOf → [DatasetVersion, …]) and false on the other two (Person.isContributionOf → [MRIScanner, …]). contributedTo is true on all three.

Miscellaneous

Names that are more meaningful and/or are shorter.

forward property reverse lives on points to #97 proposed
conductorMaterial ChemicalMixture +2 Electrode +1 isConductorMaterialOf isConductorOf
defaultImage File CommonCoordinateFrameworkVersion +3 isDefaultImageOf isDefaultImageFor
failureImpact DependencyImpact Dependency isFailureImpactOf isImpactOf
implements InterfaceVersion SoftwareVersion hasImplementation isImplementedBy
preferredDisplayColor Colormap +1 ViewerSpecification isPreferredDisplayColorOf preferredBy
previewImage File ServiceLink isPreviewImageOf isPreviewOf
previousRecording Recording Recording hasSubsequentRecording nextRecording
specialUsageRole FileUsageRole File +1 isSpecialUsageRoleOf appliesToFile
structurePattern FileRepositoryStructure FileRepository isStructurePatternOf repository
studiedSpecimen Subject +7 DatasetVersion isStudiedSpecimenOf hasStudyResultsIn
studiedState SubjectGroupState +3 Subject +3 isStudiedStateOf isStateOf

One gap that will remain after rebasing onto main

main has moved since this branch diverged, one change interacts with this PR: previousRegularTimeSeries was added to main after the branch point, carries an asEdge block with nameForReverseLink: null, and is live in v5.0 on RegularTimeSeries. #97 never saw it, so it will still be null after merging.

Suggested: nextRegularTimeSeries, matching the previousRecording → nextRecording proposed above.

It is not included here because the property does not exist on this branch, so there is nothing to edit. I suggest opening a small follow-up PR after #97 has landed in "main".

Changes 106 nameForReverseLink values, based on the following principles:

P1. Do not repeat the type in the name of its own property unless no meaningful alternative name exists. 46 reverse names in the original PR repeat the type they land on exactly (Handedness.isHandednessOf, License.isLicenseOf, Person.isPersonOf, AnatomicalAxesOrientation.isAnatomicalAxesOrientationOf) and a further 37 repeat part of it (ModelAbstractionLevel.isAbstractionLevelOf, SoftwareApplicationCategory.isApplicationCategoryOf). 37 of the exact repeats and 24 of the partial ones are changed here; the remaining 9 and 13 are left as they are, because their far end mixes unrelated types and no single name describes what the reverse returns (Laterality.isLateralityOf reaches annotations and tissue samples; DataType.isDataTypeOf reaches ContentType, DatasetVersion and File).

Where the far end is coherent, the reverse is named for it. 45 names take the form appliesTo<FarEnd> for controlled terms (Handedness.appliesToSubjectState, MRIWeighting.appliesToMRIScannerUsage), and a plain verb is used where the relation has one, which takes precedence over appliesTo: SovereignState.containsLocation, ChemicalMixture.insulates, OperatingSystem.runs, Configuration.configures. Where a property could plausibly widen later the name follows the category rather than the class, so language becomes appliesToResearchProductVersion rather than appliesToSoftwareVersion.

P2. Use "has" only for possession, not as a past-tense marker. hasPerformed, hasStarted, hasGenerated, hasInformed and hasInspired become the bare past participle. hasPart, hasMember, hasVersion, hasChild, and the other possessive uses are unchanged.

P3. Prefer the past tense for events and the present tense for standing states, because metadata outlives the activity it describes: a grant that has ended no longer funds anything, but it funded something permanently. Hence funded, developed, edited, published, manufactured, emitted for events, and identifies, specifies, configures for relations that hold as long as both nodes do.

P4. Keep reverse names singular, as for forward property names, with the same exception the forward vocabulary makes for a tuple of genuinely distinct values (Trapezoid.baseLengths). A reverse link returns a homogeneous collection, so every name here is singular.

The remaining changes are individual, and are mostly cases where the current name is inaccurate rather than merely mechanical: isConfiguredBy on LaunchConfiguration inverts the direction of the relation; isDiseaseModelOf lands on Disease and asserts that the disease is the model, when the strain is; isContributionOf lands on Person and asserts that a person is a contribution; hasMeasurement names a device and collides with the Measurement type. Finally, isFileRepositoryOf on FileRepository is verbose: the resolved array will be the files contained in the repository, so `file` (plural "files" in fairgraph) is a much clearer name.

Two properties that we may wish to merge in v6, dependency and dependsOn, are given the same reverse name isDependencyOf rather than divergent ones.

The per-property rationale will be in the pull request description.
@apdavison
apdavison requested a review from lzehl September 11, 2026 21:29
@apdavison apdavison added the enhancement New feature or request label Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant