Class DerivedBioAssayValidator

All Implemented Interfaces:
NodeValidator<DerivedBioAssay>

public class DerivedBioAssayValidator extends NameableNodeValidator<DerivedBioAssay>
Validator implementation for derived bioassays. Validation rules:
Version:
2.10
Author:
Nicklas
Last modified
$Date: 2009-02-16 20:29:47 +0100 (må, 16 feb 2009) $
  • Constructor Details

    • DerivedBioAssayValidator

      public DerivedBioAssayValidator()
  • Method Details

    • preMissingItem

      public 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.
      Specified by:
      preMissingItem in interface NodeValidator<DerivedBioAssay>
      Overrides:
      preMissingItem in class BasicNodeValidator<DerivedBioAssay>
      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
      Since:
      3.0
    • getMissingItemFix

      protected Fix getMissingItemFix(DbControl dc, Node rawBioAssayNode)
      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 class BasicNodeValidator<DerivedBioAssay>
      Returns:
      Suggested fix is to add a derived bioassay as parent to the raw bioassay.
    • 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<DerivedBioAssay>
      Overrides:
      postValidate in class NameableNodeValidator<DerivedBioAssay>
      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
    • 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.