public class XMIUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
XMIUtil.ExcludedEClassIdFilter |
static class |
XMIUtil.HierachicalENamedElementIdCreator
Create xmi:id's using the same hierarchical/URI fragment algorithm as EMOFResourceImpl
|
static interface |
XMIUtil.IdCreator |
static interface |
XMIUtil.IdFilter |
static class |
XMIUtil.LinearPrefixedIdCreator
Create short xmi:id's comprising a prefix and a linearly increasing count
|
static class |
XMIUtil.ShortPrefixedIdCreator
Create short xmi:id's comprising a prefix and a small random count
|
static class |
XMIUtil.StructuralENamedElementIdCreator
Create xmi:id's for the structural (EPackage, EClassifier, EStructuralFeature, EEnumLiteral) elements of an Ecore model.
|
static class |
XMIUtil.UUIDCreator
Create xmi:id's comprising a unique universal identifier
|
Modifier and Type | Field and Description |
---|---|
static XMIUtil.UUIDCreator |
uuidCreator |
Constructor and Description |
---|
XMIUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
assignIds(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.String xmiIdPrefix) |
static void |
assignIds(org.eclipse.emf.ecore.resource.Resource resource,
XMIUtil.IdCreator idCreator,
XMIUtil.IdFilter idFilter)
Assign an xmi:id to all objects in resource.
|
static void |
assignLinearIds(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.String xmiIdPrefix) |
static java.util.Map<java.lang.Object,java.lang.Object> |
createSaveOptions()
Return a set of saveOptions supporting UTF-8 with 132 character Unix lines.
|
static java.util.Map<org.eclipse.emf.ecore.EObject,java.lang.String> |
getIds(org.eclipse.emf.ecore.xmi.XMLResource xmlResource)
Return a mapping from all EObjects within xmlResource to their xmi:id or null if no xmi:ids assigned.
|
static void |
setIds(org.eclipse.emf.ecore.xmi.XMLResource xmlResource,
java.util.Map<org.eclipse.emf.ecore.EObject,java.lang.String> eObject2xmiId)
Assign the xmi:ids to the EObjects within xmlResource.
|
public static final XMIUtil.UUIDCreator uuidCreator
public static void assignIds(@NonNull org.eclipse.emf.ecore.resource.Resource resource, @NonNull XMIUtil.IdCreator idCreator, @Nullable XMIUtil.IdFilter idFilter)
resource
- idCreator
- idFilter
- public static void assignIds(@NonNull org.eclipse.emf.ecore.resource.Resource resource, @Nullable java.lang.String xmiIdPrefix)
public static void assignLinearIds(@NonNull org.eclipse.emf.ecore.resource.Resource resource, @Nullable java.lang.String xmiIdPrefix)
@NonNull public static java.util.Map<java.lang.Object,java.lang.Object> createSaveOptions()
@Nullable public static java.util.Map<org.eclipse.emf.ecore.EObject,java.lang.String> getIds(@NonNull org.eclipse.emf.ecore.xmi.XMLResource xmlResource)
public static void setIds(@NonNull org.eclipse.emf.ecore.xmi.XMLResource xmlResource, @NonNull java.util.Map<org.eclipse.emf.ecore.EObject,java.lang.String> eObject2xmiId)