org.dspace.sword
Class CollectionLocation

java.lang.Object
  extended by org.dspace.sword.CollectionLocation

public class CollectionLocation
extends Object

This class provides a single point of contact for resolving Collections from SWORD Deposit URLs and for generating SWORD Deposit URLs from Collections

Author:
Richard Jones

Field Summary
static org.apache.log4j.Logger log
          Log4j logger
 
Constructor Summary
CollectionLocation()
           
 
Method Summary
 Collection getCollection(Context context, String location)
          Obtain the collection which is represented by the given URL
 String getLocation(Collection collection)
          Obtain the deposit URL for the given collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final org.apache.log4j.Logger log
Log4j logger

Constructor Detail

CollectionLocation

public CollectionLocation()
Method Detail

getLocation

public String getLocation(Collection collection)
                   throws DSpaceSWORDException
Obtain the deposit URL for the given collection. These URLs should not be considered persistent, but will remain consistent unless configuration changes are made to DSpace

Parameters:
collection -
Returns:
The Deposit URL
Throws:
DSpaceSWORDException

getCollection

public Collection getCollection(Context context,
                                String location)
                         throws DSpaceSWORDException
Obtain the collection which is represented by the given URL

Parameters:
context - the DSpace context
location - the URL to resolve to a collection
Returns:
The collection to which the url resolves
Throws:
DSpaceSWORDException


Copyright © 2011 DuraSpace. All Rights Reserved.