Community:NDR/addMetadataProvider

From NSDLWiki

Jump to: navigation, search

Contents

[hide]

addMetadataProvider

Create a MetadataProvider object (see ObjectTypes) in the NDR.

Request URL

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

Arguments

  • inputXML (required) - contains information relevant to a specific provision of metadata, such as particular OAI sets to be harvested from an OAI server.
    • Properties
      • setSpec (optional) - must be provided for the NDR's OAI server to expose metadata from this MetadataProvider as an OAI harvestable set. The value must be unique among the NDR's OAI server's setSpecs, and must adhere to the OAI-PMH specification of setSpecs (see the OAI-PMH and its XML schema: http://www.openarchives.org/OAI/openarchivesprotocol.html). To see setSpecs currently in use by the NDR, do a ListSets request of the NDR's OAI server: http://ndr.nsdl.org/oai?verb=ListSets .
      • setName (optional) - a short, human-readable description of the objects described by this provision of metadata (e.g. a group of resources), to be available when an OAI-PMH ListSets request is made of the NDR's OAI server.
    • Relationships
      • metadataProviderFor (required) - the handle of the Agent object responsible for this MetadataProvider.
      • aggregatedBy (optional) - the handle of the Aggregator object representing a grouping of objects which the provided metadata will describe.
    • Datastreams
      • serviceDescription (required) – contains descriptive information about the MetadataProvider via the following elements:
        • dc:title (required) - a short name for the MetadataProvider (a few words).
        • dc:description (required) - a description of the MetadataProvider.
        • dc:identifier (optional) - a URL appropriate to the MetadataProvider (e.g. the baseURL for an OAI data provider).
        • image (optional) - a brand image to be associated with the MetadataProvider. If a brand image is included, all four fields below must be present.
          • brandURL (optional)- 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 MetadataProvider. 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 a MetadataProvider object to be added to the NDR. This MetadataProvider object corresponds to the grouping of resources for aggregator object with PID nsdl:666. 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">
<metadataProvider>
<properties>
<setSpec>666</setSpec>
<setName>My Collection</setName>
</properties>
<relationships>
<aggregatedBy>2200/200503201245234T</aggregatedBy>
<metadataProviderFor>2200/200503201245666T</metadataProviderFor>
</relationships>
<data>
<serviceDescription xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title>metadataProvider for a particular source</dc:title>
<dc:description>A collection of metadata provided by me</dc:description>
<contacts>
<contact>
<name>Peter Parker</name>
<email>pparker@dailyplanet.com</email>
<info>newspaperman</info>
</contact>
<contact>
<name>Mary Jane</name>
<email>mj@dailyplanet.com</email>
<info>content creator</info>
</contact>
</contacts>
</serviceDescription>
</data>
</metadataProvider>
</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 NDR handle for the new MetadataProvider 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>2005-10-26T18:42:05Z</responseTime>
<requestURL>http://ndr.nsdl.org/api/addMetadataProvider</requestURL>
<resultData>
<handle>2200/200504201223123T</handle>
</resultData>
</NSDLDataRepository>

API Links:

Personal tools