public final class MongoComplexUtilities extends Object
Modifier and Type | Field and Description |
---|---|
static String |
MONGO_PARENT_PATH |
Modifier and Type | Method and Description |
---|---|
static Feature |
extractFeature(Object feature,
String jsonPath)
Method for extracting or casting a feature from the provided object.
|
static Map<String,Class> |
findMappings(DBObject dbObject)
Compute the mappings for a mongo db object, this can be used to create a feature mapping.
|
static Object |
getValue(DBObject mongoObject,
Map<String,Integer> collectionsIndexes,
String jsonPath)
Will extract from the mongo db object the value that correspond to the given json path.
|
static Object |
getValue(DBObject mongoObject,
String jsonPath)
Will extract from the mongo db object the value that correspond to the given json path.
|
static Object |
getValue(Object object,
String jsonPath)
Will try to extract from the provided object the value that correspond to the given json
path.
|
static Object |
getValues(DBObject dbObject,
String jsonPath)
Will extract from the mongo db object all the values that correspond to the given json path.
|
static Object |
getValues(Object object,
String jsonPath)
Will try to extract from the provided object all the values that correspond to the given json
path.
|
static String |
resolvePath(Feature feature,
String jsonPath)
Concat the parent path if it exists to the provided JSON path.
|
static void |
setParentPath(Feature feature,
String parentPath)
Store the parent path in a feature user data map.
|
static boolean |
useLegacyPaths()
If TRUE no recursive paths will be used, this onyl exists for backwards compatibility.
|
public static final String MONGO_PARENT_PATH
public static String resolvePath(Feature feature, String jsonPath)
public static void setParentPath(Feature feature, String parentPath)
public static boolean useLegacyPaths()
public static Object getValue(Object object, String jsonPath)
public static Feature extractFeature(Object feature, String jsonPath)
public static Object getValue(DBObject mongoObject, String jsonPath)
public static Object getValue(DBObject mongoObject, Map<String,Integer> collectionsIndexes, String jsonPath)
public static Object getValues(Object object, String jsonPath)
public static Object getValues(DBObject dbObject, String jsonPath)
Copyright © 1996–2019 Geotools. All rights reserved.