edu.nrao.sss.model.project.scan
Class ScanLoopValidator

java.lang.Object
  extended by edu.nrao.sss.validation.AbstractValidator<ScanLoop>
      extended by edu.nrao.sss.model.project.scan.ScanLoopValidator
All Implemented Interfaces:
Validator

public class ScanLoopValidator
extends AbstractValidator<ScanLoop>

A validator of scan loops.

Validations Performed for All Purposes

  1. Loop is not empty.
  2. Iteration count is positive.
  3. Maximum duration is positive.
  4. TODO: Start/stop times and durations of contained scans makes sense.
  5. Contained scans and scan loops are valid.1
1The particular validations performed depend on the validator used by this one to operate on those contained scans.

Version Info:

$Revision: 1709 $
$Date: 2008-11-14 11:22:37 -0700 (Fri, 14 Nov 2008) $
$Author: dharland $

Since:
2007-02-13
Author:
David M. Harland

Field Summary
 
Fields inherited from class edu.nrao.sss.validation.AbstractValidator
failFast, failures, manager, purpose, target
 
Constructor Summary
ScanLoopValidator()
          Creates a new instance.
 
Method Summary
 Validator getScanLoopElementValidator(ScanLoopElement element)
          Returns a validator for scan loop elements.
protected  List<Validation<ScanLoop>> makeValidationList(ValidationPurpose purpose)
           
 void setScanValidator(edu.nrao.sss.model.project.scan.ScanValidator<? extends Scan> scanValidator)
           
 void setSkipOutermostLoop(boolean skip)
          Tells this validator whether or not it should skip the validation of the target loop.
protected  void validate()
           
 
Methods inherited from class edu.nrao.sss.validation.AbstractValidator
getName, getPurpose, getTarget, setManager, stopTestingAfterFirstFailure, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScanLoopValidator

public ScanLoopValidator()
Creates a new instance.

Method Detail

setScanValidator

public void setScanValidator(edu.nrao.sss.model.project.scan.ScanValidator<? extends Scan> scanValidator)

setSkipOutermostLoop

public void setSkipOutermostLoop(boolean skip)
Tells this validator whether or not it should skip the validation of the target loop. Even if skip is set to true, the scans and inner loops of this loop will be validated.

This validator is originally configured so that it will not skip any validation.

It is expected that validators of scheduling blocks will use this method with a parameter of true.

Parameters:
skip - true if this validator should validate the contents of the target loop, but not the target loop itself.

makeValidationList

protected List<Validation<ScanLoop>> makeValidationList(ValidationPurpose purpose)
Specified by:
makeValidationList in class AbstractValidator<ScanLoop>

validate

protected void validate()
Overrides:
validate in class AbstractValidator<ScanLoop>

getScanLoopElementValidator

public Validator getScanLoopElementValidator(ScanLoopElement element)
Returns a validator for scan loop elements.



Copyright © 2009. All Rights Reserved.