public class ExtractValidator extends NameableNodeValidator<Extract>
Validator.MISSING_EXTRACT
Validator.DENIED_EXTRACT
Validator.INCORRECT_EXTRACT_TYPE
Validator.INCORRECT_SAMPLE_TYPE
Validator.DIFFERENT_TAG
Validator.TAGGED_PARENT
Validator.NONUNIQUE_TAG
Validator.INCORRECT_BIOASSAY_POSITION
Modifier and Type | Class and Description |
---|---|
(package private) static class |
ExtractValidator.TagPosition |
Constructor and Description |
---|
ExtractValidator() |
Modifier and Type | Method and Description |
---|---|
private void |
checkExtractOnBioAssay(DbControl dc,
OverviewContext context,
Node extractNode,
Node bioAssayNode) |
static void |
checkExtractTag(DbControl dc,
OverviewContext context,
Node childNode,
Node parentNode)
Check the tag of the child extract in relation to a parent extract.
|
static void |
checkParentExtractSubtype(DbControl dc,
OverviewContext context,
Node childNode,
Node parentNode)
Check the subtype of the extract that is the parent to another extract.
|
static void |
checkParentSampleSubtype(DbControl dc,
OverviewContext context,
Node extractNode,
Node sampleNode)
Check the subtype of the sample that is the parent to an extract.
|
protected Fix |
getMissingItemFix(DbControl dc,
Node parentNode)
The suggested fix is to add parent extracts to the physical
bioassay or one or more extracts to the pooled extract.
|
static boolean |
isRelated(DbControl dc,
OverviewContext context,
Extract parent,
Extract child)
Check if two given extracts have a parent-child relationship.
|
void |
postValidate(DbControl dc,
OverviewContext context,
Node node,
Node parentNode)
Do nothing.
|
void |
postValidateFolder(DbControl dc,
OverviewContext context,
Node folderNode,
Node parentNode)
If the parent is a physical bioassay, check that extracts on the
same position has different tags.
|
boolean |
preMissingItem(DbControl dc,
OverviewContext context,
Node parentNode)
Do not report missing items if the parent node is a derived or (root) raw bioassay.
|
getDeniedItemFix, postDeniedItem, postMissingItem, preDeniedItem, preValidate
public boolean preMissingItem(DbControl dc, OverviewContext context, Node parentNode)
preMissingItem
in interface NodeValidator<Extract>
preMissingItem
in class BasicNodeValidator<Extract>
dc
- A DbControl to use if the validation needs to access the databasecontext
- The current overview contextparentNode
- The parent node that is missing the itempublic void postValidate(DbControl dc, OverviewContext context, Node node, Node parentNode)
BasicNodeValidator
postValidate
in interface NodeValidator<Extract>
postValidate
in class NameableNodeValidator<Extract>
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 itemprotected Fix getMissingItemFix(DbControl dc, Node parentNode)
getMissingItemFix
in class BasicNodeValidator<Extract>
public void postValidateFolder(DbControl dc, OverviewContext context, Node folderNode, Node parentNode)
postValidateFolder
in interface NodeValidator<Extract>
postValidateFolder
in class BasicNodeValidator<Extract>
dc
- A DbControl to use for database accesscontext
- The current overview contextfolderNode
- The folder node, or null if no folder has been createdparentNode
- The parent node (never null)public static void checkParentSampleSubtype(DbControl dc, OverviewContext context, Node extractNode, Node sampleNode)
public static void checkParentExtractSubtype(DbControl dc, OverviewContext context, Node childNode, Node parentNode)
public static void checkExtractTag(DbControl dc, OverviewContext context, Node childNode, Node parentNode)
public static boolean isRelated(DbControl dc, OverviewContext context, Extract parent, Extract child)
private void checkExtractOnBioAssay(DbControl dc, OverviewContext context, Node extractNode, Node bioAssayNode)