Class DerivedBioAssayValidator
java.lang.Object
net.sf.basedb.util.overview.validator.BasicNodeValidator<I>
net.sf.basedb.util.overview.validator.NameableNodeValidator<DerivedBioAssay>
net.sf.basedb.util.overview.validator.DerivedBioAssayValidator
- All Implemented Interfaces:
NodeValidator<DerivedBioAssay>
Validator implementation for derived bioassays. Validation rules:
- Missing item:
Validator.MISSING_DERIVEDBIOASSAY
- Access denied:
Validator.DENIED_DERIVEDBIOASSAY
- Parent extract mismatch:
Validator.PARENT_EXTRACT_MISMATCH
- Incorrect related subtypes:
Validator.INCORRECT_DERIVEDBIOASSAY_TYPE
,Validator.INCORRECT_PHYSICALBIOASSAY_TYPE
,Validator.INCORRECT_EXTRACT_TYPE
- Version:
- 2.10
- Author:
- Nicklas
- Last modified
- $Date: 2009-02-16 20:29:47 +0100 (må, 16 feb 2009) $
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkDerivedBioAssaySubtype
(DbControl dc, OverviewContext context, Node childNode, Node parentNode) Check the subtype of the derived bioassay that is the parent to a child derived bioassay.static void
checkExtractSubtype
(DbControl dc, OverviewContext context, Node bioAssayNode, Node extractNode) Check the subtype of the extract that is the linked with a derived bioassay.static void
checkPhysicalBioAssaySubtype
(DbControl dc, OverviewContext context, Node derivedBioAssayNode, Node physicalBioAssayNode) Check the subtype of the physical bioassay that is the parent to a derived bioassay.protected Fix
getMissingItemFix
(DbControl dc, Node rawBioAssayNode) Subclasses should override this method if they have a suggessted fix for a missing item problem.void
postValidate
(DbControl dc, OverviewContext context, Node node, Node parentNode) Do nothing.boolean
preMissingItem
(DbControl dc, OverviewContext context, Node parentNode) If the parent raw bioassay has a link to an extract, we ignore the missing derived bioassay.Methods inherited from class net.sf.basedb.util.overview.validator.BasicNodeValidator
getDeniedItemFix, postDeniedItem, postMissingItem, postValidateFolder, preDeniedItem, preValidate
-
Constructor Details
-
DerivedBioAssayValidator
public DerivedBioAssayValidator()
-
-
Method Details
-
preMissingItem
If the parent raw bioassay has a link to an extract, we ignore the missing derived bioassay.- Specified by:
preMissingItem
in interfaceNodeValidator<DerivedBioAssay>
- Overrides:
preMissingItem
in classBasicNodeValidator<DerivedBioAssay>
- Parameters:
dc
- A DbControl to use if the validation needs to access the databasecontext
- The current overview contextparentNode
- The parent node that is missing the item- Returns:
- Always false
- Since:
- 3.0
-
getMissingItemFix
Description copied from class:BasicNodeValidator
Subclasses should override this method if they have a suggessted fix for a missing item problem. The default implementation does nothing, but the following template may be usable by most subclasses:new Fix("Add item to parent", parentNode.getItem())
- Specified by:
getMissingItemFix
in classBasicNodeValidator<DerivedBioAssay>
- Returns:
- Suggested fix is to add a derived bioassay as parent to the raw bioassay.
-
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<DerivedBioAssay>
- Overrides:
postValidate
in classNameableNodeValidator<DerivedBioAssay>
- 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
-
checkPhysicalBioAssaySubtype
public static void checkPhysicalBioAssaySubtype(DbControl dc, OverviewContext context, Node derivedBioAssayNode, Node physicalBioAssayNode) Check the subtype of the physical bioassay that is the parent to a derived bioassay. Given that the derived bioassay has a non-null subtype, which has a related PHYISICALBIOASSAY subtype, this method checks if the physical bioassay has the same subtype. If there is no related subtype for the derived bioassay, any subtype for the physical bioassay is accepted. -
checkDerivedBioAssaySubtype
public static void checkDerivedBioAssaySubtype(DbControl dc, OverviewContext context, Node childNode, Node parentNode) Check the subtype of the derived bioassay that is the parent to a child derived bioassay. Given that the child bioassay has a non-null subtype, which has a related DERIVEDBIOASSAY subtype, this method checks if the parent bioassay has the same subtype. If there is no related subtype for the child bioassay, any subtype for the parent bioassay is accepted. -
checkExtractSubtype
public static void checkExtractSubtype(DbControl dc, OverviewContext context, Node bioAssayNode, Node extractNode) Check the subtype of the extract that is the linked with a derived bioassay. Given that the bioassay has a non-null subtype, which has a related EXTRACT subtype, this method checks if the extract has the same subtype. If there is no related subtype for the bioassay, any subtype for the extract is accepted.
-