<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet href="/wikid/docs/xsl/mwCollections/CollectionOaiCat/display.xsl" type="text/xsl"?>

<!--
This resource container holds the product of the resolution request
-->
<resource xmlns:config="info:sid/localhost:CollectionSimpleSchemas:config" xmlns:explain="http://explain.z3950.org/dtd/2.0/" xmlns:srw="http://www.loc.gov/zing/srw/" xmlns:wiki="info:sid/localhost:CollectionSimpleSchemas:wiki" xmlns:wr="http://errol.oclc.org/oai:xmlregistry.oclc.org:errol/WikiRepository" xmlns:xlink="http://www.w3.org/TR/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--
This is an echo of the request information this stylesheet used to produce the resolution product
-->
<uri-context>
<srwIdentifier>info:sid/localhost:CollectionOaiCat:CustomizationNotes</srwIdentifier>
<collectionURI>info:sid/localhost:CollectionOaiCat</collectionURI>
<repository-identifier>CollectionOaiCat</repository-identifier>
<srwURL>http://alcme.oclc.org:80/wikid/search/WikiDb.localhost</srwURL>
<local-identifier>CustomizationNotes</local-identifier>
<action>display</action>
</uri-context>
<!--
This is the collection configuration record
-->
<record xmlns="info:sid/localhost:CollectionSimpleSchemas:config" xsi:schemaLocation="info:sid/localhost:CollectionSimpleSchemas:config http://alcme.oclc.org:80/wikid/raw/info:sid/localhost:CollectionSimpleSchemas:config.xsd">
<repositoryName>OAICat Documentation</repositoryName>
<localIdentifierType>userAssigned</localIdentifierType>
<adminEmail>mailto:jyoung@oclc.org</adminEmail>
<defaultXSL>no</defaultXSL>
<schemaURI recordPrefix="wiki">info:sid/localhost:CollectionSimpleSchemas:wiki</schemaURI>
<crosswalkSchemaURI recordPrefix="xhtml">info:sid/localhost:CollectionExternalSchemas:xhtml</crosswalkSchemaURI>
<defaultSchemaURI>info:sid/localhost:CollectionExternalSchemas:xhtml</defaultSchemaURI>
</record>
<!--
There is a local-identifier, so this URI must identify an item in a collection
-->
<!--
This is the searchRetrieveResponse for the item's Deposit record
-->
<content>
<searchRetrieveResponse xmlns="http://www.loc.gov/zing/srw/">
<version>1.1</version>
<numberOfRecords>1</numberOfRecords>
<resultSetId>5yvzzn</resultSetId>
<resultSetIdleTime>300</resultSetIdleTime>
<records xmlns:ns1="http://www.loc.gov/zing/srw/">
<record>
<recordSchema>http://www.oclc.org/schemas/WikiRepository</recordSchema>
<recordPacking>xml</recordPacking>
<recordData>
<wr:Deposit xmlns="http://www.w3.org/TR/xhtml1/strict">
<wr:browserPath>http://alcme.oclc.org:80/wikid/docs/WikiRepository</wr:browserPath>
<wr:refID>info:sid/localhost:CollectionOaiCat:CustomizationNotes</wr:refID>
<wr:refIDPrefix/>
<wr:userName>anonymous</wr:userName>
<wr:collection>CollectionOaiCat</wr:collection>
<wr:relativePath>2006/07/05/11</wr:relativePath>
<wr:fullRefID>inf_3asid_2flocalhost_3aCollectionOaiCat_3aCustomizationNotes_5f20060705111903375</wr:fullRefID>
<wr:mimeType>text/xml</wr:mimeType>
<wr:sort>CollectionOaiCat:CustomizationNotes</wr:sort>
<wr:dateCreated>2005-08-12</wr:dateCreated>
<wr:datestamp>2006-07-05</wr:datestamp>
<wr:oldDate/>
</wr:Deposit>
</recordData>
<recordPosition>1</recordPosition>
</record>
</records>
<echoedSearchRetrieveRequest xmlns:ns2="http://www.loc.gov/zing/srw/">
<version>1.1</version>
<query>repos.hasDate = "hasdate" and oai.identifier exact "info:sid/localhost:CollectionOaiCat:CustomizationNotes"</query>
<xQuery>
<ns3:searchClause xmlns:ns3="http://www.loc.gov/zing/cql/xcql/">
<ns3:index>cql.any</ns3:index>
<ns3:relation>
<ns3:value>=</ns3:value>
</ns3:relation>
<ns3:term>huh?</ns3:term>
</ns3:searchClause>
</xQuery>
<startRecord>1</startRecord>
<maximumRecords>1</maximumRecords>
<recordPacking>xml</recordPacking>
<recordSchema>default</recordSchema>
</echoedSearchRetrieveRequest>
</searchRetrieveResponse>
<!--
This is the datestamp for the Deposit
-->
<datestamp>2006-07-05</datestamp>
<!--
This is the URL for the content
-->
<contentURL>http://alcme.oclc.org:80/wikid/docs/WikiRepository/2006/07/05/11/inf_3asid_2flocalhost_3aCollectionOaiCat_3aCustomizationNotes_5f20060705111903375</contentURL>
<!--
Here is the record content
-->
<record>
<record xmlns="info:sid/localhost:CollectionSimpleSchemas:wiki" xsi:schemaLocation="info:sid/localhost:CollectionSimpleSchemas:wiki http://alcme.oclc.org:80/wikid/raw/info:sid/localhost:CollectionSimpleSchemas:wiki.xsd">
<raw>= Customization Notes =
* See /EclipseSysdeo for notes about customizing OAICat using the Sysdeo plugin for Eclipse.
* See /MultipleDatabases for notes about using a single OAICat webapp with multiple databases.

Although the OAICat demo war file comes configured with a simple file-based data collection, OAICat was really designed to work with a data collection in its existing form. Configuration is generally achieved by changing entries in the $TOMCAT_HOME/webapps/oaicat/WEB-INF/oaicat.properties file. Three abstract Java classes exist to facilitate this goal:
	1. ORG.oclc.oai.server.catalog.Abstract''''''Catalog (corresponds to the Abstract''''''Catalog.oaiCatalogClassName entry in the oaicat.properties file)
	2. ORG.oclc.oai.server.catalog.Record''''''Factory (corresponds to the Abstract''''''Catalog.recordFactoryClassName entry in the oaicat.properties file)
	3. ORG.oclc.oai.server.crosswalk.Crosswalk (corresponds to one or more Crosswalks.xxxx entries in the oaicat.properties file)
== AbstractCatalog ==
The Abstract''''''Catalog class exists to abstract the type of database engine used to access the collection. The class that implements Abstract''''''Catalog is responsible for invoking database API calls for each OAI verb to obtain native records used to fulfill an OAI verb request. Several example implementations are included in the distribution, but user-defined classes can be created and used as well.
* FileSystemOaiCatalog - Records are stored in individual XML files in the system's directory structure.
* NewFileSystemOaiCatalog - Records are stored in individual XML files in the system's directory structure (suitable for repositories that need to support OAI sets)
* XmlFileOaiCatalog - Records are stored in a single XML file on disk.
* JdbcOaiCatalog - Records are stored in a JDBC-accessible relational database.
** http://pubserv.oclc.org/oaicat/jars/docs/jdbc.html
* JdbcLimitedOaiCatalog - can be used in place of JDBCOAICatalog if the SQL "Limited" qualifier is supported.
* SruOaiCatalog - Records are stored in an SRU-accessible search service.

In principle, the Abstract''''''Catalog implementation class should not make any assumptions about the native record schema. It should treat records from start to finish as generic Java Objects so that the class can be reused for a variety of native record types. This may not make sense for a relational database, but imagine a database engine capable of storing and retrieving records in MARC XML, MARC Communications, MODS, METS, etc. depending on the situation (e.g. SRU).

Semantic understanding of the native record schema should be left up to the Record''''''Factory and Crosswalk classes discussed below. That way, Abstract''''''Catalogs, Record''''''Factories, and Crosswalks can be mixed and matched in the oaicat.properties file without changing the code.

== RecordFactory ==
The Record''''''Factory abstract class exists to facilitate the generation of an OAI record header from a native record Object. This implies, of course, that the native record Object must somehow contain an identifier, datestamp, and optional setSpecs.

The core of OAICat makes no assumptions about the native record structure, which explains the need for this class to fulfill the OAI record header requirement. Several Record''''''Factory implementation classes are included in the distribution, but user-created classes can be used as well.
* File''''''Record''''''Factory - the  OAI identifier is derived from the filename of the record as found in the system's directory structure. The OAI datestamp is taken from the file's datestamp. Set''''''Specs are not supported by this implementation.
* XMLFileRecordFactory - assumes the records are all stored in a single XML file, pre-formatted as an OAI record response.
* JDBCRecordFactory - assumes the identifier, datestamp, and setSpecs are contained in SQL columns named according to entries in the oaicat.properties file.

== Crosswalk ==
Each metadataFormat to be provided by the OAI repository must be configured in the oaicat.properties file by specifying a Crosswalk implementation class for each. These classes are responsible for transforming the native record Object into an XML record that will be inserted into the record's metadata element in the response. As in the cases above, a number of implementations are included in the distribution, but user-created classes can be used as well.
* File''''''Map2oai_dc - The native record Object, in this case, is a Map containing information about the record and it's location on the file system. If no stylesheet is specified, the record found on disk is returned unmolested. If a stylesheet is configured, the record is transformed before being returned.</raw>
</record>
</record>
</content>
<displayContent>
<html xmlns="http://www.w3.org/1999/xhtml">
<body><h1> Customization Notes </h1>
<ul>
<li> See <a href="/wikid/CollectionOaiCat:CustomizationNotes/EclipseSysdeo">/EclipseSysdeo</a> for notes about customizing OAICat using the Sysdeo plugin for Eclipse.</li>
<li> See <a href="/wikid/CollectionOaiCat:CustomizationNotes/MultipleDatabases">/MultipleDatabases</a> for notes about using a single OAICat webapp with multiple databases.</li>
</ul>
<p></p>
Although the OAICat demo war file comes configured with a simple file-based data collection, OAICat was really designed to work with a data collection in its existing form. Configuration is generally achieved by changing entries in the $TOMCAT_HOME/webapps/oaicat/WEB-INF/oaicat.properties file. Three abstract Java classes exist to facilitate this goal:
<ol>
<li> ORG.oclc.oai.server.catalog.AbstractCatalog (corresponds to the AbstractCatalog.oaiCatalogClassName entry in the oaicat.properties file)</li>
<li> ORG.oclc.oai.server.catalog.RecordFactory (corresponds to the AbstractCatalog.recordFactoryClassName entry in the oaicat.properties file)</li>
<li> ORG.oclc.oai.server.crosswalk.Crosswalk (corresponds to one or more Crosswalks.xxxx entries in the oaicat.properties file)</li>
</ol>

<h2> AbstractCatalog </h2>
The AbstractCatalog class exists to abstract the type of database engine used to access the collection. The class that implements AbstractCatalog is responsible for invoking database API calls for each OAI verb to obtain native records used to fulfill an OAI verb request. Several example implementations are included in the distribution, but user-defined classes can be created and used as well.
<ul>
<li> <a href="/wikid/CollectionOaiCat:FileSystemOaiCatalog">FileSystemOaiCatalog</a> - Records are stored in individual XML files in the system's directory structure.</li>
<li> <a href="/wikid/CollectionOaiCat:NewFileSystemOaiCatalog">NewFileSystemOaiCatalog</a> - Records are stored in individual XML files in the system's directory structure (suitable for repositories that need to support OAI sets)</li>
<li> <a href="/wikid/CollectionOaiCat:XmlFileOaiCatalog">XmlFileOaiCatalog</a> - Records are stored in a single XML file on disk.</li>
<li> <a href="/wikid/CollectionOaiCat:JdbcOaiCatalog">JdbcOaiCatalog</a> - Records are stored in a JDBC-accessible relational database.
<ul>
<li> <a href="http://pubserv.oclc.org/oaicat/jars/docs/jdbc.html">http://pubserv.oclc.org/oaicat/jars/docs/jdbc.html</a></li>
</ul>
</li>
<li> <a href="/wikid/CollectionOaiCat:JdbcLimitedOaiCatalog">JdbcLimitedOaiCatalog</a> - can be used in place of JDBCOAICatalog if the SQL &quot;Limited&quot; qualifier is supported.</li>
<li> <a href="/wikid/CollectionOaiCat:SruOaiCatalog">SruOaiCatalog</a> - Records are stored in an SRU-accessible search service.</li>
</ul>
<p></p>
In principle, the AbstractCatalog implementation class should not make any assumptions about the native record schema. It should treat records from start to finish as generic Java Objects so that the class can be reused for a variety of native record types. This may not make sense for a relational database, but imagine a database engine capable of storing and retrieving records in MARC XML, MARC Communications, MODS, METS, etc. depending on the situation (e.g. SRU).<p></p>
Semantic understanding of the native record schema should be left up to the RecordFactory and Crosswalk classes discussed below. That way, AbstractCatalogs, RecordFactories, and Crosswalks can be mixed and matched in the oaicat.properties file without changing the code.<p></p>
<h2> RecordFactory </h2>
The RecordFactory abstract class exists to facilitate the generation of an OAI record header from a native record Object. This implies, of course, that the native record Object must somehow contain an identifier, datestamp, and optional setSpecs.<p></p>
The core of OAICat makes no assumptions about the native record structure, which explains the need for this class to fulfill the OAI record header requirement. Several RecordFactory implementation classes are included in the distribution, but user-created classes can be used as well.
<ul>
<li> FileRecordFactory - the  OAI identifier is derived from the filename of the record as found in the system's directory structure. The OAI datestamp is taken from the file's datestamp. SetSpecs are not supported by this implementation.</li>
<li> XMLFileRecordFactory - assumes the records are all stored in a single XML file, pre-formatted as an OAI record response.</li>
<li> JDBCRecordFactory - assumes the identifier, datestamp, and setSpecs are contained in SQL columns named according to entries in the oaicat.properties file.</li>
</ul>
<p></p>
<h2> Crosswalk </h2>
Each metadataFormat to be provided by the OAI repository must be configured in the oaicat.properties file by specifying a Crosswalk implementation class for each. These classes are responsible for transforming the native record Object into an XML record that will be inserted into the record's metadata element in the response. As in the cases above, a number of implementations are included in the distribution, but user-created classes can be used as well.
<ul>
<li> FileMap2oai_dc - The native record Object, in this case, is a Map containing information about the record and it's location on the file system. If no stylesheet is specified, the record found on disk is returned unmolested. If a stylesheet is configured, the record is transformed before being returned.</li>
</ul>
</body>
</html>
</displayContent>
</resource>
