Class ProfileImportResolver

java.lang.Object
org.modelversioning.emfprofileapplication.util.ProfileImportResolver

public class ProfileImportResolver extends Object
Utility class to resolve profile imports. TODO write to global persistent registry.
  • Constructor Details

    • ProfileImportResolver

      public ProfileImportResolver()
  • Method Details

    • resolve

      public static Profile resolve(ProfileImport profileImport)
      Tries to resolve the supplied profileImport using the global EPackage.Registry.

      If the Profile could be resolved, it will be set to the Profile.

      Parameters:
      profileImport - to resolve.
      Returns:
      resolved Profile.
    • resolve

      public static Profile resolve(ProfileImport profileImport, ResourceSet resourceSet)
      Tries to resolve the supplied profileImport using the global EPackage.Registry and the local registry of the supplied resourceSet.

      If the Profile could be resolved, it will be set to the Profile.

      Parameters:
      profileImport - to resolve.
      resourceSet - used for resolution.
      Returns:
      the resolved Profile or null.
    • persistProfileImport

      public static void persistProfileImport(ProfileImport profileImport)
      Persists the specified profileImport so that it can be resolved later. This method may change the location for a later resolution.
      Parameters:
      profileImport - to persist.
      Throws:
      IllegalArgumentException - if profileImport has no Profile set.