Class HistoryUtils


  • public final class HistoryUtils
    extends Object
    Helper methods to deal with the metamodel history
    Version:
    $Rev$
    Author:
    herrmama, $Author$
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.eclipse.emf.common.util.URI getDefaultHistoryURI​(org.eclipse.emf.ecore.resource.Resource metamodelResource)
      Get URI where the history has to be stored for a certain metamodel.
      static org.eclipse.emf.ecore.resource.Resource getHistoryResource​(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
      Get the resource with the history from a resource set
      static org.eclipse.emf.common.util.URI getHistoryURI​(org.eclipse.emf.ecore.resource.Resource metamodelResource)
      Get the URI of the history model.
      static Release getMinimumRelease​(Set<Release> releases)
      Get the minimum release of a set of releases.
      static Release getRelease​(Collection<Release> releases, int number)
      Get a release with a certain number.
      static org.eclipse.emf.ecore.resource.Resource getRootResource​(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
      Get the resource with the root metamodel from a resource set
      static void setHistoryURI​(org.eclipse.emf.ecore.resource.Resource metamodelResource, org.eclipse.emf.common.util.URI historyURI)
      Set the URI of the history model.
    • Field Detail

      • HISTORY_FILE_EXTENSION

        public static final String HISTORY_FILE_EXTENSION
        Extension of a history file
        See Also:
        Constant Field Values
    • Method Detail

      • getRootResource

        public static org.eclipse.emf.ecore.resource.Resource getRootResource​(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
        Get the resource with the root metamodel from a resource set
        Parameters:
        resourceSet - Resource set
        Returns:
        Resource
      • getHistoryResource

        public static org.eclipse.emf.ecore.resource.Resource getHistoryResource​(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
        Get the resource with the history from a resource set
        Parameters:
        resourceSet - Resource set
        Returns:
        Resource
      • getHistoryURI

        public static org.eclipse.emf.common.util.URI getHistoryURI​(org.eclipse.emf.ecore.resource.Resource metamodelResource)
        Get the URI of the history model.
      • getDefaultHistoryURI

        public static org.eclipse.emf.common.util.URI getDefaultHistoryURI​(org.eclipse.emf.ecore.resource.Resource metamodelResource)
        Get URI where the history has to be stored for a certain metamodel.
      • setHistoryURI

        public static void setHistoryURI​(org.eclipse.emf.ecore.resource.Resource metamodelResource,
                                         org.eclipse.emf.common.util.URI historyURI)
        Set the URI of the history model.
      • getRelease

        public static Release getRelease​(Collection<Release> releases,
                                         int number)
        Get a release with a certain number.
      • getMinimumRelease

        public static Release getMinimumRelease​(Set<Release> releases)
        Get the minimum release of a set of releases.