se.kb.oai.ore.impl
Class FactoryBase

java.lang.Object
  extended by se.kb.oai.ore.impl.FactoryBase
All Implemented Interfaces:
ResourceMapFactory
Direct Known Subclasses:
AtomFactory

public abstract class FactoryBase
extends Object
implements ResourceMapFactory

Abstract base class for the different ResourceMapFactory implementations.

Author:
Oskar Grenholm, National Library of Sweden

Constructor Summary
FactoryBase()
           
 
Method Summary
abstract  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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FactoryBase

public FactoryBase()
Method Detail

newResourceMap

public ResourceMap newResourceMap(String uri)
                           throws URISyntaxException
Description copied from interface: ResourceMapFactory
Create a new ResourceMap with this id.

Specified by:
newResourceMap in interface ResourceMapFactory
Parameters:
uri - the id
Returns:
a new resource map
Throws:
URISyntaxException

newResourceMap

public ResourceMap newResourceMap(URI uri)
Description copied from interface: ResourceMapFactory
Create a new ResourceMap with this id.

Specified by:
newResourceMap in interface ResourceMapFactory
Parameters:
uri - the id
Returns:
a new resource map

getResourceMap

public ResourceMap getResourceMap(URL url)
                           throws OAIException
Description copied from interface: ResourceMapFactory
Parse the content of the URL and create a ResourceMap from it.

Specified by:
getResourceMap in interface ResourceMapFactory
Parameters:
url - a URL
Returns:
a resource map representing the content of the URL
Throws:
OAIException

getResourceMap

public ResourceMap getResourceMap(String url)
                           throws OAIException
Description copied from interface: ResourceMapFactory
Parse the content of the URL and create a ResourceMap from it.

Specified by:
getResourceMap in interface ResourceMapFactory
Parameters:
url - a URL
Returns:
a resource map representing the content of the URL
Throws:
OAIException

getResourceMap

public abstract ResourceMap getResourceMap(Element root)
                                    throws OAIException
Description copied from interface: ResourceMapFactory
Parse the XML and create a ResourceMap from it.

Specified by:
getResourceMap in interface ResourceMapFactory
Parameters:
root - a XML element
Returns:
a resource map representing the content of the XML
Throws:
OAIException


Copyright © 2008. All Rights Reserved.