Class XMIIDGenerator

  • All Implemented Interfaces:
    EMFIdGenerator

    public class XMIIDGenerator
    extends java.lang.Object
    implements EMFIdGenerator
    An ID generator that uses the IDs within an XMI resource to identify elements. If this strategy is used, it must be ensured that the element is stored in an XMIResource. If the IDs should be kept during resource loadings, a special UUIDXMIResourceFactory may be used to load and store the resource. Please note that with this strategy, IDs cannot be generated for detached elements that are not part of the resource, e.g., newly created elements that have not been added yet.
    • Constructor Summary

      Constructors 
      Constructor Description
      XMIIDGenerator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getOrCreateId​(org.eclipse.emf.ecore.EObject element)
      Returns a unique identifier for the given element.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XMIIDGenerator

        public XMIIDGenerator()
    • Method Detail

      • getOrCreateId

        public java.lang.String getOrCreateId​(org.eclipse.emf.ecore.EObject element)
        Description copied from interface: EMFIdGenerator
        Returns a unique identifier for the given element. The same element must always return the same id and should not conflict with other elements.
        Specified by:
        getOrCreateId in interface EMFIdGenerator
        Parameters:
        element - source element
        Returns:
        unique ID