Class SampleValidator
java.lang.Object
net.sf.basedb.util.overview.validator.BasicNodeValidator<I>
net.sf.basedb.util.overview.validator.NameableNodeValidator<Sample>
net.sf.basedb.util.overview.validator.SampleValidator
- All Implemented Interfaces:
NodeValidator<Sample>
Validator implementation for sample. Validation rules:
- Missing item:
Validator.MISSING_SAMPLE
- Access denied:
Validator.DENIED_SAMPLE
- Subtype of parent sample:
Validator.INCORRECT_SAMPLE_TYPE
- Subtype of parent biosource:
Validator.INCORRECT_BIOSOURCE_TYPE
- Version:
- 2.10
- Author:
- Nicklas
- Last modified
- $Date: 2012-04-03 09:31:52 +0200 (ti, 03 apr 2012) $
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkParentBioSourceSubtype
(DbControl dc, OverviewContext context, Node sampleNode, Node bioSourceNode) Check the subtype of the biosurce that is the parent to a sample.static void
checkParentSampleSubtype
(DbControl dc, OverviewContext context, Node childNode, Node parentNode) Check the subtype of the sample that is the parent to another sample.protected Fix
getMissingItemFix
(DbControl dc, Node parentNode) The suggested fix is to add a parent sample to the extract or one or more samples to the pooled sample.void
postValidate
(DbControl dc, OverviewContext context, Node node, Node parentNode) Do nothing.Methods inherited from class net.sf.basedb.util.overview.validator.BasicNodeValidator
getDeniedItemFix, postDeniedItem, postMissingItem, postValidateFolder, preDeniedItem, preMissingItem, preValidate
-
Constructor Details
-
SampleValidator
public SampleValidator()
-
-
Method Details
-
postValidate
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 interfaceNodeValidator<Sample>
- Overrides:
postValidate
in classNameableNodeValidator<Sample>
- Parameters:
dc
- A DbControl to use if the validation needs to access the databasecontext
- The current overview contextnode
- The node object that represents itemparentNode
- The parent node that is linked with the item
-
getMissingItemFix
The suggested fix is to add a parent sample to the extract or one or more samples to the pooled sample.- Specified by:
getMissingItemFix
in classBasicNodeValidator<Sample>
-
checkParentBioSourceSubtype
public static void checkParentBioSourceSubtype(DbControl dc, OverviewContext context, Node sampleNode, Node bioSourceNode) Check the subtype of the biosurce that is the parent to a sample. Given that the sample has a non-null subtype, which has a related BIOSOURCE subtype, this method checks if the parent biosource has the same subtype. If there is no related subtype for the sample, any subtype for the parent is accepted.- Since:
- 3.0
-
checkParentSampleSubtype
public static void checkParentSampleSubtype(DbControl dc, OverviewContext context, Node childNode, Node parentNode) Check the subtype of the sample that is the parent to another sample. Given that the child sample has a non-null subtype, which has a related SAMPLE subtype, this method checks if the parent sample has the same subtype. If there is no related subtype for the child sample, any subtype for the parent is accepted.- Since:
- 3.0
-