Implementation of an OAI-PMH Data Provider using C# and ASP.NET
This is an open-source implementation of a data provider using the
Open Archives Initiative Protocol for Metadata Harvesting version 2.
This software allows your repository metadata to be harvested by other
interested parties using OAI-PMH.
This implementation is not complete. Sets are not implemented. The
implementation uses metadata stored in an XML file, and so you will
likely need to modify the code to pull from a database. Dublin Core is
the only metadata format used in this implementation, but you can easily
integrate other formats.
You are free to download, modify, and use the code for any purposes you wish as
long as you abide by the license (included in the
download). My implementation is loosely based on an
ASP implementation developed by the University of Illinois,
Urbana-Champaign. They are in the process of developing their own ASP.NET
implementation. My implementation is the first publicly available
implementation from what I can tell.
The example metadata included in my project was harvested from
American Memory from the Library of Congress.
I am assuming you know a fair amount about IIS configuration and ASP.NET. This
software is provided "as is". I cannot give you specific configuration help,
but if you find an error in the installation instructions or software, please
let me know about it by sending me an e-mail at fmccown@cs.odu.edu.
Installation:
-
Unzip the oaidemo.zip file in any location. You may prefer to put it in
the IIS root tree: C:\Inetpub\wwwroot.
-
Register the directory as an IIS virtual application. To be compatible with the
testing page oai2links.html included in this software, you should name the
application oaidemo.
-
Now you can test the system by using a browser and accessing
oai2links.html which has pre-defined URLs for running OAI-PMH commands.
Note that the links assume you have installed the software locally. If you have
installed the software on a remote server, the URLs will need to be changed, and the
Web.config file will need to be updated to the path of the records.xml and records.xsd files.
Files:
-
license.html - License for using the software.
-
oai2links.html - Provides pre-canned links for testing all the OAI-PMH
verbs.
-
Web.config - Contains repository settings that you can adjust and
the full path to the records.xml and records.xsd files. You will need to update these paths if you install
the files in any directory but C:\Inetpub\wwwroot\oaidemo.
-
database\records.xml - Contains all record metadata for the repository.
You will likely want to replace this with an Access or SQLServer database.
-
database\records.xsd - Schema for records.xml.
-
metadata-oai-dc.aspx - Converts metadata records in records.xml into
Dublin Core metadata. You will modify this file for converting your database
records into DC. You'll want to create other convesion files like
metadata-marc.aspx for creating MARC metadata
-
Global.asax.cs - Reads configuration settings from Web.config, and reads
records.xml into an application-wide DataSet. It can be much quicker to access
the data in a DataSet since it is in RAM, but you may prefer to read directly
from the database if you are limited in RAM or have a large collection of
records.
-
oai2.aspx.cs - Detects which OAI-PMH operation is being requested and
calls the appropriate operation handler.
-
GetRecord.aspx
- Handles GetRecord verb.
-
Identify.aspx
- Handles Identify verb.
-
ListIdentifiers.aspx
- Handles ListIdentifiers verb.
-
ListMetadataFormats.aspx
- Handles ListMetadataFormats verb.
-
ListRecords.aspx
- Handles ListRecords verb.
-
ListSets.aspx - Handles ListSets verb.
-
util.aspx.cs - Provides supporting utility functions.
About the Author
Frank McCown - fmccown@cs.odu.edu
I am a Ph.D. student at Old Dominion University focusing on digital libraries
and web-related technologies.