|
3.0.1: 2011-11-10 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.util.overview.OverviewUtil
public final class OverviewUtil
Utility class for the overview generation functionality.
Field Summary | |
---|---|
private static String |
presetsSetting
Name of setting to store saved presets. |
private static Map<String,List<Validator>> |
validators
|
Constructor Summary | |
---|---|
OverviewUtil()
|
Method Summary | |
---|---|
static Set<Annotatable> |
getAnnotatableParents(DbControl dc,
OverviewContext context,
Annotatable item)
Get all annotatable parent items for the given item. |
private static Set<Annotatable> |
getAnnotatableParents(DbControl dc,
OverviewContext context,
Annotatable item,
Annotatable root)
The internal implementation needs to keep track of the special case when we start with raw bioassay or derived bioassay as the root item. |
static Node |
getCircularRef(Node node,
BasicItem item)
Find the first parent node that has a reference to the given item. |
static GenericOverview |
getCurrentOverview(SessionControl sc)
Get the currently cached overview. |
static Set<AnnotationType> |
getMiameAnnotationTypes(DbControl dc,
OverviewContext context,
Item itemType)
Get all annotation types that has been marked as "Required for MIAME". |
static GenericOverview |
getNewOrCurrentOverview(DbControl dc,
BasicItem item,
Project project)
Get the current overview or create a new overview. |
static GenericOverview |
getNewOverview(DbControl dc,
BasicItem item,
Project project)
Create a new overview for the given item and project. |
static Presets |
getValidationPresets(SessionControl sc)
Get the validation options presets for the currently logged in user. |
static Map<String,List<Validator>> |
getValidators()
Get all validation rules grouped by relattionship. |
static void |
saveValidationPresets(SessionControl sc)
Save the validation option presets for the logged in user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Map<String,List<Validator>> validators
private static final String presetsSetting
Constructor Detail |
---|
public OverviewUtil()
Method Detail |
---|
public static Map<String,List<Validator>> getValidators()
public static Presets getValidationPresets(SessionControl sc)
saveValidationPresets(SessionControl)
to make sure the changes are saved to the database.
sc
- The session control for the logged in user
public static void saveValidationPresets(SessionControl sc)
SessionControl.setUserDefaultSetting(String, String)
)
with the name experiment.overview.presets
sc
- The session control for the logged in userpublic static GenericOverview getNewOverview(DbControl dc, BasicItem item, Project project)
getCurrentOverview(SessionControl)
or getNewOrCurrentOverview(DbControl, BasicItem, Project)
.
dc
- A DbControl to use for database accessitem
- The item to generate the overview forproject
- The project that should be used for validation
of default items
getNewOrCurrentOverview(DbControl, BasicItem, Project)
,
getCurrentOverview(SessionControl)
public static GenericOverview getNewOrCurrentOverview(DbControl dc, BasicItem item, Project project)
dc
- A DbControl to use for database accessitem
- The item to generate the overview forproject
- The project that should be used for validation
of default items
getNewOverview(DbControl, BasicItem, Project)
,
getCurrentOverview(SessionControl)
public static GenericOverview getCurrentOverview(SessionControl sc)
sc
- The session control that contains the cached overview
public static Node getCircularRef(Node node, BasicItem item)
node
- The node to start looking atitem
- The item to look for
public static Set<AnnotationType> getMiameAnnotationTypes(DbControl dc, OverviewContext context, Item itemType)
dc
- A DbControl to use for database accesscontext
- The current overview context (will be used to prepare
the query for annotation types; see OverviewContext.initQuery(ItemQuery, String)
itemType
- An optional item type that is used to limit what
annotation types to look for
public static Set<Annotatable> getAnnotatableParents(DbControl dc, OverviewContext context, Annotatable item)
dc
- A DbControl to use for database accesscontext
- The current overview contextitem
- The annotatable item that we should find parents for
private static Set<Annotatable> getAnnotatableParents(DbControl dc, OverviewContext context, Annotatable item, Annotatable root)
|
3.0.1: 2011-11-10 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |