Warning: This page has not been updated in over over a year and may be outdated or deprecated.
indexing:dspace
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
importing_records:how_to_index_dspace_with_vufind [2014/11/13 18:39] – [How to index DSpace with VuFind] demiankatz | indexing:dspace [2020/09/21 13:50] – [3. Customize Import Rules (optional)] demiankatz | ||
---|---|---|---|
Line 3: | Line 3: | ||
These are the instructions used by the Naval Postgraduate School in Monterey, California to index DSpace records in VuFind. | These are the instructions used by the Naval Postgraduate School in Monterey, California to index DSpace records in VuFind. | ||
- | ** These instructions were written for VuFind 1.x; VuFind 2.x includes a DSpace example in the standard distribution ** | + | ===== 1. Turn on OAI-PMH in DSpace |
- | + | ||
- | ===== Steps ===== | + | |
OAI must be enabled on the DSpace repository first: | OAI must be enabled on the DSpace repository first: | ||
Line 32: | Line 30: | ||
...</ | ...</ | ||
- | Then you may proceed to import the OAI feed into VuFind: | + | ===== 2. Import records |
- | | + | |
- | - Modify **$VUFIND_HOME/ | + | |
- | - Modify **$VUFIND_HOME/ | + | |
- | - Modify **$VUFIND_HOME/ | + | |
- | - cd $VUFIND_HOME/ | + | |
- | - php harvest_oai.php | + | |
- | - sh batch-import-xsl.sh ./DSpace ../ | + | |
- | - ../ | + | |
- | ===== Required Files ===== | + | These steps use VuFind' |
- | ==== oai.ini | + | - Modify **$VUFIND_LOCAL_DIR/ |
- | < | + | |
- | [DSpace] | + | |
url=http:// | url=http:// | ||
metadataPrefix=oai_dc | metadataPrefix=oai_dc | ||
Line 56: | Line 44: | ||
injectId=" | injectId=" | ||
dateGranularity=auto | dateGranularity=auto | ||
- | harvestedIdLog=harvest.log | + | harvestedIdLog=harvest.log</ |
- | </ | + | - Run these commands:< |
+ | php harvest_oai.php | ||
+ | ./ | ||
+ | |||
+ | ==== Troubleshooting ==== | ||
+ | If you receive an error message during harvesting, you may need to rebuild the OAI indexes on your DSpace server. Log into that system and run these commands: | ||
- | ==== dspace.properties ==== | ||
< | < | ||
- | [General] | + | <path to dspace directory>/ |
- | xslt = dspace.xsl | + | <path to dspace |
- | custom_class[] = VuFind | + | |
- | + | ||
- | [Parameters] | + | |
- | institution = " | + | |
- | collection = " | + | |
</ | </ | ||
- | ==== dspace.xsl ==== | + | After that processing completes, retry the harvest process |
- | < | + | |
- | <!-- available fields are defined in solr/ | + | |
- | < | + | |
- | xmlns: | + | |
- | xmlns: | + | |
- | xmlns: | + | |
- | xmlns: | + | |
- | xmlns: | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | <!-- ID --> | + | |
- | <!-- Important: This relies | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | <!-- RECORDTYPE --> | + | ===== 3. Customize Import Rules (optional) ===== |
- | <field name=" | + | |
- | <!-- FULLRECORD --> | + | If you wish to customize the way your records are ingested, see the [[indexing:xml|indexing XML]] page for details. The instructions above use the example [[https://github.com/ |
- | <!-- disabled for now; records are so large that they cause memory problems! | + | |
- | <field name=" | + | |
- | <xsl:copy-of select=" | + | |
- | </field> | + | |
- | | + | |
- | <!-- ALLFIELDS --> | + | :!: If you change import rules, note that you will need to remove your $VUFIND_LOCAL_DIR/harvest/DSpace directory, re-harvest |
- | <field name=" | + | |
- | <xsl:value-of select=" | + | |
- | </ | + | |
- | + | ||
- | <!-- INSTITUTION --> | + | |
- | <field name=" | + | |
- | <xsl:value-of select=" | + | |
- | </ | + | |
- | + | ||
- | <!-- COLLECTION --> | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | + | ||
- | <!-- LANGUAGE --> | + | |
- | <xsl:if test="// | + | |
- | < | + | |
- | <xsl:if test=" | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | <!-- FORMAT --> | + | |
- | <!-- populating the format field with dc.type instead, see TYPE below. | + | |
- | | + | |
- | in addition to the dynamic ones extracted from the record. | + | |
- | <field name=" | + | |
- | --> | + | |
- | + | ||
- | <!-- SUBJECT --> | + | |
- | <xsl:if test="// | + | |
- | < | + | |
- | <xsl:if test=" | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | <!-- DESCRIPTION --> | + | |
- | <xsl:if test="// | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | <!-- ADVISOR / CONTRIBUTOR --> | + | |
- | <xsl:if test="// | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | <!-- TYPE --> | + | |
- | <!-- not currently working since our type field holds unhelpful data | + | |
- | <xsl:if test="// | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | --> | + | |
- | + | ||
- | <field name=" | + | |
- | + | ||
- | <!-- AUTHOR --> | + | |
- | <xsl:if test="// | + | |
- | < | + | |
- | <xsl:if test=" | + | |
- | <!-- author is not a multi-valued field, so we'll put | + | |
- | first value there and subsequent values in author2. | + | |
- | --> | + | |
- | <xsl:if test=" | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | <xsl:if test=" | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | <!-- TITLE --> | + | |
- | <xsl:if test="// | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | <!-- PUBLISHER --> | + | |
- | <xsl:if test="// | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | <!-- PUBLISHDATE --> | + | |
- | <xsl:if test="// | + | |
- | <!-- only take the last element as the actual date --> | + | |
- | <field name=" | + | |
- | <!-- previously only took the year | + | |
- | < | + | |
- | --> | + | |
- | < | + | |
- | </ | + | |
- | <field name=" | + | |
- | <!-- previously only took the year | + | |
- | < | + | |
- | --> | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | <!-- URL --> | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | ==== DspaceRecord.php ==== | + | |
- | < | + | |
- | <?php | + | |
- | require_once ' | + | |
- | class DspaceRecord extends IndexRecord { | + | |
- | | + | |
- | global $interface; | + | |
- | $template = parent :: getSearchResult (); | + | |
- | $interface -> assign (' | + | |
- | $interface -> assign (' | + | |
- | $interface -> assign (' | + | |
- | $interface -> assign (' | + | |
- | return $template; | + | |
- | } | + | |
- | } | + | |
- | ?> | + | |
- | </ | + | |
+ | ===== 4. Customize Record Display (optional) ===== | ||
+ | By default, VuFind does not include any DSpace-specific display logic; records indexed from DSpace are displayed using the standard " | ||
---- struct data ---- | ---- struct data ---- | ||
---- | ---- | ||
indexing/dspace.txt · Last modified: 2023/08/16 19:52 by demiankatz