samvera / questioning_authority

Question your authorities
Other
54 stars 30 forks source link

Allow config of extended context to limit it to specified subauths #268

Open elrayle opened 4 years ago

elrayle commented 4 years ago

Description

Allow extended context property configurations to limit inclusion based on subauthority.

Rational

For some authorities, different entity types (typically represented as a subauthority) can use completely different ontologies (rare) or at the least not support the same set of predicates for each entity type. It is desirable to have more control over which predicate values are included in the extended context for each subauthority.

Proposed property configs

Example: Include this predicate for all subauthorities because it is missing the subauth config. This provides backward compatibility.

        {
          "property_label_default": "Preferred label",
          "property_label_i18n": "qa.linked_data.authority.locnames_ld4l_cache.type_label",
          "ldpath": "rdfs:label :: xsd:string",
          "selectable": true,
          "drillable": false
        },

Example: Include this predicate for person and organization subauthorities only because the config has subauth: ["person", "organization"].

        {
          "property_label_default": "Descriptor",
          "property_label_i18n": "qa.linked_data.authority.locnames_ld4l_cache.type_label",
          "ldpath": "madsrdf:entityDescriptor/madsrdf:authoritativeLabel :: xsd:string",
          "selectable": false,
          "drillable": false,
          "subauth": ["person", "organization"]
        },