org.eclipse.ocl.examples.common.utils
Class XMIUtils

java.lang.Object
  extended by org.eclipse.ocl.examples.common.utils.XMIUtils

public class XMIUtils
extends java.lang.Object


Nested Class Summary
static class XMIUtils.ExcludedEClassIdFilter
           
static class XMIUtils.HierachicalENamedElementIdCreator
          Create xmi:id's using the same hierarchical/URI fragment algorithm as EMOFResourceImpl
static interface XMIUtils.IdCreator
           
static interface XMIUtils.IdFilter
           
static class XMIUtils.LinearPrefixedIdCreator
          Create short xmi:id's comprising a prefix and a linearly increasing count
static class XMIUtils.ShortPrefixedIdCreator
          Create short xmi:id's comprising a prefix and a small random count
static class XMIUtils.UUIDCreator
          Create xmi:id's comprising a unique universal identifier
 
Field Summary
static XMIUtils.UUIDCreator uuidCreator
           
 
Constructor Summary
XMIUtils()
           
 
Method Summary
static void assignIds(org.eclipse.emf.ecore.resource.Resource resource, java.lang.String xmiIdPrefix)
           
static void assignIds(org.eclipse.emf.ecore.resource.Resource resource, XMIUtils.IdCreator idCreator, XMIUtils.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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uuidCreator

public static final XMIUtils.UUIDCreator uuidCreator
Constructor Detail

XMIUtils

public XMIUtils()
Method Detail

assignIds

public static void assignIds(org.eclipse.emf.ecore.resource.Resource resource,
                             XMIUtils.IdCreator idCreator,
                             XMIUtils.IdFilter idFilter)
Assign an xmi:id to all objects in resource. A non-null idFilter may choose whether an xmi:id is assigned. The idCreator is responsible for providing a candidate xmi:id, which, if not unique will be suffixed until it is.

Parameters:
resource -
idCreator -
idFilter -

assignIds

public static void assignIds(org.eclipse.emf.ecore.resource.Resource resource,
                             java.lang.String xmiIdPrefix)

assignLinearIds

public static void assignLinearIds(org.eclipse.emf.ecore.resource.Resource resource,
                                   java.lang.String xmiIdPrefix)