Package org.fcrepo.migration
Class Migrator
- java.lang.Object
-
- org.fcrepo.migration.Migrator
-
public class Migrator extends Object
A class that represents a command-line program to migrate a fedora 3 repository to fedora 4. There are two main configuration options: the source and the handler. The source is responsible for exposing objects from a fedora repository, while the handler is responsible for processing each one.- Author:
- mdurbin
-
-
Constructor Summary
Constructors Constructor Description Migrator()the migrator.Migrator(ObjectSource source, StreamingFedoraObjectHandler handler)The constructor for migrator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)the main method.voidrun()the run method for migrator.voidsetContinueOnError(boolean flag)set the continue on error flagvoidsetHandler(StreamingFedoraObjectHandler handler)set the handler.voidsetLimit(int limit)set the limit.voidsetPidListManagers(List<PidListManager> pidListManagers)set the list of PidListManagersvoidsetSource(ObjectSource source)set the source.
-
-
-
Constructor Detail
-
Migrator
public Migrator()
the migrator. set limit to -1.
-
Migrator
public Migrator(ObjectSource source, StreamingFedoraObjectHandler handler)
The constructor for migrator.- Parameters:
source- the sourcehandler- the handler
-
-
Method Detail
-
main
public static void main(String[] args) throws IOException, XMLStreamException
the main method.- Parameters:
args- the arguments- Throws:
IOException- IO exceptionXMLStreamException- xml stream exception
-
setLimit
public void setLimit(int limit)
set the limit.- Parameters:
limit- the limit
-
setSource
public void setSource(ObjectSource source)
set the source.- Parameters:
source- the object source
-
setHandler
public void setHandler(StreamingFedoraObjectHandler handler)
set the handler.- Parameters:
handler- the handler
-
setPidListManagers
public void setPidListManagers(List<PidListManager> pidListManagers)
set the list of PidListManagers- Parameters:
pidListManagers- the list
-
setContinueOnError
public void setContinueOnError(boolean flag)
set the continue on error flag- Parameters:
flag- flag indicating whether or not to continue on error.
-
run
public void run() throws XMLStreamException
the run method for migrator.- Throws:
XMLStreamException- xml stream exception
-
-