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 [2015/09/09 18:12] – [dspace.xsl] samueloph | indexing:dspace [2019/02/04 20:35] – [4. Customize Record Display (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 | ||
+ | ./ | ||
+ | ===== 3. Customize Import Rules (optional) ===== | ||
- | ==== dspace.properties | + | If you wish to customize the way your records are ingested, see the [[indexing: |
- | < | + | |
- | [General] | + | |
- | xslt = dspace.xsl | + | |
- | custom_class[] = VuFind | + | |
- | [Parameters] | + | :!: If you change import rules, note that you will need to remove your $VUFIND_LOCAL_DIR/harvest/DSpace directory, re-harvest |
- | institution = " | + | |
- | collection = " | + | |
- | </ | + | |
- | + | ||
- | ==== dspace.xsl ==== | + | |
- | < | + | |
- | <!-- available fields are defined in solr/ | + | |
- | <xsl:stylesheet version=" | + | |
- | xmlns: | + | |
- | xmlns: | + | |
- | xmlns: | + | |
- | xmlns: | + | |
- | xmlns: | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | <!-- ID --> | + | |
- | <!-- Important: This relies on an < | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | + | ||
- | <!-- RECORDTYPE --> | + | |
- | <field name=" | + | |
- | + | ||
- | <!-- FULLRECORD --> | + | |
- | <!-- disabled for now; records are so large that they cause memory problems! | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | --> | + | |
- | + | ||
- | <!-- ALLFIELDS --> | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | + | ||
- | <!-- INSTITUTION --> | + | |
- | <field name=" | + | |
- | < | + | |
- | </field> | + | |
- | + | ||
- | <!-- COLLECTION --> | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | + | ||
- | <!-- LANGUAGE --> | + | |
- | <xsl:if test="// | + | |
- | < | + | |
- | <xsl:if test=" | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | <!-- FORMAT --> | + | |
- | <!-- populating | + | |
- | if you like, you can uncomment this to add a hard-coded format | + | |
- | 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 --> | + | |
- | <xsl:if test="// | + | |
- | <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 | + | |
- | | + | |
- | <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="// | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | <field name=" | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | <!-- 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