org.dspace.app.oai
Class UKETDDCCrosswalk

java.lang.Object
  extended by ORG.oclc.oai.server.crosswalk.Crosswalk
      extended by org.dspace.app.oai.UKETDDCCrosswalk

public class UKETDDCCrosswalk
extends ORG.oclc.oai.server.crosswalk.Crosswalk

A Crosswalk implementation that extracts qualified Dublin Core from DSpace items into the uketd_dc format. It supports the writing of UKETD_DC metadata in a METS document and to make the schema URIs available for inclusion in such a METS document. For this reason, the writing of the metadata itself has been separated from the writing of the schemas. This version places the writing of the header and metadata in its own method called by createMetadata so the headers are included in the UKETD_METS that also uses those methods. This allows the writeMetadata method to remain unchanged, with no header information included. It is therefore consistent with other DSpace crosswalks.

Author:
Paul Needham (Cranfield University), Jon Bell & Stuart Lewis (Aberystwyth University)

Constructor Summary
UKETDDCCrosswalk(Properties properties)
          UKETDDCCrosswalk contructor.
 
Method Summary
 String createMetadata(Object nativeItem)
          Creates the metadata necessary for UKTEDDC crosswalk.
 String getDcNs()
          Returns the identifier for the Dublin Core namespace.
 String getDcTermsNs()
          Returns the identifier for the DC terms (qualifiers) namespace.
 String getDcTermsUri()
          Returns the URI of the DC terms namespace.
 String getDcUri()
          Returns the URI of the Dublin Core namespace.
 String getUketdNs()
          Returns the identifier for the UKETD namespace.
 String getUketdSchemaLocNs()
          Returns the identifier for the UKETD schema location.
 String getUketdSchemaLocUri()
          Returns the URI of the UKETD schema location.
 String getUketdTermsNs()
          Returns the identifier for the UKETD terms namespace.
 String getUketdTermsUri()
          Returns the URI of the UKETD terms namespace.
 String getUketdUri()
          Returns the URI of the UKETD namespace.
 boolean isAvailableFor(Object nativeItem)
          Shows what items UKETD_DC OAI-PMH is available for.
 String writeMetadata(Item item)
          Writes the UKETD_DC metadata for the specified item.
 String writeMetadataWithSchema(Item item)
          Write the item's metadata, headed by the schema namespace details.
 
Methods inherited from class ORG.oclc.oai.server.crosswalk.Crosswalk
getContentType, getDocType, getEncoding, getNamespaceURL, getSchemaLocation, getSchemaURL, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UKETDDCCrosswalk

public UKETDDCCrosswalk(Properties properties)
UKETDDCCrosswalk contructor.

Parameters:
properties - Not used
Method Detail

getUketdNs

public String getUketdNs()
Returns the identifier for the UKETD namespace.

Returns:
uketdNs

getUketdUri

public String getUketdUri()
Returns the URI of the UKETD namespace.

Returns:
uketdUri

getDcNs

public String getDcNs()
Returns the identifier for the Dublin Core namespace.

Returns:
dcNs

getDcUri

public String getDcUri()
Returns the URI of the Dublin Core namespace.

Returns:
dcUri

getDcTermsNs

public String getDcTermsNs()
Returns the identifier for the DC terms (qualifiers) namespace.

Returns:
cdTermsNs

getDcTermsUri

public String getDcTermsUri()
Returns the URI of the DC terms namespace.

Returns:
dcTermsUri

getUketdTermsNs

public String getUketdTermsNs()
Returns the identifier for the UKETD terms namespace.

Returns:
uketdTermsNs

getUketdTermsUri

public String getUketdTermsUri()
Returns the URI of the UKETD terms namespace.

Returns:
uketdTermsUri

getUketdSchemaLocNs

public String getUketdSchemaLocNs()
Returns the identifier for the UKETD schema location.

Returns:
uketdSchemaLocNs

getUketdSchemaLocUri

public String getUketdSchemaLocUri()
Returns the URI of the UKETD schema location.

Returns:
uketdSchemaLocUri

isAvailableFor

public boolean isAvailableFor(Object nativeItem)
Shows what items UKETD_DC OAI-PMH is available for. This is every item in the repository.

Specified by:
isAvailableFor in class ORG.oclc.oai.server.crosswalk.Crosswalk
Returns:
a boolean (true)

createMetadata

public String createMetadata(Object nativeItem)
                      throws ORG.oclc.oai.server.verb.CannotDisseminateFormatException
Creates the metadata necessary for UKTEDDC crosswalk. Adds the name space details and schemas to the metadata itself. It therefore creates a complete OAI-PMH record that matches the UKETD_DC metadata prefix.

Specified by:
createMetadata in class ORG.oclc.oai.server.crosswalk.Crosswalk
Returns:
The OAI-PMH xml
Throws:
ORG.oclc.oai.server.verb.CannotDisseminateFormatException

writeMetadataWithSchema

public String writeMetadataWithSchema(Item item)
Write the item's metadata, headed by the schema namespace details. Separated from createMetadata, so UKETD_METS can use the method with an Item , not an Object (nativeItem).

Parameters:
item - The org.dspace.content.Item
Returns:
a String, the item's metadata in UKETD_DC format.
Throws:
SQLException

writeMetadata

public String writeMetadata(Item item)
Writes the UKETD_DC metadata for the specified item. It simply gets hold of the Dublin Core for an Item and converts it to UKEDT_DC, including the splitting of the Dublin Core publisher and type fields. The metadata is identical to that returned by the original version's create metadata method, without the schema information. This method does no checking of the correctness of the metadata format, nor does it throw any exception.

Parameters:
item - a org.dspace.content.Item
Returns:
a String, the item's metadata in UKETD_DC xml.


Copyright © 2013 DuraSpace. All Rights Reserved.