se.kb.oai.ore
Interface ResourceMapSerializer

All Known Implementing Classes:
AtomSerializer, SerializerBase

public interface ResourceMapSerializer

A ResourceMapSerializer is used to serialize the content of a ResourceMap to a machine readable format (for example XML). Different implementations of this interface will handle serialization to different formats.

At the moment the Open Archive Initiative describes two possible serialization formats:

Author:
Oskar Grenholm, National Library of Sweden

Method Summary
 void serializeToFile(File file, ResourceMap map)
          Serialize the resource map to the given file.
 String serializeToString(ResourceMap map)
          Serialize the resource map and return it as a String.
 Element serializeToXml(ResourceMap map)
          Serialize the resource map into XML.
 

Method Detail

serializeToFile

void serializeToFile(File file,
                     ResourceMap map)
                     throws IOException
Serialize the resource map to the given file.

Parameters:
file - a file
map - a resource map
Throws:
IOException

serializeToString

String serializeToString(ResourceMap map)
                         throws IOException
Serialize the resource map and return it as a String.

Parameters:
map - a resource map
Returns:
a String with the serialized resource map
Throws:
IOException

serializeToXml

Element serializeToXml(ResourceMap map)
Serialize the resource map into XML.

Parameters:
map - a resource map
Returns:
an Element containing the result of the serialization


Copyright © 2008. All Rights Reserved.