se.kb.oai.ore.impl
Class SerializerBase

java.lang.Object
  extended by se.kb.oai.ore.impl.SerializerBase
All Implemented Interfaces:
ResourceMapSerializer
Direct Known Subclasses:
AtomSerializer

public abstract class SerializerBase
extends Object
implements ResourceMapSerializer

Abstract base class for the different ResourceMapSerializer implementations.

Author:
Oskar Grenholm, National Library of Sweden

Constructor Summary
SerializerBase()
           
 
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.
abstract  Element serializeToXml(ResourceMap map)
          Serialize the resource map into XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializerBase

public SerializerBase()
Method Detail

serializeToFile

public void serializeToFile(File file,
                            ResourceMap map)
                     throws IOException
Description copied from interface: ResourceMapSerializer
Serialize the resource map to the given file.

Specified by:
serializeToFile in interface ResourceMapSerializer
Parameters:
file - a file
map - a resource map
Throws:
IOException

serializeToString

public String serializeToString(ResourceMap map)
                         throws IOException
Description copied from interface: ResourceMapSerializer
Serialize the resource map and return it as a String.

Specified by:
serializeToString in interface ResourceMapSerializer
Parameters:
map - a resource map
Returns:
a String with the serialized resource map
Throws:
IOException

serializeToXml

public abstract Element serializeToXml(ResourceMap map)
Description copied from interface: ResourceMapSerializer
Serialize the resource map into XML.

Specified by:
serializeToXml in interface ResourceMapSerializer
Parameters:
map - a resource map
Returns:
an Element containing the result of the serialization


Copyright © 2008. All Rights Reserved.