Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

At my institution, users affiliated with West Campus use Sirsi SingleSearch, and users affiliated with East Campus use Ex Libris MetaLib.

To handle our example scenario, we'll need two sets of XML configuration files, one for SingleSearch and one for MetaLib, as well as a site-specific implementation of the SiteOsidConfiguration API interface. The custom SiteOsidConfiguration implementation selects the appropriate configuration files at runtime, when the Citations Helper is invoked.

API Interface

The Citations code provides a Java interface that defines methods used by the Citations Helper to find appropriate configuration information for a given user. See:

    org.sakaiproject.citation.api.SiteOsidConfiguration

Implementations

Typically, a A SiteOsidConfiguration implementation will select a set of picks the proper XML configuration files for the current user, based on a that user's context : campus and course affiliations, guest status, etc.

To handle our example scenario, we'll need two sets of configuration information, one for SingleSearch and one for MetaLib, as well as a site-specific implementation of the SiteOsidConfiguration API interface. The SiteOsidConfiguration implementation selects the appropriate configuration files at runtime, when the Citations Helper is invoked.

Default Implementation

The default SiteOsidConfiguration API implementation provided with the Citations Helper is available here:

...

  1. Which Sakai properties need to be overridden for this user?
    • The Java code returns a path to an the name of XML file that describes the parameter values to override. Return proper configuration – return null to use the file specified by the following property:
      • configXmlCache@org.sakaiproject.citation.api.ConfigurationService=<XML file>
        • The default value for this property is config.xml
    • XML configuration files are discussed below.
    • See getConfigurationXml() in SampleSiteOsidConfiguration.
  2. Which databases are available to this user?
    • The Java code returns the path to name of an XML file that describes the database hierarchy to the Citations Helper. Return – return null to use the file specified by the following property:
      • databaseXmlCache@org.sakaiproject.citation.api.ConfigurationService=<XML file>
        • The default value for this property is categories.xml
    • The Search Categories & Databases XML page has documentation on how to build this XML file.
    • See getDatabaseHierarchyXml() in SampleSiteOsidConfiguration.
  3. What groups (if any) does this user belong to?
    • Groups can come into play when the Citation Helper decides which portions of the database hierarchy are available to the current user. In the Search Categories & Databases XML documentation, you will see that each defined database can have associated database-groups.
    • See getGroupIds() in SampleSiteOsidConfiguration.

Custom Implementation

A custom (site specific) SiteOsidConfiguration implementation needs to make the same decisions outlined above.

It is probably may be easiest to update modify the default implementation, SampleSiteOsidConfiguration, with any changes necessary required to address the needs at your site. Your updated code can be compiled and deployed using the normal Citations build procedure.

...