TNS Internal:CollectionAPI/AtomPub/ServiceWalkthrough

From NSDLWiki

Jump to: navigation, search
<?xml version="1.0" encoding='utf-8'?>
<service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom">
   <atom:link rel="self"
       href="http://ndrtest.nsdl.org/api/get/2200/test.20091014142846429T/content" />

the atom:link rel="self" is allowed, but not specified, by the standard. It's just a link to the URL of the service document.


   <workspace>
       <atom:title>ROOT</atom:title>

ROOT workspace is always present. It is the master "collection of collections of collections" for the entire repository.


       <atom:link rel="self"
           href="http://ndrtest.nsdl.org/api/get/2200/test.20091014154402647T/content" />

Again, a non-standard extension to the specification. This URL points to service document JUST containing the ROOT workspace


       <collection
           href="http://ndrtest.nsdl.org/api/get/2200/test.20091013104354553T/content">
           <atom:title>NSDL collections</atom:title>
           <categories>
               <atom:category scheme="http://ns.nsdl.org/collections/type"
                   term="collection" />
               <atom:category scheme="http://ns.nsdl.org/collections/format"
                   term="ncs_collect" />
           </categories>
       </collection>

The entry for the nsdl.org collection of collections. As we can see, it is supposed to contain 'collection' entries, with must be cataloged with metadata of the 'ncs_collect' format. Later on in the service document, you'll see a corresponding workspace containing collection feeds for each collection cataloged in the "NSDL collections" feed. In that way, ROOT is special: All collections in ROOT are collections-of-collections. Each collection listed here implies the creation of a new workspace containing feeds of collections that are present in that collection.


       <collection
           href="http://ndrtest.nsdl.org/api/get/2200/test.20091014203202437T/content">
           <atom:title>NSDL Media</atom:title>
           <categories>
               <atom:category scheme="http://ns.nsdl.org/collections/type"
                   term="collection" />
               <atom:category scheme="http://ns.nsdl.org/collections/format"
                   term="ncs_collect_media" />
           </categories>
       </collection>

"NSDL media" collection of collections. ncs_collect_media is a fake format representing some sort of minimal cataloging metadata for collections of files. As expected, look for the "NSDL Media" workspace later on, which contains the collections in the "NSDL media" collection of collections.


       <collection href="http://example.org/XXX">
           <atom:title>DLESE collections</atom:title>
           <categories>
               <atom:category scheme="http://ns.nsdl.org/collections/type"
                   term="collection" />
               <atom:category scheme="http://ns.nsdl.org/collections/format"
                   term="dlese_collect" />
           </categories>
       </collection>
   </workspace>

Example of a non-NSDL collection of collections hosted in the same repository. In this case, the DLESE library.

   <workspace>
       <atom:title>NSDL collections</atom:title>
       <atom:link rel="self"
           href="http://ndrtest.nsdl.org/api/get/2200/test.20091014210436181T/content" />

As promised, this workspace is contains NSDL collections. Its existence was implied by the "NSDL collections" collection of collections in ROOT. Again, it contains a non-standard link to a service document containing ONLY the collections in this particular workspace.


       <collection href="http://ndrtest.nsdl.org/api/get/2200/test.20091013232544291T/content">
           <atom:title>TeachEngineering: Resources for K-12</atom:title>
           <categories>
               <atom:category scheme="http://ns.nsdl.org/collections/type"
                   term="record" />
               <atom:category scheme="http://ns.nsdl.org/collections/format"
                   term="nsdl_dc" />
               <atom:category scheme="http://ns.nsdl.org/collections/source"
                   term="OAI-PMH" />
           </categories>
       </collection>                           
       <collection     
           href="http://ndrtest.nsdl.org/api/get/2200/test.20091013181355926T/content">
           <atom:title>Middle School Portal: Math and Science Pathways (MSP2)
           </atom:title>       
           <categories>                
               <atom:category scheme="http://ns.nsdl.org/collections/type"
                   term="record" />
               <atom:category scheme="http://ns.nsdl.org/collections/format"
                   term="msp2" />
               <atom:category scheme="http://ns.nsdl.org/collections/format"
                   term="nsdl_dc" />
               <atom:category scheme="http://ns.nsdl.org/collections/source"
                   term="NCS" />
               <atom:category scheme="http://ns.nsdl.org/collections/source"
                   term="WebFeedIngest" />
           </categories>
       </collection>
   </workspace>

The NSDL contains only two collections :). Note the categories listed for each collection, indicating the formats and sources that will be accepted.


   <workspace>
       <atom:title>DLESE collections</atom:title>
       <atom:link rel="self" href="http://example.org/XXX" />
   </workspace>

This is not populated with example data


   <workspace>
       <atom:title>NSDL Media</atom:title>
       <atom:link rel="self"
           href="http://ndrtest.nsdl.org/api/get/2200/test.20091014210757228T/content" />
       <collection
           href="http://ndrtest.nsdl.org/api/get/2200/test.20091014135416752T/content">
           <atom:title>NSDL Brand Images</atom:title>
           <categories>
               <atom:category scheme="http://ns.nsdl.org/collections/type"
                   term="media" />
           </categories>
           <accept>image/gif</accept>
           <accept>image/jpeg</accept>
       </collection>
   </workspace>

Only one media collection exists here: NSDL brand images. Note the 'accept' elements. Raw media files can be posted to this collection.


   <workspace>
       <atom:title>Other Collections</atom:title>
       <atom:link rel="self" href="http://ndr.nsdl.org/collections/svc/OTHER" />
       <collection href="http://ndr.nsdl.org/collections/IMATH-000-000-000-002">
           <atom:title>Indiana Math Collection</atom:title>
           <categories>
               <atom:category scheme="http://ns.nsdl.org/collections/type"
                   term="record" />
               <atom:category scheme="http://ns.nsdl.org/collections/format"
                   term="msp2" />
               <atom:category scheme="http://ns.nsdl.org/collections/source"
                   term="NCS" />
           </categories>
       </collection>
   </workspace>

This is probably not a good idea. Ignore, nothing to see here


</service>
Personal tools