TNS Internal:NDR/API/2.0/UseCases/build3srcForNSDL

From NSDLWiki

Jump to: navigation, search

Contents

[hide]

Use Case: Building a Library Collection, with Three Sources of Metadata, for a Digital Library

Reference Materials


Building Process

The process described here makes assumptions about the existence of certain Administrative Support Objects. The list of objects that can be referenced in Use Cases without creating them first is in the Assumptions section.


Description:

Beyond Penguins and Polar Bears is a Library Collection in the National Science Digital Library. The Library Collection has resources whose metadata come from three different sources. The basic process for setting up this Library Collection in the NDR is described in Basic Process with more details using example data listed in the API Calls section.


Basic Process


API Calls

Create Beyond Penguins and Polar Bears Library Collection

API Calls:
addCollection (details)
Input
Signing Agent: 2200/20100301ANA       <!-- NCS Agent (typical, but not necessarily the case) -->

<inputXML>
  <parentCollection>2200/20100302UNC</parentCollection>    <!-- parent: NSDL Library -->
  <parentCollection>2200/20100302ANCN</parentCollection>   <!-- parent: NCS Collections -->
  <title>Beyond Penguins and Polar Bears</title> 
  <description>Beyond Penguins and Polar Bears: An Online Magazine for K-5 Teachers</description>
  <state>Active</state>
  <contact email="ginger@ucar.edu">Katy Ginger</contact>
  <resourceURL>http://beyondpenguins.nsdl.org</resourceURL>
</inputXML>

NOTE: NCS knows it is a metadata provider for this Library Collection, so it goes ahead and makes its administrative NCS Collections generic collection a parent. WFI isn't included as a parent collection at this time in order to demonstrate adding a new application after a collection exists later in this example.

Output
returns: 2200/20100303BLC  (collection aggregator handle)
addAnnotation (details)
Input
Signing Agent: 2200/20100301ANA       <!-- NCS Agent (typical, but not necessarily the case) -->

<inputXML>
  <collection>2200/20100303BLC</collection>
  <annotationXML>
    <nsdl_collect>
      <general>
        <recordID>NSDL-COLLECTION-1007936</recordID>
        <subject>Science--Study and teaching</subject>
        <subject>Mathematics--Study and teaching</subject>
        <subject>Technology education</subject>
        <languages>
          <ISOcode>eng</ISOcode>
          <RFCcode>en</RFCcode>
        </languages>
      </general>
      <educational>
        <educationLevels>
          <nsdlEdLevel>Grade K</nsdlEdLevel>
          <nsdlEdLevel>Grade 1</nsdlEdLevel>
          <nsdlEdLevel>Grade 2</nsdlEdLevel>
          <nsdlEdLevel>Grade 3</nsdlEdLevel>
          <nsdlEdLevel>Grade 4</nsdlEdLevel>
          <nsdlEdLevel>Grade 5</nsdlEdLevel>
        </educationLevels>
        <types>
          <nsdlType>Instructional Material</nsdlType>
          <nsdlType>Reference Material</nsdlType>
          <dcmiType>Collection</dcmiType>
          <dcmiType>Text</dcmiType>
        </types>
        <mediators>
          <mediator>teachers</mediator>
        </mediators>
        <audiences>
          <nsdlAudience>Educator</nsdlAudience>
          <nsdlAudience>Learner</nsdlAudience>
        </audiences>
        </educational>
        <contributions>
        <publishers>
          <publisher>Ohio State University</publisher>
        </publishers>
        </contributions>
        <technical>
        <mimeTypes>
          <mimeType>text/html</mimeType>
          <mimeType>image</mimeType>
        </mimeTypes>
        </technical>
        <collection>
        <dateTime>2005-03-24T19:42:03Z</dateTime>
        <brandURL>http://nsdl.org/images/brands/collectionID.jpg</brandURL> 
        <imageHeight>30</imageHeight> 
        <imageWidth>100</imageWidth> 
        <altText>string</altText> 
        <contacts>
          <contact email="oai.administrator@dcrcenter.org"/>
          <contact email="support@dlese.org">DLESE Tech Support</contact>
        </contacts>
        <pathway>true</pathway>
        <collectionSubjects>
          <collectionSubject>Sciences</collectionSubject>
          <collectionSubject>General Science and STEM (Science, Technology, Engineering, and Mathematics)</collectionSubject>
        </collectionSubjects>
        <collectionPurposes>
          <collectionPurpose>Educators and learners</collectionPurpose>
        </collectionPurposes>
        <pathways>
          <name>Beyond Penguins and Polar Bears</name>
        </pathways>
        <description>2009-08-18: Added new contact email</description>
      </collection>
      <rights>
        <accessRights>
          <meansOfAccess>Free access</meansOfAccess>
        </accessRights>
      </rights>
    </nsdl_collect>
  </annotationXML>
  <XMLFormat>nsdl_anno</XMLFormat>
  <annotates>2200/20100303BLC</annotates> 
</inputXML>
Output
returns: 2200/2010030401T  (annotation handle)

Create Metadata Source for NCS Managed Resource Metadata

API Calls:
addCollection (details)
Input
Signing Agent: 2200/20100301ANA       <!-- NCS Agent -->

<inputXML>
  <parentCollection>2200/20100303BLC</parentCollection>   <!-- parent: BPPB Library Collection -->
  <title>Beyond Penguins and Polar Bears from NCS</title> 
  <description>Resources for Beyond Penguins and Polar Bears that are managed by NCS</description>
  <state>Active</state>
  <contact email="ginger@ucar.edu">Katy Ginger</contact>
  <externalIdentifier>APP-DATA-000-000-000-001</externalIdentifier> 
</inputXML>
Output
returns: 2200/20100303BNMP  (collection aggregator handle)
addAnnotation (details)
Input
Signing Agent: 2200/20100301ANA       <!-- NCS Agent -->

<inputXML>
  <collection>2200/20100303BNMP</collection>
  <annotationXML>
    <nsdl_app_data>
      <repositoryIngestApps>
        <!--NCS example data-->	
        <ncs>
          <id>1239144881424</id><!--not sure this one is needed-->
          <xmlFormat>ncs_item</xmlFormat>
          <idPrefix>BPPBP</idPrefix>
          <shortTitle>Beyond Penguins and Polar Bears</shortTitle>
          <longTitle>Beyond Penguins and Polar Bears: An Online Magazine for K-5 Teachers</longTitle>
          <finalStatusLabel>Done</finalStatusLabel>
          <authority>NDR</authority>
        </ncs>
      </repositoryIngestApps>
    </nsdl_app_data>
  </annotationXML>
  <XMLFormat>nsdl_app_data</XMLFormat>
  <annotates>2200/20100303BNMP</annotates> 
</inputXML>
Output
returns: 2200/2010030402T  (annotation handle)

Create Metadata Source for OnRamp Managed Resource Metadata

API Calls:
modifyCollection (details)
Input
Signing Agent: 2200/20100301AWA       <!-- WFI Agent -->

<inputXML>
  <handle>2200/20100303BLC</handle>                         <!-- modifying: BPPB Library Collection -->   
  <add>
    <parentCollection>2200/20100302AWC</parentCollection>   <!-- add parent: WFI Collections -->
  </add>
</inputXML>
Output
returns: 2200/20100303BLC  (collection aggregator handle)
addCollection (details)
Input
Signing Agent: 2200/20100301AWA       <!-- WFI Agent -->

<inputXML>
  <parentCollection>2200/20100303BLC</parentCollection>   <!-- parent: BPPB Library Collection -->
  <title>Beyond Penguins and Polar Bears from OnRamp</title> 
  <description>Resources for Beyond Penguins and Polar Bears that managed via RSS feed created by OnRamp and ingested by Web Feed Ingest.</description>
  <state>Active</state>
  <contact email="elrayle@cs.cornell.edu">E. Lynette Rayle</contact>
</inputXML>
Output
returns: 2200/20100303BOMP  (collection aggregator handle)
addAnnotation (details)
Input
Signing Agent: 2200/20100301AWA       <!-- WFI Agent -->

<inputXML>
  <collection>2200/20100303BOMP</collection>
  <annotationXML>
    <nsdl_app_data>
      <repositoryIngestApps>
        <!--WFI example data-->
        <wfi>
          <baseURL>http://onramp.nsdl.org/distribute/fetch.php?did=43&behid=22</baseURL>
          <name>Beyond Penguins and Polar Bears - OnRamp Resources</name>
          <type>RSS import customized for OnRamp</type>
          <incremental>true</incremental>
          <report>true</report>
        </wfi>
      </repositoryIngestApps>
    </nsdl_app_data>
  </annotationXML>
  <XMLFormat>nsdl_app_data</XMLFormat>
  <annotates>2200/20100303BOMP</annotates> 
</inputXML>
Output
returns: 2200/2010030403T  (annotation handle)

Create Metadata Source for Delicious Managed Resource Metadata

API Calls:
addCollection (details)
Input
Signing Agent: 2200/20100301AWA       <!-- WFI Agent -->

<inputXML>
  <parentCollection>2200/20100303BLC</parentCollection>   <!-- parent: BPPB Library Collection -->
  <title>Beyond Penguins and Polar Bears from Delicious</title> 
  <description>Resources for Beyond Penguins and Polar Bears that managed via RSS feed created by Delicious and ingested by Web Feed Ingest.</description>
  <state>Active</state>
  <contact email="klightle@ohio.edu">Kim Lightle</contact>
</inputXML>
Output
returns: 2200/20100303BDMP  (collection aggregator handle)
addAnnotation (details)
Input
Signing Agent: 2200/20100301AWA       <!-- WFI Agent -->

<inputXML>
  <collection>2200/20100303BDMP</collection>
  <annotationXML>
    <nsdl_app_data>
      <repositoryIngestApps>
        <!--WFI example data-->
        <wfi>
          <baseURL>http://ncs.nsdl.org/mgr/services/ddsws1-1</baseURL>
          <name>Beyond Penguins and Polar Bears - Delicious Resources</name>
          <type>RSS import customized for delecious.com</type>
          <incremental>true</incremental>
          <report>true</report>
        </wfi>
      </repositoryIngestApps>
    </nsdl_app_data>
  </annotationXML>
  <XMLFormat>nsdl_app_data</XMLFormat>
  <annotates>2200/20100303BDMP</annotates> 
</inputXML>
Output
returns: 2200/2010030404T  (annotation handle)
Personal tools