Class ProfileImportResolver
- java.lang.Object
-
- org.modelversioning.emfprofileapplication.util.ProfileImportResolver
-
public class ProfileImportResolver extends Object
Utility class to resolveprofile imports
. TODO write to global persistent registry.
-
-
Constructor Summary
Constructors Constructor Description ProfileImportResolver()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
persistProfileImport(ProfileImport profileImport)
Persists the specifiedprofileImport
so that it can be resolved later.static Profile
resolve(ProfileImport profileImport)
Tries to resolve the suppliedprofileImport
using the globalEPackage.Registry
.static Profile
resolve(ProfileImport profileImport, ResourceSet resourceSet)
Tries to resolve the suppliedprofileImport
using the globalEPackage.Registry
and the local registry of the suppliedresourceSet
.
-
-
-
Method Detail
-
resolve
public static Profile resolve(ProfileImport profileImport)
Tries to resolve the suppliedprofileImport
using the globalEPackage.Registry
.If the
Profile
could be resolved, it will beset
to theProfile
.- Parameters:
profileImport
- to resolve.- Returns:
- resolved
Profile
.
-
resolve
public static Profile resolve(ProfileImport profileImport, ResourceSet resourceSet)
Tries to resolve the suppliedprofileImport
using the globalEPackage.Registry
and the local registry of the suppliedresourceSet
.If the
Profile
could be resolved, it will beset
to theProfile
.- Parameters:
profileImport
- to resolve.resourceSet
- used for resolution.- Returns:
- the resolved
Profile
ornull
.
-
persistProfileImport
public static void persistProfileImport(ProfileImport profileImport)
Persists the specifiedprofileImport
so that it can be resolved later. This method may changethe location
for a later resolution.- Parameters:
profileImport
- to persist.- Throws:
IllegalArgumentException
- ifprofileImport
has noProfile
set
.
-
-