Package org.fcrepo.migration.urlmappers
Class SelfReferencingURLMapper
- java.lang.Object
-
- org.fcrepo.migration.urlmappers.SelfReferencingURLMapper
-
- All Implemented Interfaces:
ExternalContentURLMapper
public class SelfReferencingURLMapper extends Object implements ExternalContentURLMapper
An ExternalContentURLMapper implementation that updates redirects that point to the fedora repository in which they originated to the destination of that pointed-to resource in the fedora 4 repository to which the content is being migrated. For example, if "http://localhost:8080/fedora/objects/object:1/datastreams/POLICY" was a redirect datastream in fedora 3 that redirected to "http://localhost:8080/fedora/objects/policy:1/datastreams/XACML/content", this class would supply the URL for the content of the migrated XACML datastream on the migrated policy:1 object.- Author:
- Mike Durbin
-
-
Constructor Summary
Constructors Constructor Description SelfReferencingURLMapper(String localFedoraServer, MigrationIDMapper idMapper)Basic constructor.
-
-
-
Constructor Detail
-
SelfReferencingURLMapper
public SelfReferencingURLMapper(String localFedoraServer, MigrationIDMapper idMapper)
Basic constructor.- Parameters:
localFedoraServer- the domain and port for the server that hosted the fedora objects in the format "localhost:8080".idMapper- the MigrationIDMapper used for the current migration scenario
-
-
Method Detail
-
mapURL
public String mapURL(String url)
- Specified by:
mapURLin interfaceExternalContentURLMapper- Parameters:
url- to be mapped- Returns:
- the String containing a URL that should be used instead of the given String for migrated external or redirect datastreams.
-
-