TNS Internal:Collections/Adoption

From NSDLWiki

Jump to: navigation, search

Contents

[hide]

CollectionAdopter

java class: schemedit.ndr.util.CollectionAdopter


Takes a MetadataProvider handle and creates the following XML Structure for each item (MetadataRecord object):


  • ndrMetadataInfo
    • ndrHandle (handle of metadata object)
    • nsdl_dc (nsdl_dc stream from metadata object)
    • ncs_item (transformed nsdl_dc stream using nsdl-dc-v1.02.020-to-ncs-item-v1.02.xsl)


The XML records are written to disk in files named sequentially


Preparation of Adopting Collection

In the NCS, create the collection that will house the item records.


Since the MetadataProvider and Aggregator records exist in the NDR, do NOT register the collection with the NDR at creation-time. Later after the items are in the NCS collection, you will edit the collection configuration to manually enter the metadataProvider and Aggregator handles, and set authority to ndr.


collectionAdopter.py

python module: python-lib/ndr/collectionAdopter.py_


This module takes a collectionKey & prefix as input. It processes the records created above to create the following directory structures:


  • records
    • collectionKey
      • item records
    • dcs_data
      • collectionKey
        • dcs_data records


The records are given an ID generated from a prefix, and the dcs_data/ndrSyncDate is left blank so they will be synced by the NCS.


Adoption of Metadata

  1. Place the item-level and dcs_data records in their appropriate places in the metadata directories on disk.
  2. Re-index the collection
  3. Perform an NDR Sync

‚ÄČ

Personal tools