org.fcrepo.server.utilities.rebuild
Class SQLRebuilder

java.lang.Object
  extended by org.fcrepo.server.utilities.rebuild.SQLRebuilder
All Implemented Interfaces:
Rebuilder

public class SQLRebuilder
extends Object
implements Rebuilder

A Rebuilder for the SQL database.


Constructor Summary
SQLRebuilder()
           
 
Method Summary
 void addObject(DigitalObject obj)
          Add the data of interest for the given object.
 void blankExistingTables()
          Delete all rows from all Fedora-related tables (except the resource index ones) that exist in the database.
 void finish()
          Free up any system resources associated with rebuilding.
 String getAction()
          Get a short phrase describing what the user can do with this rebuilder.
static List<String> getExistingTables(Connection conn)
           
 Map<String,String> getOptions()
           
 void init()
           
 void setServerConfiguration(ServerConfiguration serverConfig)
          Initialize the rebuilder, given the server configuration.
 void setServerDir(File serverBaseDir)
           
 boolean shouldStopServer()
          Returns true is the server _must_ be shut down for this rebuilder to safely operate.
 void start(Map<String,String> options)
          Validate the provided options and perform any necessary startup tasks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLRebuilder

public SQLRebuilder()
Method Detail

getAction

public String getAction()
Get a short phrase describing what the user can do with this rebuilder.

Specified by:
getAction in interface Rebuilder

shouldStopServer

public boolean shouldStopServer()
Returns true is the server _must_ be shut down for this rebuilder to safely operate.

Specified by:
shouldStopServer in interface Rebuilder

setServerConfiguration

public void setServerConfiguration(ServerConfiguration serverConfig)
Initialize the rebuilder, given the server configuration.

Specified by:
setServerConfiguration in interface Rebuilder

setServerDir

public void setServerDir(File serverBaseDir)
Specified by:
setServerDir in interface Rebuilder

init

public void init()
Specified by:
init in interface Rebuilder

getOptions

public Map<String,String> getOptions()
Specified by:
getOptions in interface Rebuilder

start

public void start(Map<String,String> options)
           throws Exception
Validate the provided options and perform any necessary startup tasks.

Specified by:
start in interface Rebuilder
Throws:
Exception

getExistingTables

public static List<String> getExistingTables(Connection conn)
                                      throws SQLException
Throws:
SQLException

blankExistingTables

public void blankExistingTables()
Delete all rows from all Fedora-related tables (except the resource index ones) that exist in the database.


addObject

public void addObject(DigitalObject obj)
Add the data of interest for the given object.

Specified by:
addObject in interface Rebuilder

finish

public void finish()
Free up any system resources associated with rebuilding.

Specified by:
finish in interface Rebuilder


Copyright © 2012 DuraSpace. All Rights Reserved.