Class ProfileImportResolver
java.lang.Object
org.modelversioning.emfprofileapplication.util.ProfileImportResolver
Utility class to resolve
profile imports
.
TODO write to global persistent registry.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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
.
-
Constructor Details
-
ProfileImportResolver
public ProfileImportResolver()
-
-
Method Details
-
resolve
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
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
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
.
-