Modifier and Type | Field and Description |
---|---|
static org.eclipse.emf.ecore.EPackage.Registry |
registry |
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static void |
addAnnotation(org.eclipse.emf.ecore.EModelElement modelElement,
String source,
String key,
String value)
Adds detail entry to designated annotation of given model element.
|
static void |
beginTransaction(JCoDestination jcoDestination)
Begin transaction on given destination.
|
static void |
commitTransaction(JCoDestination jcoDestination)
Commit transaction on given transaction.
|
static Date |
convertSapDateStringToDate(String sapDateString) |
static Date |
convertSapTimeStringToDate(String sapTimeString) |
static void |
ensureBasePackages() |
static org.eclipse.emf.ecore.EObject |
fromInputStream(InputStream in)
Unserializes object from
in . |
static String |
getAnnotation(org.eclipse.emf.ecore.EModelElement modelElement,
String source,
String key)
Returns the value of the annotation from
modelElement
identified by source and key . |
static Object |
getValue(org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature feature)
Gets the given
value of the feature from
eObject . |
static Object |
getValue(org.eclipse.emf.ecore.EObject object,
String featureName)
Gets the given
value of the named feature from
eObject . |
static org.eclipse.emf.ecore.EObject |
load(File file)
Loads an
EObject from the file . |
static void |
loadRegistry(File file)
Loads packages stored in given file into Global Package Repository.
|
static String |
marshal(org.eclipse.emf.ecore.EObject eObject)
Marshals the given
EObject into a string. |
static void |
print(org.eclipse.emf.ecore.EObject eObject)
Prints
eObject to standard out. |
static void |
reattachStaticPackageSuperTypes(org.eclipse.emf.ecore.EPackage ePackage)
Re-attaches super types of Dynamic types derived from classes defined in static packaged.
|
static void |
rollbackTransaction(JCoDestination jcoDestination)
Rollback transaction on given transaction.
|
static void |
save(File file,
org.eclipse.emf.ecore.EObject eObject)
Saves the given
eObject to the file . |
static void |
saveRegistry(File file)
Save packages in Global Package Repository to given file.
|
static boolean |
setValue(org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature feature,
Object value)
Sets the given
value on the feature of
eObject . |
static boolean |
setValue(org.eclipse.emf.ecore.EObject eObject,
String featureName,
Object value)
Sets the given
value on the named feature of
eObject . |
static InputStream |
toInputStream(org.eclipse.emf.ecore.EObject eObject)
Serializes
eObject to returned input stream. |
static OutputStream |
toOutputStream(org.eclipse.emf.ecore.EObject eObject)
Serializes
eObject to returned output stream. |
static org.eclipse.emf.ecore.EObject |
unmarshal(String string)
Unmarshals the given string content into an
EObject instance. |
public static String marshal(org.eclipse.emf.ecore.EObject eObject) throws IOException
EObject
into a string.eObject
- - the EObject
to be marshaled.EObject
.IOException
public static org.eclipse.emf.ecore.EObject unmarshal(String string) throws IOException
EObject
instance.string
- - the string content to unmarshal.EObject
instance unmarshaled from the string
content.IOException
public static void save(File file, org.eclipse.emf.ecore.EObject eObject) throws IOException
eObject
to the file
.file
- - the file to save eObject
to.eObject
- - the object to save.IOException
public static org.eclipse.emf.ecore.EObject load(File file) throws IOException
EObject
from the file
.file
- - the file to load EObject
from.EObject
loaded from file
.IOException
public static boolean setValue(org.eclipse.emf.ecore.EObject eObject, String featureName, Object value)
value
on the named feature of
eObject
.eObject
- - the object to set value
on.featureName
- - the name of the feature to set.value
- - the value to set.true
if the value
was set;
false
otherwise.public static boolean setValue(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, Object value)
value
on the feature
of
eObject
.eObject
- - the object to set value
on.feature
- - the feature to set.value
- - the value to set.true
if the value
was set;
false
otherwise.public static Object getValue(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature)
value
of the feature
from
eObject
.eObject
- - the object to get value
from.feature
- - the feature to get.public static Object getValue(org.eclipse.emf.ecore.EObject object, String featureName)
value
of the named feature from
eObject
.eObject
- - the object to get value
from.featureName
- - the name of feature to get.public static OutputStream toOutputStream(org.eclipse.emf.ecore.EObject eObject) throws IOException
eObject
to returned output stream.eObject
- - the object to serialize.IOException
public static void print(org.eclipse.emf.ecore.EObject eObject) throws IOException
eObject
to standard out.eObject
- - the object to print.IOException
public static InputStream toInputStream(org.eclipse.emf.ecore.EObject eObject) throws IOException
eObject
to returned input stream.eObject
- - the object to serialize.IOException
public static org.eclipse.emf.ecore.EObject fromInputStream(InputStream in) throws IOException
in
.in
- - The input steam containing serialized object.IOException
public static void addAnnotation(org.eclipse.emf.ecore.EModelElement modelElement, String source, String key, String value)
modelElement
- - the model element to be annotated.source
- - the source URL of annotation to be added to.key
- - the key of the detail entry to be added to annotation.value
- - the value of the detail entry to added to annotation.public static String getAnnotation(org.eclipse.emf.ecore.EModelElement modelElement, String source, String key)
modelElement
identified by source
and key
.modelElement
- - the annotated model element.source
- - the namespace of annotation.key
- - the key of annotation.public static void beginTransaction(JCoDestination jcoDestination)
jcoDestination
- = the destination to start transaction on.public static void commitTransaction(JCoDestination jcoDestination) throws JCoException
jcoDestination
- = the destination to commit transaction on.JCoException
public static void rollbackTransaction(JCoDestination jcoDestination) throws JCoException
jcoDestination
- = the destination to rollback transaction on.JCoException
public static void saveRegistry(File file) throws IOException
file
- - The file to save packages into. NB: this file must end with
'.ecore' extension.IOException
public static void loadRegistry(File file) throws IOException
file
- - The file to load packages from. NB: this file must end with
'.ecore' extension.IOException
public static void reattachStaticPackageSuperTypes(org.eclipse.emf.ecore.EPackage ePackage)
ePackage
- - package containing classes whose super types will be
re-attached.public static void ensureBasePackages()
Apache Camel