Package org.intermine.web.logic.export
Class ExportHelper
- java.lang.Object
-
- org.intermine.web.logic.export.ExportHelper
-
public final class ExportHelper extends java.lang.Object
Helper methods for exporters.- Author:
- rns
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
canExport(PagedTable pt, java.lang.Class<?> cls)
Return true if the specified class or a subclass is found in a column of the paged table (or is the parent class of a field displayed in the table).static int
getClassIndex(java.util.List<java.lang.Class<?>> clazzes, java.lang.Class<?> cls)
static java.util.List<java.lang.Integer>
getClassIndexes(java.util.List<java.lang.Class<?>> clazzes, java.lang.Class<?> searched)
static java.util.List<java.lang.Class<?>>
getColumnClasses(PagedTable pt)
static java.util.List<Path>
getColumnPaths(PagedTable pt)
Return a List containing the Path objects from the Columns of this PagedTable.static int
getFirstColumnForClass(PagedTable pt, java.lang.Class<?> cls)
Find the first column index for the specified class or a subclass in the page table (may be a parent class of a field being displayed).
-
-
-
Method Detail
-
canExport
public static boolean canExport(PagedTable pt, java.lang.Class<?> cls)
Return true if the specified class or a subclass is found in a column of the paged table (or is the parent class of a field displayed in the table).- Parameters:
pt
- a table to export fromcls
- a class to look for in the results- Returns:
- true if the class is found
-
getClassIndex
public static int getClassIndex(java.util.List<java.lang.Class<?>> clazzes, java.lang.Class<?> cls)
- Parameters:
clazzes
- classescls
- searched class- Returns:
- index of class that is assignable to given class
-
getClassIndexes
public static java.util.List<java.lang.Integer> getClassIndexes(java.util.List<java.lang.Class<?>> clazzes, java.lang.Class<?> searched)
- Parameters:
clazzes
- classessearched
- searched class- Returns:
- index of class that is assignable to given class
-
getColumnClasses
public static java.util.List<java.lang.Class<?>> getColumnClasses(PagedTable pt)
- Parameters:
pt
- paged table- Returns:
- classes of columns
-
getFirstColumnForClass
public static int getFirstColumnForClass(PagedTable pt, java.lang.Class<?> cls)
Find the first column index for the specified class or a subclass in the page table (may be a parent class of a field being displayed).- Parameters:
pt
- a table to export fromcls
- a class to look for in the results- Returns:
- the first column index for the class
-
getColumnPaths
public static java.util.List<Path> getColumnPaths(PagedTable pt)
Return a List containing the Path objects from the Columns of this PagedTable.- Parameters:
pt
- the paged table- Returns:
- the Paths
-
-