Class OpenSearchResource

java.lang.Object
io.goobi.viewer.api.rest.v1.search.OpenSearchResource

@Path("/opensearch") public class OpenSearchResource extends Object
REST resource providing OpenSearch protocol endpoints for search and auto-suggest functionality.

The endpoint URL is referenced in the header of the viewer theme's template.html. Returns the XML document from /resources/opensearch/opensearch.xml.

  • Constructor Details

    • OpenSearchResource

      public OpenSearchResource()
  • Method Details

    • getXml

      @GET @Produces("text/xml") public String getXml()
      Builds the OpenSearch description document for this viewer instance.

      Placeholder tokens in the underlying opensearch.xml template are substituted with the configured application name, description, and the request's application URL; {resourceUrl:...} tokens are resolved via the session's navigation helper when available, otherwise against the configured theme path. If the template cannot be read or parsed, the error is logged and no content is returned.

      Returns:
      the OpenSearch description document as an XML string