public class EmfUtil extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends org.eclipse.emf.ecore.EObject> |
clone(T object) |
static void |
collectDependencies(org.eclipse.emf.ecore.EPackage ePackage,
List<org.eclipse.emf.ecore.EPackage> dependencies) |
static org.eclipse.emf.common.util.URI |
convertFileToUri(File file) |
static org.eclipse.emf.common.util.URI |
createFileBasedURI(String s) |
static String |
createFullyQualifiedUri(String relativePath) |
static org.eclipse.emf.common.util.URI |
createPlatformResourceURI(String s) |
static org.eclipse.emf.ecore.resource.Resource |
createResource() |
static org.eclipse.emf.ecore.resource.Resource |
createResource(org.eclipse.emf.ecore.EObject rootObject) |
static org.eclipse.emf.ecore.resource.Resource |
createResource(org.eclipse.emf.ecore.EObject rootObject,
org.eclipse.emf.common.util.URI uri) |
static org.eclipse.emf.ecore.resource.Resource |
createResource(org.eclipse.emf.common.util.URI uri) |
static org.eclipse.emf.common.util.URI |
createUri(String uri) |
static List<org.eclipse.emf.ecore.EObject> |
getAllContents(org.eclipse.emf.ecore.resource.Resource r) |
static List<org.eclipse.emf.ecore.EClass> |
getAllEClassesFromSameMetamodelAs(org.eclipse.emf.ecore.EModelElement metamodelElement) |
static Collection<org.eclipse.emf.ecore.EClassifier> |
getAllEClassifiers(org.eclipse.emf.ecore.EPackage epackage) |
static <T extends org.eclipse.emf.ecore.EObject> |
getAllModelElementsOfType(org.eclipse.emf.ecore.EObject modelElement,
Class<T> type) |
static org.eclipse.emf.ecore.EStructuralFeature |
getEStructuralFeature(org.eclipse.emf.ecore.EClass eClass,
String featureName) |
static String |
getFile(org.eclipse.emf.common.util.URI uri) |
static org.eclipse.emf.ecore.EPackage |
getTopEPackage(org.eclipse.emf.ecore.EObject object) |
static org.eclipse.emf.ecore.EPackage |
getTopEPackage(org.eclipse.emf.ecore.EPackage ePackage) |
static int |
instancesCount(org.eclipse.emf.ecore.resource.Resource r) |
static List<org.eclipse.emf.ecore.EPackage> |
register(File file,
org.eclipse.emf.ecore.EPackage.Registry registry) |
static List<org.eclipse.emf.ecore.EPackage> |
register(org.eclipse.emf.common.util.URI uri,
org.eclipse.emf.ecore.EPackage.Registry registry) |
static List<org.eclipse.emf.ecore.EPackage> |
register(org.eclipse.emf.common.util.URI uri,
org.eclipse.emf.ecore.EPackage.Registry registry,
boolean useUriForResource)
Register all the packages in the metamodel specified by the uri in the registry.
|
static List<org.eclipse.emf.ecore.EPackage> |
registerXcore(org.eclipse.emf.common.util.URI locationURI) |
static List<org.eclipse.emf.ecore.EPackage> |
registerXcore(org.eclipse.emf.common.util.URI locationURI,
boolean useUriForResource) |
static List<org.eclipse.emf.ecore.EPackage> |
registerXcore(org.eclipse.emf.common.util.URI locationURI,
org.eclipse.emf.ecore.EPackage.Registry registry) |
static List<org.eclipse.emf.ecore.EPackage> |
registerXcore(org.eclipse.emf.common.util.URI locationURI,
org.eclipse.emf.ecore.EPackage.Registry registry,
boolean useUriForResource) |
protected static void |
setDataTypesInstanceClasses(org.eclipse.emf.ecore.resource.Resource metamodel) |
public static org.eclipse.emf.common.util.URI createUri(String uri)
uri
- public static org.eclipse.emf.common.util.URI convertFileToUri(File file)
file
- public static org.eclipse.emf.ecore.EStructuralFeature getEStructuralFeature(org.eclipse.emf.ecore.EClass eClass, String featureName)
public static String createFullyQualifiedUri(String relativePath)
relativePath
- public static org.eclipse.emf.common.util.URI createPlatformResourceURI(String s)
public static org.eclipse.emf.common.util.URI createFileBasedURI(String s)
public static String getFile(org.eclipse.emf.common.util.URI uri)
public static org.eclipse.emf.ecore.EPackage getTopEPackage(org.eclipse.emf.ecore.EObject object)
public static void collectDependencies(org.eclipse.emf.ecore.EPackage ePackage, List<org.eclipse.emf.ecore.EPackage> dependencies)
public static org.eclipse.emf.ecore.EPackage getTopEPackage(org.eclipse.emf.ecore.EPackage ePackage)
public static List<org.eclipse.emf.ecore.EPackage> register(org.eclipse.emf.common.util.URI uri, org.eclipse.emf.ecore.EPackage.Registry registry) throws Exception
Exception
public static List<org.eclipse.emf.ecore.EPackage> register(File file, org.eclipse.emf.ecore.EPackage.Registry registry) throws Exception
uri
- registry
- Exception
public static List<org.eclipse.emf.ecore.EPackage> register(org.eclipse.emf.common.util.URI uri, org.eclipse.emf.ecore.EPackage.Registry registry, boolean useUriForResource) throws Exception
uri
- The URI of the metamodelregistry
- The registry in which the metamodel's packages are registereduseUriForResource
- If True, the URI of the resource created for the metamodel would be overwritten
with the URI of the last EPackage in the metamodel.Exception
- If there is an error accessing the resources.public static List<org.eclipse.emf.ecore.EPackage> registerXcore(org.eclipse.emf.common.util.URI locationURI, org.eclipse.emf.ecore.EPackage.Registry registry) throws IOException
IOException
public static List<org.eclipse.emf.ecore.EPackage> registerXcore(org.eclipse.emf.common.util.URI locationURI, org.eclipse.emf.ecore.EPackage.Registry registry, boolean useUriForResource) throws IOException
IOException
public static List<org.eclipse.emf.ecore.EPackage> registerXcore(org.eclipse.emf.common.util.URI locationURI) throws IOException
IOException
public static List<org.eclipse.emf.ecore.EPackage> registerXcore(org.eclipse.emf.common.util.URI locationURI, boolean useUriForResource) throws IOException
IOException
protected static void setDataTypesInstanceClasses(org.eclipse.emf.ecore.resource.Resource metamodel)
public static List<org.eclipse.emf.ecore.EClass> getAllEClassesFromSameMetamodelAs(org.eclipse.emf.ecore.EModelElement metamodelElement)
public static Collection<org.eclipse.emf.ecore.EClassifier> getAllEClassifiers(org.eclipse.emf.ecore.EPackage epackage)
public static <T extends org.eclipse.emf.ecore.EObject> List<T> getAllModelElementsOfType(org.eclipse.emf.ecore.EObject modelElement, Class<T> type)
public static org.eclipse.emf.ecore.resource.Resource createResource()
public static org.eclipse.emf.ecore.resource.Resource createResource(org.eclipse.emf.common.util.URI uri)
public static org.eclipse.emf.ecore.resource.Resource createResource(org.eclipse.emf.ecore.EObject rootObject)
public static org.eclipse.emf.ecore.resource.Resource createResource(org.eclipse.emf.ecore.EObject rootObject, org.eclipse.emf.common.util.URI uri)
public static <T extends org.eclipse.emf.ecore.EObject> T clone(T object)
public static List<org.eclipse.emf.ecore.EObject> getAllContents(org.eclipse.emf.ecore.resource.Resource r)
r
- public static int instancesCount(org.eclipse.emf.ecore.resource.Resource r)
r
- Copyright © 2020. All rights reserved.