se.kb.oai.ore
Interface ResourceMapFactory

All Known Implementing Classes:
AtomFactory, FactoryBase

public interface ResourceMapFactory

A ResourceMapFactory will be used to create a ResourceMap. It can either be a totally new ResourceMap or one that is parsed from an existing serialization of a ResourceMap. Different implementations of this interface will handle different serialization formats.

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

Author:
Oskar Grenholm, National Library of Sweden

Method Summary
 ResourceMap getResourceMap(Element root)
          Parse the XML and create a ResourceMap from it.
 ResourceMap getResourceMap(String url)
          Parse the content of the URL and create a ResourceMap from it.
 ResourceMap getResourceMap(URL url)
          Parse the content of the URL and create a ResourceMap from it.
 ResourceMap newResourceMap(String uri)
          Create a new ResourceMap with this id.
 ResourceMap newResourceMap(URI uri)
          Create a new ResourceMap with this id.
 

Method Detail

newResourceMap

ResourceMap newResourceMap(String uri)
                           throws URISyntaxException
Create a new ResourceMap with this id.

Parameters:
uri - the id
Returns:
a new resource map
Throws:
URISyntaxException

newResourceMap

ResourceMap newResourceMap(URI uri)
Create a new ResourceMap with this id.

Parameters:
uri - the id
Returns:
a new resource map

getResourceMap

ResourceMap getResourceMap(URL url)
                           throws OAIException
Parse the content of the URL and create a ResourceMap from it.

Parameters:
url - a URL
Returns:
a resource map representing the content of the URL
Throws:
OAIException

getResourceMap

ResourceMap getResourceMap(String url)
                           throws OAIException
Parse the content of the URL and create a ResourceMap from it.

Parameters:
url - a URL
Returns:
a resource map representing the content of the URL
Throws:
OAIException

getResourceMap

ResourceMap getResourceMap(Element root)
                           throws OAIException
Parse the XML and create a ResourceMap from it.

Parameters:
root - a XML element
Returns:
a resource map representing the content of the XML
Throws:
OAIException


Copyright © 2008. All Rights Reserved.