public class EmfUtil extends Object
Modifier and Type | Field and Description |
---|---|
static Map<Object,Object> |
DEFAULT_SAVE_OPTIONS |
static String |
PATH_SEPARATOR |
static Adapter |
RESOURCE_PERSISTED_ADAPTER |
public static final String PATH_SEPARATOR
public static final Adapter RESOURCE_PERSISTED_ADAPTER
public static ModelContent loadModel(URI uri)
public static ModelContent loadModel(URI uri, ResourceSet rs)
public static ModelContent safeLoadModel(URI uri, ResourceSet rs)
public static EObject resolveSource(EObject in, ResourceSet rs)
public static Set<EObject> getResolvedContent(Collection<EObject> content, EObject metamodel)
public static Set<EObject> getResolvedContent(Collection<EObject> content, ResourceSet rs)
public static boolean isUriExistsAsEObject(URI uri, ResourceSet rs, boolean validateNonEmpty)
public static boolean isDynamic(EObject eObject)
public static void saveModel(EObject eObject, URI uri, Map<Object,Object> opts) throws EmfException
EmfException
public static void saveModel(Resource modelExtent, Map<Object,Object> opts) throws EmfException
EmfException
public static ResourceSet getOutputResourceSet()
public static String getFullName(EClassifier cls)
public static String getFullNameRelativeToPackage(EPackage ePackage, EPackage baseQwningPackage)
ePackage
- the package of which to retrieve the full namebaseOwningPackage
- the package representing the root context for relative name
resolution.
This package and its possible super-packages will be excluded
from the full-name. If it is the immediate owning package of
the ePackage
, the local name of ePackage
is
returned.
public static String getFullNameRelativeToPackage(EClassifier eClassifier, EPackage baseOwningPackage)
eClassifier
- the classifier of which to retrieve namebaseOwningPackage
- the package representing the root context for relative name
resolution.
This package and its possible super-packages will be excluded from the full-name. If it is the immediate owning package of the given classifier, the local name of the classifier is returned.
public static EClass getEClass(EPackage root, String[] fullName) throws EmfException
EmfException
public static String getRootPackageUri(EClassifier cls)
public static boolean isAssignableFrom(EClassifier type, EClassifier from)
public static Resource createResource(URI uri, ResourceSet outResourceSet)
public static boolean isUriMapped(ResourceSet resourceSet, URI uri)
public static void cleanupResourceSet(ResourceSet rs)
public static boolean isUriExists(URI uri, ResourceSet rs, boolean validateNonEmpty)
Copyright © 2008, 2018 Borland Software Corporation and others. All Rights Reserved.