public class Migrator extends Object
| Constructor and Description |
|---|
Migrator(History history,
IClassLoader classLoader)
Constructor.
|
Migrator(org.eclipse.emf.common.util.URI historyURI,
IClassLoader classLoader)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Release |
getLatestRelease()
Get the latest release.
|
Metamodel |
getMetamodel(Release release)
Returns the metamodel for a release.
|
Set<String> |
getNsURIs()
Get set of namespace URIs.
|
IResourceSetProcessor |
getPostLoadModelProcessor()
The post load model processor.
|
Release |
getRelease(int number)
Get the release with a certain number.
|
Set<Release> |
getRelease(Set<String> nsURIs)
Get the release of a model based on a set of namespace URIs.
|
Set<Release> |
getRelease(org.eclipse.emf.common.util.URI modelURI)
Get the release of a model based on
URI. |
Map<String,Set<Release>> |
getReleaseMap()
Get the release map from NS-URI to releases
|
List<Release> |
getReleases()
Get all releases.
|
IResourceSetFactory |
getResourceSetFactory()
Get the factory to create
ResourceSets for custom serialization. |
static void |
main(String[] args)
Main method to perform migrations.
|
org.eclipse.emf.ecore.resource.ResourceSet |
migrateAndLoad(List<org.eclipse.emf.common.util.URI> modelURIs,
Release sourceRelease,
Release targetRelease,
org.eclipse.core.runtime.IProgressMonitor monitor)
Migrate a model based on a set of
URIs and load it afterwards. |
void |
migrateAndSave(List<org.eclipse.emf.common.util.URI> modelURIs,
Release sourceRelease,
Release targetRelease,
org.eclipse.core.runtime.IProgressMonitor monitor)
Migrate a model based on a set of
URI. |
void |
migrateAndSave(List<org.eclipse.emf.common.util.URI> modelURIs,
Release sourceRelease,
Release targetRelease,
org.eclipse.core.runtime.IProgressMonitor monitor,
Map<String,Object> options)
Migrate a model based on a set of
URI. |
void |
setLevel(ValidationLevel level)
Set the validation level.
|
void |
setPostLoadModelProcessor(IResourceSetProcessor postLoadProcessor)
The given processor will be called after the outdated model was loaded.
|
void |
setResourceSetFactory(IResourceSetFactory resourceSetFactory)
Set the factory to create
ResourceSets for custom serialization. |
public Migrator(org.eclipse.emf.common.util.URI historyURI,
IClassLoader classLoader)
throws MigrationException
MigrationExceptionpublic Migrator(History history, IClassLoader classLoader)
public void migrateAndSave(List<org.eclipse.emf.common.util.URI> modelURIs, Release sourceRelease, Release targetRelease, org.eclipse.core.runtime.IProgressMonitor monitor) throws MigrationException
URI.modelURIs - sourceRelease - Release to which the model conformstargetRelease - Release to which the model should be migrated (use null for
the newest release)monitor - Progress monitorMigrationExceptionpublic void migrateAndSave(List<org.eclipse.emf.common.util.URI> modelURIs, Release sourceRelease, Release targetRelease, org.eclipse.core.runtime.IProgressMonitor monitor, Map<String,Object> options) throws MigrationException
URI.modelURIs - sourceRelease - Release to which the model conformstargetRelease - Release to which the model should be migrated (use null for
the newest release)monitor - Progress monitoroptions - Options to pass to the ResourceSet when savingMigrationExceptionpublic org.eclipse.emf.ecore.resource.ResourceSet migrateAndLoad(List<org.eclipse.emf.common.util.URI> modelURIs, Release sourceRelease, Release targetRelease, org.eclipse.core.runtime.IProgressMonitor monitor) throws MigrationException
URIs and load it afterwards.modelURIs - The set of URIsourceRelease - Release to which the model conformstargetRelease - Release to which the model should be migrated (use null for
the newest release)monitor - Progress monitorResourceSetMigrationExceptionpublic Release getLatestRelease()
public Set<Release> getRelease(org.eclipse.emf.common.util.URI modelURI)
URI.public Set<Release> getRelease(Set<String> nsURIs)
public Map<String,Set<Release>> getReleaseMap()
public Release getRelease(int number)
public void setLevel(ValidationLevel level)
public static void main(String[] args)
public void setResourceSetFactory(IResourceSetFactory resourceSetFactory)
ResourceSets for custom serialization.public IResourceSetFactory getResourceSetFactory()
ResourceSets for custom serialization.public void setPostLoadModelProcessor(IResourceSetProcessor postLoadProcessor)
public IResourceSetProcessor getPostLoadModelProcessor()
Copyright © 2020. All rights reserved.