001/** 002 * The contents of this file are subject to the license and copyright 003 * detailed in the LICENSE and NOTICE files at the root of the source 004 * tree. 005 * 006 */ 007package org.fcrepo.migration; 008 009/** 010 * An interface whose implementations represent methods to 011 * convert Fedora 3 PIDs into fedora 4 paths. 012 * 013 * At one point it was thought that this should be more sophisticated 014 * to support more advanced mapping (ie, passing more information about 015 * the object, but in order to use this to resolve the "fedora:info/pid" 016 * URI's within fedora's RELS-EXT we only have the pid. Therefore 017 * implementations that need to do something more sophisticated, should 018 * build a mapping using whatever tooling it needs (and has available) 019 * such that it can return the result with just the PID. 020 * 021 * @author mdurbin 022 */ 023public interface MigrationIDMapper { 024 025 /** 026 * Takes a Fedora 3 pid and returns the path 027 * that object would have in Fedora 4. 028 * @param pid a PID for a Fedora 3 object. 029 * @return a path suitable for use in Fedora 4. 030 */ 031 public String mapObjectPath(String pid); 032 033 /** 034 * Takes a Fedora 3 PID and DSID and returns the path 035 * that datastream would have in Fedora 4. 036 * @param pid a PID for the Fedora 3 object 037 * @param dsid the DS id for the Fedora 3 datastream 038 * @return a path suitable for use in Fedora 4. 039 */ 040 public String mapDatastreamPath(String pid, String dsid); 041 042 /** 043 * @return the fedora 4 base URL. Paths returned by 044 * {@link #mapDatastreamPath} and {@link #mapObjectPath} 045 * appended to this value will be resolvable URLs in the 046 * fedora 4 repository. 047 */ 048 public String getBaseURL(); 049 050}