Class AuthorityResource

java.lang.Object
io.goobi.viewer.api.rest.v1.authorities.AuthorityResource

@Path("/authority") public class AuthorityResource extends Object
REST resource for resolving authority records and retrieving metadata from linked data sources.
Author:
Florian Alpers
  • Constructor Details

    • AuthorityResource

      public AuthorityResource()
  • Method Details

    • getIdentity

      @GET @Path("/resolver") @Produces("application/json") public String getIdentity(@QueryParam("id") String inUrl, @QueryParam("template") String template, @QueryParam("lang") String lang) throws de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException, PresentationException
      Resolves an authority (normdata) record identified by the given URL and returns its metadata as JSON.

      The url may append a second, $-separated segment. Whenever the first url points to viaf.org, the authority record resolved from it is added as a cross-reference entry; a second segment additionally contributes the VIAF cluster url. Depending on template, either every available field is returned (no template, _DEFAULT, _ALL, or an unconfigured template name), or only the fields configured for that template, always excluding the raw GND URI field from the templated output.

      Parameters:
      inUrl - identifier url of the resource
      template - metadata template to use
      lang - language to use for metadata fields
      Returns:
      the resolved normdata as a JSON array string
      Throws:
      de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException - if no authority record is found for the given url
      PresentationException - if a class-linkage error (NoSuchMethodError) prevents building the JSON response