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 voidpersistProfileImport(ProfileImport profileImport)Persists the specifiedprofileImportso that it can be resolved later.static Profileresolve(ProfileImport profileImport)Tries to resolve the suppliedprofileImportusing the globalEPackage.Registry.static Profileresolve(ProfileImport profileImport, ResourceSet resourceSet)Tries to resolve the suppliedprofileImportusing the globalEPackage.Registryand the local registry of the suppliedresourceSet.
-
-
-
Method Detail
-
resolve
public static Profile resolve(ProfileImport profileImport)
Tries to resolve the suppliedprofileImportusing the globalEPackage.Registry.If the
Profilecould be resolved, it will besetto theProfile.- Parameters:
profileImport- to resolve.- Returns:
- resolved
Profile.
-
resolve
public static Profile resolve(ProfileImport profileImport, ResourceSet resourceSet)
Tries to resolve the suppliedprofileImportusing the globalEPackage.Registryand the local registry of the suppliedresourceSet.If the
Profilecould be resolved, it will besetto theProfile.- Parameters:
profileImport- to resolve.resourceSet- used for resolution.- Returns:
- the resolved
Profileornull.
-
persistProfileImport
public static void persistProfileImport(ProfileImport profileImport)
Persists the specifiedprofileImportso that it can be resolved later. This method may changethe locationfor a later resolution.- Parameters:
profileImport- to persist.- Throws:
IllegalArgumentException- ifprofileImporthas noProfileset.
-
-