|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.api.bag.TypeConverter
public final class TypeConverter
Static helper routines to convert bags between different types.
| Method Summary | |
|---|---|
static PathQuery |
getConversionMapQuery(java.util.List<TemplateQuery> conversionTemplates,
java.lang.Class typeA,
java.lang.Class typeB,
java.lang.Object bagOrIds)
Get conversion query for the types provided, edited so that the first type is constrained to be in the bag. |
static PathQuery |
getConversionQuery(java.util.List<TemplateQuery> conversionTemplates,
java.lang.Class<?> typeA,
java.lang.Class<?> typeB,
java.lang.Object bagOrIds)
Get conversion query for the types provided, edited so that the first type is constrained to be in the bag and the first type is removed from the view list so that the query only returns the converted type. |
static java.util.Map<java.lang.Class,TemplateQuery> |
getConversionTemplates(java.util.List<TemplateQuery> conversionTemplates,
java.lang.Class typeA)
Return a Map from typeB to a TemplateQuery that will convert from typeA to typeB. |
static java.util.Map<InterMineObject,java.util.List<InterMineObject>> |
getConvertedObjectMap(java.util.List<TemplateQuery> conversionTemplates,
java.lang.Class<?> typeA,
java.lang.Class<?> typeB,
java.lang.Object bagOrIds,
ObjectStore os)
Converts a List of objects from one type to another type using a TemplateQuery, returns a map from an original object to the converted object(s). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.util.Map<InterMineObject,java.util.List<InterMineObject>> getConvertedObjectMap(java.util.List<TemplateQuery> conversionTemplates,
java.lang.Class<?> typeA,
java.lang.Class<?> typeB,
java.lang.Object bagOrIds,
ObjectStore os)
throws InterMineException
conversionTemplates - a list of templates to be used for conversiontypeA - the type to convert fromtypeB - the type to convert tobagOrIds - an InterMineBag or Collection of Integer object idsos - the ObjectStore to execute queries in
InterMineException - if an error occurs
public static PathQuery getConversionMapQuery(java.util.List<TemplateQuery> conversionTemplates,
java.lang.Class typeA,
java.lang.Class typeB,
java.lang.Object bagOrIds)
conversionTemplates - a list of templates to be used for conversiontypeA - the type to convert fromtypeB - the type to convert tobagOrIds - an InterMineBag or Collection of Integer object ids
public static PathQuery getConversionQuery(java.util.List<TemplateQuery> conversionTemplates,
java.lang.Class<?> typeA,
java.lang.Class<?> typeB,
java.lang.Object bagOrIds)
conversionTemplates - a list of templates to be used for conversiontypeA - the type to convert fromtypeB - the type to convert tobagOrIds - an InterMineBag or Collection of Integer object identifiers
public static java.util.Map<java.lang.Class,TemplateQuery> getConversionTemplates(java.util.List<TemplateQuery> conversionTemplates,
java.lang.Class typeA)
conversionTemplates - a list of templates to be used for conversiontypeA - the type to convert from
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||