Class XMIIDGenerator
- java.lang.Object
-
- org.eclipse.glsp.server.emf.idgen.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 anXMIResource. If the IDs should be kept during resource loadings, a specialUUIDXMIResourceFactorymay 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.StringgetOrCreateId(org.eclipse.emf.ecore.EObject element)Returns a unique identifier for the given element.
-
-
-
Method Detail
-
getOrCreateId
public java.lang.String getOrCreateId(org.eclipse.emf.ecore.EObject element)
Description copied from interface:EMFIdGeneratorReturns 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:
getOrCreateIdin interfaceEMFIdGenerator- Parameters:
element- source element- Returns:
- unique ID
-
-