Class BackupUtils
- java.lang.Object
-
- org.eclipse.emf.edapt.internal.migration.internal.BackupUtils
-
public final class BackupUtils extends Object
Helper methods to deal with model backup.- Version:
- $Rev$
- Author:
- herrmama, $Author$
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
BackupUtils.URIMapper
Mapper to perform a mapping on URIs.
-
Field Summary
Fields Modifier and Type Field Description static String
BACKUP_FILE_EXTENSION
File extension for backed up model.static String
LOG_FILE_EXTENSION
File extension for log file.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<org.eclipse.emf.common.util.URI>
backup(List<org.eclipse.emf.common.util.URI> modelURIs, Metamodel metamodel)
Backup a model based on a number ofURI
s.static List<org.eclipse.emf.common.util.URI>
copy(List<org.eclipse.emf.common.util.URI> sourceURIs, Metamodel metamodel, BackupUtils.URIMapper mapper)
Copy a model based on a number ofURI
s.static org.eclipse.emf.common.util.URI
getBackupURI(org.eclipse.emf.common.util.URI modelURI)
Get the URI of the backup model corresponding to the URI of the model.static org.eclipse.emf.common.util.URI
getLogURI(org.eclipse.emf.common.util.URI modelURI)
Get the URI of the log file corresponding to the URI of the model.static org.eclipse.emf.common.util.URI
getModelURI(org.eclipse.emf.common.util.URI backupURI)
Get the URI of the model corresponding to the URI of the backup model.static List<org.eclipse.emf.common.util.URI>
restore(List<org.eclipse.emf.common.util.URI> backupURIs, Metamodel metamodel)
Backup a model based on a number ofURI
s.
-
-
-
Field Detail
-
BACKUP_FILE_EXTENSION
public static final String BACKUP_FILE_EXTENSION
File extension for backed up model.- See Also:
- Constant Field Values
-
LOG_FILE_EXTENSION
public static final String LOG_FILE_EXTENSION
File extension for log file.- See Also:
- Constant Field Values
-
-
Method Detail
-
getBackupURI
public static org.eclipse.emf.common.util.URI getBackupURI(org.eclipse.emf.common.util.URI modelURI)
Get the URI of the backup model corresponding to the URI of the model.- Parameters:
modelURI
- URI of model- Returns:
- URI of backup model
-
getModelURI
public static org.eclipse.emf.common.util.URI getModelURI(org.eclipse.emf.common.util.URI backupURI)
Get the URI of the model corresponding to the URI of the backup model.- Parameters:
backupURI
- URI of backup model- Returns:
- URI of model
-
getLogURI
public static org.eclipse.emf.common.util.URI getLogURI(org.eclipse.emf.common.util.URI modelURI)
Get the URI of the log file corresponding to the URI of the model.- Parameters:
modelURI
- URI of model- Returns:
- URI of log file
-
backup
public static List<org.eclipse.emf.common.util.URI> backup(List<org.eclipse.emf.common.util.URI> modelURIs, Metamodel metamodel) throws IOException
Backup a model based on a number ofURI
s.- Throws:
IOException
-
restore
public static List<org.eclipse.emf.common.util.URI> restore(List<org.eclipse.emf.common.util.URI> backupURIs, Metamodel metamodel) throws IOException
Backup a model based on a number ofURI
s.- Throws:
IOException
-
copy
public static List<org.eclipse.emf.common.util.URI> copy(List<org.eclipse.emf.common.util.URI> sourceURIs, Metamodel metamodel, BackupUtils.URIMapper mapper) throws IOException
Copy a model based on a number ofURI
s.- Throws:
IOException
-
-