TNS Internal:CollectionAPI/AtomPub/RecordNSDLDCFeedWalkthrough

From NSDLWiki

Jump to: navigation, search
<?xml version="1.0" encoding='utf-8'?>
<feed xmlns="http://www.w3.org/2005/Atom">
   <id>http://ndr.nsdl.org/collections/NSDL-COLLECTION-928276</id>
   <updated>2008-07-02T05:09:42.015Z</updated>
   <author>
       <name>TeachEngineering: Resources for K-12</name>
   </author>
   <logo>928276.jpg</logo>
   <title>TeachEngineering: Resources for K-12</title>
   <link rel="self"
       href="http://ndrtest.nsdl.org/api/get/2200/test.20091013232544291T/content" />
   <link rel="next"
       href="http://ndrtest.nsdl.org/api/get/2200/test.20091013232228920T/content" />

This is how Atom does pagination. This collection contains six items, spread across two feeds. Atom supports 'next', 'prev', 'first', 'last'


   <link rel="related" type="application/atom+xml;type=entry" title="collection"
       href="http://ndrtest.nsdl.org/api/get/2200/test.20091014152502577T/content" />

In the feed header, there is a link to the atom record containing the collection entry. Individual entries (which can be discovered on their own, outside the context of a feed) have this link as well, though via the "ref=via" relation. However, all redundancy is intentional. If a feed is empty, that means the collection has no items/entries. In that case, this would be the only link to the identity of the collection this feed represents.


   <entry>
       <id>http://ndr.nsdl.org/collections/2200/20090912185852900T</id>
       <title>Cutting Through Soil</title>
       <updated>2009-09-12T22:58:53.016Z</updated>
       <content type="application/xml"
           src="http://ndr.nsdl.org/api/get/2200/20090912185852900T/format_nsdl_dc" />
       <summary>
           Students pretend they are agricultural engineers during the colonial period
           and design a miniature plow that will cut through a “field” of soil.
           Students are introduced to the engineering design process and learn
           of several famous historical figures who contributed to the design of
           the plow.
       </summary>
       <category scheme="http://ns.nsdl.org/collections/format"
           term="nsdl_dc" />
       <category scheme="http://ns.nsdl.org/collections/type" term="record" />
       <link rel="edit" type="application/atom+xml;type=entry" href="http://example.org/XXX" />
       <link rel="edit-media" type="application/xml"
           href="http://ndr.nsdl.org/api/get/2200/20090912185852900T/format_nsdl_dc" />
       <link rel="via" type="application/atom+xml;type=entry"
           href="http://ndrtest.nsdl.org/api/get/2200/test.20091014152502577T/content" />

Since this item is a 'record', it is assumed to be a member of a collection. This is a required link to the atom entry of the collection record. By following this link, one can discover the collection metadata, the feed containing all members, etc.


       <link rel="enclosure" type="application/xml" title="nsdl_dc"
           href="http://ndr.nsdl.org/api/get/2200/20090912185852900T/format_nsdl_dc" />

There's only one metadata format, so this is just a "copy" of the primary metadata for this record.


       <link rel="alternate" type="text/html" title="resource"
           href="http://www.teachengineering.org/view_activity.php?url=http://www.teachengineering.com/collection/cub_/activities/cub_cutting_through_soil/cub_cutting_through_soil.xml" />

The URL of the resource being cataloged.


   </entry>    
   <entry>
       <id>http://ndr.nsdl.org/collections/2200/20061003061446262T</id>
       <title>Energy</title>
       <updated>2009-09-12T22:56:18.477Z</updated>
       <content type="application/xml"
           src="http://ndr.nsdl.org/api/get/2200/20061003061446262T/format_nsdl_dc" />
       <summary>
           Through nine lessons, students are introduced to a range of
           energy types — electrical, light, sound and thermal — as well as the
           renewable energy sources of wind, hydro (water) and solar power.
           Subjects range from understanding that the movement of energy at the
           electron level creates electricity that powers our world, to
           recognizing the Sun as our ultimate energy source. Through numerous
           hands-on activities, students explore a wide range of scientific
           topics related to the fundamentals of energy: kinetic and potential
           energy, light waves, reflection, refraction, convection, sound waves,
           volume, pitch, frequency, radiation, heat capacity, heat transfer,
           specific heat. These concepts are presented in the context of
           engineering applications pertinent to our everyday lives. Other
           aspects of energy are explored, including energy consumption and
           conservation, batteries, simple circuits, conduction and insulation,
           polarization, power grid and blackouts. As they delve into details
           about wind, water and solar power, students learn about thermometers,
           anemometers, wind and water turbines (windmills and waterwheels), and
           even direct solar heating and cooking. See the Unit Overview section
           for topics by lesson.
       </summary>
       <category scheme="http://ns.nsdl.org/collections/format"
           term="nsdl_dc" />
       <category scheme="http://ns.nsdl.org/collections/type" term="record" />
       <link rel="edit" type="application/atom+xml;type=entry" href="http://example.org/XXX" />
       <link rel="edit-media" type="application/xml"
           href="http://ndr.nsdl.org/api/get/2200/20061003061446262T/format_nsdl_dc" />
       <link rel="via" type="application/atom+xml;type=entry"
           href="http://ndrtest.nsdl.org/api/get/2200/test.20091014152502577T/content" />
       <link rel="enclosure" type="application/xml" title="nsdl_dc"
           href="http://ndr.nsdl.org/api/get/2200/20061003061446262T/format_nsdl_dc" />
       <link rel="alternate" type="text/html" title="resource"
           href="http://www.teachengineering.org/view_curricularunit.php?url=http://www.teachengineering.com/collection/cub_/curricular_units/cub_energy2/cub_energy2_curricularunit.xml" />
   </entry>
   <entry>
       <id>http://ndr.nsdl.org/collections/2200/20090314201529800T</id>
       <title>Magnetic Fields Matter</title>
       <updated>2009-07-14T22:56:40.652Z</updated>
       <content type="application/xml"
           src="http://ndr.nsdl.org/api/get/2200/20090314201529800T/format_nsdl_dc" />
       <summary>
           This lesson introduces students to the effects of magnetic
           fields in matter addressing permanent magnets, diamagnetism,
           paramagnetism, ferromagnetism, and magnetization. First students must
           compare the magnetic field of a solenoid to the magnetic field of a
           permanent magnet. Students then learn the response of diamagnetic,
           paramagnetic, and ferromagnetic material to a magnetic field. Now
           aware of the mechanism causing a solid to respond to a field,
           students learn how to measure the response by looking at the net
           magnetic moment per unit volume of the material.
       </summary>
       <category scheme="http://ns.nsdl.org/collections/format"
           term="nsdl_dc" />
       <category scheme="http://ns.nsdl.org/collections/type" term="record" />
       <link rel="edit" type="application/atom+xml;type=entry" href="http://example.org/XXX" />
       <link rel="edit-media" type="application/xml"
           href="http://ndr.nsdl.org/api/get/2200/20090314201529800T/format_nsdl_dc" />
       <link rel="via" type="application/atom+xml;type=entry"
           href="http://ndrtest.nsdl.org/api/get/2200/test.20091014152502577T/content" />
       <link rel="enclosure" type="application/xml" title="format_nsdl_dc"
           href="http://ndr.nsdl.org/api/get/2200/20090314201529800T/format_nsdl_dc" />
       <link rel="enclosure" type="application/xml" title="native_nsdl_dc"
           href="http://ndr.nsdl.org/api/get/2200/20090314201529800T/format_native_nsdl_dc_v1.02" />

In this case, somebody added an additional metadata format enclosure containing the raw native metadata used in generating this record. This raw source metadata was not used as this record's primary metadata, so it's just another enclosure. It might make more sense to adopt the convention to use the native metadata as the primary format, and add all translations as enclosures.


       <link rel="alternate" type="text/html" title="resource"
           href="http://www.teachengineering.org/view_lesson.php?url=http://www.teachengineering.com/collection/van_/lessons/van_mri_lesson_9/van_mri_lesson_9.xml" />
   </entry>
</feed>
Personal tools