2.17.2: 2011-06-17

net.sf.basedb.util.overview.validator
Class ArrayDesignValidator

java.lang.Object
  extended by net.sf.basedb.util.overview.validator.BasicNodeValidator<I>
      extended by net.sf.basedb.util.overview.validator.NameableNodeValidator<ArrayDesign>
          extended by net.sf.basedb.util.overview.validator.ArrayDesignValidator
All Implemented Interfaces:
NodeValidator<ArrayDesign>

public class ArrayDesignValidator
extends NameableNodeValidator<ArrayDesign>

Validator implementation for array designs. Validation rules:

Version:
2.10
Author:
Nicklas
Last modified
$Date: 2009-02-17 13:14:00 +0100 (Tue, 17 Feb 2009) $

Constructor Summary
ArrayDesignValidator()
           
 
Method Summary
private  void checkExperimentArrayDesign(OverviewContext context, Node parentNode, ArrayDesign design)
          Check if an experiment has used more than one array design.
protected  Fix getMissingItemFix(Node parentNode)
          The suggested fix is to add an array design to the raw bioassay.
 void postValidate(DbControl dc, OverviewContext context, Node node, Node parentNode)
          Do nothing.
 boolean preMissingItem(DbControl dc, OverviewContext context, Node parentNode)
          Submits the BasicNodeValidator.ruleMissing validator to the context as a failure unless it is null.
 
Methods inherited from class net.sf.basedb.util.overview.validator.BasicNodeValidator
getDeniedItemFix, postDeniedItem, postMissingItem, postValidateFolder, preDeniedItem, preValidate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayDesignValidator

public ArrayDesignValidator()
Method Detail

postValidate

public void postValidate(DbControl dc,
                         OverviewContext context,
                         Node node,
                         Node parentNode)
Description copied from class: BasicNodeValidator
Do nothing. Subclasses should override this method if they need more validation for an existing and accessible item.

Specified by:
postValidate in interface NodeValidator<ArrayDesign>
Overrides:
postValidate in class NameableNodeValidator<ArrayDesign>
Parameters:
dc - A DbControl to use if the validation needs to access the database
context - The current overview context
node - The node object that represents item
parentNode - The parent node that is linked with the item

preMissingItem

public boolean preMissingItem(DbControl dc,
                              OverviewContext context,
                              Node parentNode)
Description copied from class: BasicNodeValidator
Submits the BasicNodeValidator.ruleMissing validator to the context as a failure unless it is null.

Specified by:
preMissingItem in interface NodeValidator<ArrayDesign>
Overrides:
preMissingItem in class BasicNodeValidator<ArrayDesign>
Parameters:
dc - A DbControl to use if the validation needs to access the database
context - The current overview context
parentNode - The parent node that is missing the item
Returns:
Always false

getMissingItemFix

protected Fix getMissingItemFix(Node parentNode)
The suggested fix is to add an array design to the raw bioassay.

Specified by:
getMissingItemFix in class BasicNodeValidator<ArrayDesign>

checkExperimentArrayDesign

private void checkExperimentArrayDesign(OverviewContext context,
                                        Node parentNode,
                                        ArrayDesign design)
Check if an experiment has used more than one array design. The context cache keep a Set with all arraydesign we have seen so for for a given experiment (including null)


2.17.2: 2011-06-17