Community:NDR/addAggregator

From NSDLWiki

Jump to: navigation, search

Contents

[hide]

addAggregator

Create an Aggregator object (see ObjectTypes) in the NDR .

Request URL

http://ndr.nsdl.org/api/addAggregator
Must be an HTTP POST request.

Arguments

  • inputXML (required) - describes a grouping of Resources, Aggregators, or Agents.

    • Relationships
      • aggregatorFor (required) - the handle of the Agent object responsible for the aggregation.
      • associatedWith (optional) - the handle of the Resource object representing the actual aggregation (grouping) of objects.
      • memberOf (optional) - the handle of any Aggregator objects of which this Aggregator object is a member.

    • Datastreams
      • serviceDescription (required) - contains descriptive information about the Aggregator via the following elements:
        • dc:title (required) - a short name for the Aggregator (a few words).
        • dc:description (required) - a description of the Aggregator.
        • dc:identifier (optional) - a URL appropriate to the Aggregator (e.g. the URL for a descriptive page about the aggregation).
        • image (optional) - a brand image to be associated with the Aggregator. If a brand image is included, all four fields below must be present.
          • brandURL - the URL from which the image can be uploaded. This should resolve to just the image itself, not to a page with a link to the image or to a page with the image as well as other information. The image must be of type jpg, gif or png. See http://metamanagement.comm.nsdlib.org/brandGuidelines.html.
          • title - text to be displayed if a web client doesn't display the image.
          • width - the width of the image, in pixels. Per the guidelines, the image must not be wider than 100 pixels.
          • height - the height of the image, in pixels. Per the guidelines, the image must not be taller than 30 pixels.
        • contacts (optional) - contact information to be associated with this Aggregator. While contact information is optional, it's very helpful to us if it is included.
          • contact - Each contact listed must include <name> and <email>, but the <info> element is optional.
            • name - the name of the person, entity or organization.
            • email - email address for the person, entity or organization
            • info - may contain additional information about the contact, such as "OAI administrator," "project lead," "technical", "metadata," etc.
Below is example inputXML for an Aggregator object to be added to the NDR. Note that the command is understood to be "add" (rather than "replace" or "delete") so the inputXML does not require a command as the first child of the <properties>, <relationships> or <data> elements.
<?xml version="1.0" encoding="UTF-8"?>
<inputXML 
    xmlns="http://ns.nsdl.org/ndr/request_v1.00/" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://ns.nsdl.org/ndr/request_v1.00/ http://ns.nsdl.org/schemas/ndr/request_v1.00.xsd" 
    schemaVersion="1.00.000">
  <aggregator>
    <properties />
    <relationships>
      <aggregatorFor>2200/666T</aggregatorFor>
      <associatedWith>2200/999</associatedWith>
      <memberOf>2200/NSDL_Collection_of_Collections_Aggregator</memberOf>
    </relationships>
    <data>
      <serviceDescription xmlns:dc="http://purl.org/dc/elements/1.1/">
        <dc:title>Fred's Digital Classroom Math Resources Aggregation</dc:title>
        <dc:description>Collection of Fred's favorite Digital Classroom Math Resource items</dc:description>
        <dc:type>Aggregator</dc:type>
        <image>
          <brandURL>http://crs.nsdl.org/brands/1523829.jpg</brandURL>
          <title>Fred's Digital Classroom Math Resources</title>
          <width>100</width>
          <height>30</height>
        </image>
      </serviceDescription>
    </data>
  </aggregator>
</inputXML>
Note that an XML schema for the dc namespace (http://purl.org/dc/elements/1.1/) will be imported as part of the inputXML schema.

Response Fields

  • handle - the handle for the new Aggregator object

Response Example

<?xml version="1.0" encoding="UTF-8"?>
<NSDLDataRepository 
    schemaVersion="1.00.000" 
    xmlns="http://ns.nsdl.org/ndr/response_v1.00/" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://ns.nsdl.org/ndr/response_v1.00/ http://ns.nsdl.org/schemas/ndr/response_v1.00.xsd">
  <responseTime>2006-04-10T18:07:53Z</responseTime>
  <requestURL>http://ndr.nsdl.org/api/addAggregator</requestURL>
  <resultData>
    <handle>2200/20061212666</handle>
  </resultData>
</NSDLDataRepository>

API Links:

Personal tools