Class SampleValidator

All Implemented Interfaces:
NodeValidator<Sample>

public class SampleValidator extends NameableNodeValidator<Sample>
Validator implementation for sample. Validation rules:
Version:
2.10
Author:
Nicklas
Last modified
$Date: 2012-04-03 09:31:52 +0200 (ti, 03 apr 2012) $
  • Constructor Details

    • SampleValidator

      public SampleValidator()
  • Method Details

    • 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<Sample>
      Overrides:
      postValidate in class NameableNodeValidator<Sample>
      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
    • getMissingItemFix

      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.
      Specified by:
      getMissingItemFix in class BasicNodeValidator<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