Implement an authority provider

An authority connects a worldview identity to a governed vocabulary. The provider owns lookup and normalization. The worldview chooses its local binding name and the identity concept that anchors the results. Separating those decisions lets two projects use different editions or naming conventions without conflating their identities.

Design one binding

  1. Generate a component with the authority template enabled. Implement the public org.integratedmodelling.klab.api.services.Authority contract and use the extension registration supplied by the template.
  2. In configure(ConfigurationRequest), validate the provider URN, edition, endpoint and supported options. Return an opaque configuration ID. Keep configuration and its caches independent for each binding. The Reasoner handles reserved codelist namespace mappings before calling the provider.
  3. In resolveIdentity(configurationId, identityId), return an identity with its canonical ID, label and documented semantic relationships. Preserve the external vocabulary's edition and distinguish a missing entry from a provider failure.
  4. Advertise search or reconciliation only when implemented. Each candidate from search should resolve by its ID in the same configuration. reconcile can accept disambiguating evidence and should report ambiguity when it cannot identify a unique match.
  5. Release binding-specific resources in releaseConfiguration. An invalid or expired handle must never return another binding's cached answer.

Exercise the contract with a concrete case

The WRB implementation works from bundled vocabulary tables, which makes it a useful offline example. Its provider URN is klab.authority.wrb.authority; the worldview-local name below is WRB. A worldview author can declare this binding in the owning soil ontology:

identity SoilType requires authority WRB {
    urn: "klab.authority.wrb.authority",
    edition: "2022-2024",
    codelists: {
        groups: "soil.groups"
    }
};

Test that LV resolves to the generic Luvisol group and that a valid qualified expression retains its extra qualifications. Test ambiguity and invalid input separately. Add a second binding and confirm that releasing the first leaves the second usable. For a network-backed authority, also test source unavailability and ensure an outage cannot be recorded as an empty successful search.

Use the taxonomic provider as a second design reference when identifiers are unique only within a dataset release. The UN provider is useful when one binding selects one concept scheme. In both cases, record the binding parameters with example identities so a modeler can repeat the lookup. User guide to authorities ยท WRB provider