public class MongoUtils
extends java.lang.Object
| Constructor and Description |
|---|
MongoUtils() |
| Modifier and Type | Method and Description |
|---|---|
static EStructuralFeature |
getEStructuralFeatureByName(EClass eclass,
java.lang.String name)
Returns the
EStructuralFeature from the given EClass, using the given name. |
static EStructuralFeature |
getEStructuralFeatureByName(EClass eclass,
java.lang.String name,
boolean useAnnotation)
Returns the
EStructuralFeature from the given EClass, using the given name. |
static java.lang.Object |
getID(URI uri)
This function extracts the object ID from the given URI.
|
static java.lang.String |
getIDAsString(URI uri)
This function extracts the object ID from the given URI.
|
static java.lang.Object |
getIDWithValidURI(URI uri)
This function extracts the object ID from the given URI.
|
static java.lang.String |
getNameByEStructuralFeature(EStructuralFeature feature,
boolean useAnnotation)
Returns the name of the given
EStructuralFeature. |
static boolean |
isNativeType(EDataType dataType)
This function determines whether or not the given EDataType can be represented natively by MongoDB.
|
public static java.lang.Object getID(URI uri)
throws java.io.IOException
uri - java.io.IOException - if the URI path is not exactly three segmentspublic static java.lang.String getIDAsString(URI uri)
throws java.io.IOException
uri - java.io.IOException - if the URI path is not exactly three segmentspublic static java.lang.Object getIDWithValidURI(URI uri)
uri - public static boolean isNativeType(EDataType dataType)
dataType - the EMF data type to checkpublic static java.lang.String getNameByEStructuralFeature(EStructuralFeature feature,
boolean useAnnotation)
EStructuralFeature.
If the useAnnotation parameter is set to true, the ExtendedMetadata annotations will
be inspected for a name detail entry and the corresponding name of the entry returned.
Otherwise the feature name will returnedfeature - the EStructuralFeature to look intouseAnnotation - set to true, if Extended MetaData annotation should used toonullpublic static EStructuralFeature getEStructuralFeatureByName(EClass eclass,
java.lang.String name,
boolean useAnnotation)
EStructuralFeature from the given EClass, using the given name.
If the useAnnotation parameter is set to true, the ExtendedMetadata annotations will
be inspected for a name detail entry and the corresponding feature will returned.eclass - the EClass to look intoname - the feature nameuseAnnotation - set to true, if Extended MetaData annotation should used tooEStructuralFeature or nullpublic static EStructuralFeature getEStructuralFeatureByName(EClass eclass,
java.lang.String name)
EStructuralFeature from the given EClass, using the given name.
This does the same like getEStructuralFeatureByName(EClass, String, boolean) using as third parameter false.eclass - the EClass to look intoname - the feature nameEStructuralFeature or nullBryan Hunt, Data In Motion Consulting