Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.core.io.project.util
Class LocationUpdater

java.lang.Object
  extended by eu.esdihumboldt.hale.common.core.io.project.util.LocationUpdater
Direct Known Subclasses:
UILocationUpdater

public class LocationUpdater
extends Object

Updates locations in a project's I/O configurations that are not accessible, e.g. because the project file has been moved. The updater allows correcting paths to files that reside relative to the project.

Author:
Simon Templer

Constructor Summary
LocationUpdater()
           
 
Method Summary
protected  URI updatePathFallback(URI oldLocation)
          Update the path to a resource if automatic update fails.
 void updateProject(Project project, URI newProjectLoc)
          Update locations in the given project.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocationUpdater

public LocationUpdater()
Method Detail

updateProject

public void updateProject(Project project,
                          URI newProjectLoc)
Update locations in the given project.

Parameters:
project - the project object
newProjectLoc - the new project location

updatePathFallback

protected URI updatePathFallback(URI oldLocation)
Update the path to a resource if automatic update fails. The default implementation returns null, which means the location is not updated.

Parameters:
oldLocation - the old resource location
Returns:
the replacement resource location or null

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d