en:user_advanced:oai
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:user_advanced:oai [2014/11/03 00:27] – external edit 127.0.0.1 | en:user_advanced:oai [2023/03/13 01:46] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | |||
+ | |||
====== OAI ====== | ====== OAI ====== | ||
The [[http:// | The [[http:// | ||
Line 20: | Line 23: | ||
^Option^Description^ | ^Option^Description^ | ||
|Source URL ('' | |Source URL ('' | ||
- | |Metadata prefix ('' | + | |Metadata prefix ('' |
|Restrict to set ('' | |Restrict to set ('' | ||
|Get document ('' | |Get document ('' | ||
- | |Only include file types ('' | + | |Only include file types ('' |
|Max records ('' | |Max records ('' | ||
Line 46: | Line 49: | ||
then Greenstone downloads the page and scans though it looking for '' | then Greenstone downloads the page and scans though it looking for '' | ||
- | ===== Serving OAI Data using Greenstone===== | + | ==== Downloading on the command line ==== |
- | Greenstone comes with a built-in | + | You can also download |
- | <TABAREA tabs=" | + | |
- | < | + | |
- | ====The Greenstone3 OAI server==== | + | |
- | The Greenstone3 OAI data provider facility comes enabled by default. It runs as a servlet called " | + | |
- | by replacing library with oaiserver. For example, ''< | + | |
- | + | ||
- | ==== Configuration ==== | + | |
- | Configuration is done via the files: | + | |
- | + | ||
- | ===OAIConfig.xml=== | + | |
- | + | ||
- | This file specifies general information about the repository and can be found in '' | + | |
- | + | ||
- | Please modify this file and enter the correct values for repositoryName and repositoryIdentifier. | + | |
- | Other values may be modified as needed. The following table lists important configuration | + | |
- | options in '' | + | |
- | + | ||
- | ^ Configurations in OAIConfig.xml | + | |
- | |''< | + | |
- | |''< | + | |
- | |''< | + | |
- | |''< | + | |
- | |''< | + | |
- | |''< | + | |
- | |''< | + | |
- | |''< | + | |
- | |''< | + | |
- | |''< | + | |
- | |''< | + | |
- | |''< | + | |
- | |''< | + | |
- | |''< | + | |
- | |''< | + | |
- | + | ||
- | + | ||
- | ===collectionConfig.xml=== | + | |
- | + | ||
- | Resides in the ''/ | + | |
- | If the collection is part of a super set, then this information is added here too. | + | |
- | + | ||
- | Here is a sample OAIPMH ServiceRack element. | + | |
< | < | ||
- | < | + | source gs3-setup.sh (linux/MacOS, gs3) |
- | < | + | gs3-setup (Windows, gs3) |
- | < | + | source setup.bash (Linux/MacOS, gs2) |
- | <!-- States that this collection is part of the humanity super set, which needs to be defined | + | setup (Windows, gs2) |
- | in the OAIConfig.xml file. --> | + | |
- | < | + | |
- | < | + | |
- | <!-- This collection supports the DC metadata set. --> | + | |
- | < | + | |
- | < | + | |
- | <!-- this will replace the dc: | + | |
- | <element name=" | + | |
- | <mapping elements=" | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
</ | </ | ||
- | ==== OAI super sets ==== | + | * **To see the options available**, run: |
- | + | ||
- | In the Greenstone OAI server, each collection is presented as an OAI set. You can use the oaiSuperSet to group several collections together to be presented as a single set. | + | |
- | + | ||
- | The format for a super set specification is like the following: | + | |
< | < | ||
- | < | + | perl -S downloadinfo.pl OAIDownload |
- | < | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
</ | </ | ||
- | There can be more than one super set specified | + | The options are the same as you can see in the GLI OAI download panel, listed above. |
+ | ***An example usage would be:** | ||
< | < | ||
- | < | + | perl -S downloadfrom.pl -mode OAI -url http:// |
</ | </ | ||
- | ==== Metadata Formats ==== | ||
- | A repository must support | + | This will try to download 5 records from the set //demo// at the nzdl.org's OAI server. |
- | < | + | The records (and optionally documents) will be downloaded into the folder the script is run from. To change this, use the **-cache_dir full-path-to-folder** option. |
- | < | + | ===== Serving OAI Data using Greenstone===== |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | <element name=" | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | The elementList lists all elements for the metadata format. Mapping rules dictate which elements in the greenstone collection get output for these OAI elements. | + | Greenstone comes with a built-in OAI data provider, called |
- | + | ||
- | The OAIConfig.xml file defines the metadata formats supported by the respository, | + | |
- | + | ||
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | <element name=" | + | |
- | <mapping elements=" | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | The collection can specify a custom mapping. | + | |
- | + | ||
- | Field mapping is done in two levels: globally for all collections in a repository, | + | |
- | and specifically for each collection. For a particular collection, the mapping specification | + | |
- | in the '' | + | |
- | the metadata mappings will be first looked for in each collection' | + | |
- | if not found, go to the '' | + | |
- | field names will be used to retrieve the metadata of the collection. | + | |
- | + | ||
- | Mappings take the following format: | + | |
- | < | + | |
- | <element name=" | + | |
- | <element name=" | + | |
- | elements=" | + | |
- | </ | + | |
- | + | ||
- | In the first case, the server will look for ' | + | |
- | In the second case, the server will look for any metadata in the elements list and map it to oai-name in the output. The select attribute determines how many values are output. The default setting is ' | + | |
- | | + | |
- | * **firstvalue**: | + | |
- | * **firstvalidmetadata**: | + | |
- | + | ||
- | Some examples: | + | |
- | + | ||
- | < | + | |
- | The server will look for dc:title metadata and output it if found. Note that standard Greenstone metadata uses ' | + | |
- | < | + | |
- | This will output all dc.Titles as dc:title metadata. If no dc.Title is found, then any Titles will be output. | + | |
- | < | + | |
- | This will output all dc.Dates and gs.Dates as dc:date. | + | |
- | + | ||
- | + | ||
- | + | ||
- | ====Disabling Collections==== | + | |
- | + | ||
- | By default, in Greenstone3, | + | |
- | A new collection in Greenstone contains the OAIPMH ServiceRack in its collectionConfig.xml | + | |
- | The collectionConfig.xml file lives in // | + | |
- | + | ||
- | ==== Disabling the OAI Server ==== | + | |
- | + | ||
- | If you do not want to provide an OAI server | + | |
- | Make sure Tomcat is not running (by closing the Greenstone3 server program, or running **ant stop** | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | </ | + | |
- | + | ||
- | The second part to remove or comment out is the servlet mapping, which maps the url to the servlet. | + | |
- | It looks like this: | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | Once these two sections are gone or commented out, Tomcat will no longer provide the oaiserver. You can add them back in if you wish to reinstate it later. | + | |
- | + | ||
- | ==== OAI Datestamps ==== | + | |
- | + | ||
- | The " | + | |
- | + | ||
- | To manually | + | |
- | + | ||
- | ==== Resetting the server ==== | + | |
- | + | ||
- | If you have rebuilt | + | |
- | .</ | + | |
- | <!-- ####################################################################################### | + | |
- | ########################################################################################### | + | |
- | ########################################################################################## | + | |
- | < | + | |
- | ====The Greenstone2 OAI server==== | + | |
- | Greenstone comes with a built-in | + | |
- | '' | + | |
- | It can be accessed via the same URL as the Greenstone library (replacing | + | |
- | '' | + | |
- | + | ||
- | Configuration of the server is done via the '' | + | |
- | + | ||
- | Please edit '' | + | |
- | If you are not using the standard Apache setup that comes with Greenstone, | + | |
- | you may need to set oaiserverPath, | + | |
- | you can set baseServerURL to use a domain name instead of IP address in URLs. | + | |
- | + | ||
- | By default, collections are not accessible. To enable a collection, add its name to the '' | + | |
- | + | ||
- | Greenstone' | + | |
- | RFC1807 metadata. For collections that use other metadata sets, including extracted | + | |
- | metadata, metadata mapping rules should be provided to map the existing metadata | + | |
- | to Dublin Core. '' | + | |
- | + | ||
- | ==== To add a new metadata | + | |
- | + | ||
- | You need to do the following: | + | |
- | * Create a schema (or find an existing one) for the metadata set. See [[http:// | + | |
- | * Put the new schema somewhere web accessible | + | |
- | * Coding in GSDLHOME/ | + | |
- | * Create a new metaformat class for the metadata set. See dublincore.h/ | + | |
- | * edit Makefile.in, | + | |
- | * Edit recordaction.cpp to include the new header file and instantiate the new class (in recordaction()) | + | |
- | + | ||
- | * Tell the server to use the new set: edit etc/oai.cfg and add the set name to the oaimetadata line. You may also need to add oaimapping information. | + | |
- | * Recompile and test. | + | |
- | </ | + | |
- | + | ||
- | ====Testing==== | + | |
- | + | ||
- | Once you have your OAI service in place, testing can be done via online validation facilities such as the following: http:// | + | |
- | The former only verifies the Identify command, while extensive testing can be performed via the later one (called // | + | * [[oai_server_gs3|Greenstone 3 OAI server setup and configuration]] |
+ | * [[oai_server_gs2|Greenstone 2 OAI server setup and configuration]] | ||
- | The Greenstone OAI server must be publically accessible over the Internet to use these validation tools. | ||
===== Additional Resources ===== | ===== Additional Resources ===== | ||
- | <TABAREA tabs="Greenstone3, | + | <tabbox |
- | <TAB> | + | |
There are several tutorials concerning using OAI in Greenstone: | There are several tutorials concerning using OAI in Greenstone: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
- | </TAB> | + | <tabbox Greenstone2> |
- | <TAB> | + | |
There are several tutorials concerning using OAI in Greenstone: | There are several tutorials concerning using OAI in Greenstone: | ||
Line 324: | Line 104: | ||
a library built from OAI records. | a library built from OAI records. | ||
- | </TAB> | + | </tabbox> |
- | </ | + |
en/user_advanced/oai.1414974429.txt.gz · Last modified: 2018/07/30 23:01 (external edit)