|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.core.model.util.ModelingUtil
public final class ModelingUtil
Utility class with static methods to handle EMF models and GEF EditParts.
Method Summary | ||
---|---|---|
static String |
fragmentUriToKielerUri(String fragmentUri,
Resource resource)
Method to get a (more readable) KIELER URI from a EMF Fragment URI and its resource. |
|
static String |
fragmentUriToKielerUri(String fragmentUri,
Resource resource,
String nameProperty)
Method to get a (more readable) KIELER URI from a EMF Fragment URI and its resource. |
|
static Collection<EObject> |
getAllAncestorsByType(EClassifier eObjectClass,
EObject rootObject)
Get all objects that are direct or indirect parents of the given root EObject if they are of the given type. |
|
static Collection<EObject> |
getAllByType(EClassifier eObjectClass,
EObject rootObject)
Get all objects that are direct or indirect children of the given root EObject if they are of the specified type. |
|
static String |
getFragmentUri(EObject eo)
Method to get the EMF Fragment URI for a given EObject. |
|
static
|
iterator2Collection(Iterator<T> iter)
Convert an Iterator to a Collection. |
|
static String |
kielerUriToFragmentUri(String kielerUri,
Resource resource)
Translate a KIELER URI to an EMF Fragment URI. |
|
static String |
kielerUriToFragmentUri(String kielerUri,
Resource resource,
String nameProperty)
Translate a KIELER URI to an EMF Fragment URI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Collection<EObject> getAllByType(EClassifier eObjectClass, EObject rootObject)
eObjectClass
- The type of objectrootObject
- The root object
public static Collection<EObject> getAllAncestorsByType(EClassifier eObjectClass, EObject rootObject)
eObjectClass
- The type of objectrootObject
- The root object to start the search
public static <T> Collection<T> iterator2Collection(Iterator<T> iter)
T
- the base typeiter
- The input Iterator
public static String kielerUriToFragmentUri(String kielerUri, Resource resource)
kielerUri
- The KIELER URI referring an EObject.resource
- The Resource holding the EObject.
public static String kielerUriToFragmentUri(String kielerUri, Resource resource, String nameProperty)
kielerUri
- The KIELER URI referring an EObject.resource
- The Resource holding the EObject.nameProperty
- the name of the structural feature that is used to get a name for elements
public static String fragmentUriToKielerUri(String fragmentUri, Resource resource)
fragmentUri
- The Fragment URI from which the KIELER URI is generated (must not be null).resource
- The resource in which the referred EObject is held.
NamedObject
public static String fragmentUriToKielerUri(String fragmentUri, Resource resource, String nameProperty)
fragmentUri
- The Fragment URI from which the KIELER URI is generated (must not be null).resource
- The resource in which the referred EObject is held.nameProperty
- the name of the structural feature that is used to get a name for elements
public static String getFragmentUri(EObject eo)
eo
- The EObject for which the URI is requested (must not be null).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |