Class 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.
    • 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 of URIs.
      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 of URIs.
      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 of URIs.
    • 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 of URIs.
        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 of URIs.
        Throws:
        IOException