Class SampleValidator

    • Constructor Detail

      • SampleValidator

        public SampleValidator()
    • 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<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
      • 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