edu.ucsb.nceas.metacat.oaipmh.provider.server.crosswalk

## Class Eml201

- java.lang.Object
- - ORG.oclc.oai.server.crosswalk.Crosswalk
  - - edu.ucsb.nceas.metacat.oaipmh.provider.server.crosswalk.Eml201

-     public class Eml201
      extends ORG.oclc.oai.server.crosswalk.Crosswalk

  Provides eml-2.0.1 documents. We simply return the metadata that was read from Metacat.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Eml201(java.util.Properties properties)` The constructor assigns the schemaLocation associated with this crosswalk.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `createMetadata(java.lang.Object nativeItem)` Perform the actual crosswalk.
    `boolean` | `isAvailableFor(java.lang.Object nativeItem)` Can this nativeItem be represented in 'eml-2.0.1' format?

    - ### 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

    - #### Eml201

          public Eml201(java.util.Properties properties)
                 throws ORG.oclc.oai.server.verb.OAIInternalServerError

      The constructor assigns the schemaLocation associated with this crosswalk. Since the crosswalk is trivial in this case, no properties are utilized.
      Parameters:
        `properties` - properties that are needed to configure the crosswalk.
      Throws:
        `ORG.oclc.oai.server.verb.OAIInternalServerError`

  - ### Method Detail

    - #### createMetadata

          public java.lang.String createMetadata(java.lang.Object nativeItem)
                                          throws ORG.oclc.oai.server.verb.CannotDisseminateFormatException

      Perform the actual crosswalk.
      Specified by:
        `createMetadata` in class `ORG.oclc.oai.server.crosswalk.Crosswalk`
      Parameters:
        `nativeItem` - A HashMap object that contains the EML string that was retrieved from Metacat and stored as the value of the "recordBytes" key
      Returns:
        emlDoc a String containing the metadata to be stored within the element
      Throws:
        `ORG.oclc.oai.server.verb.CannotDisseminateFormatException` - nativeItem doesn't support this format.

    - #### isAvailableFor

          public boolean isAvailableFor(java.lang.Object nativeItem)

      Can this nativeItem be represented in 'eml-2.0.1' format?
      Specified by:
        `isAvailableFor` in class `ORG.oclc.oai.server.crosswalk.Crosswalk`
      Parameters:
        `nativeItem` - a record in native format
      Returns:
        true if 'eml-2.0.1' format is possible, false otherwise.

Copyright © 2023 Regents of the University of California. All Rights Reserved.