org.daisy.zedval.engine
Class ZedTest

java.lang.Object
  extended byorg.daisy.zedval.engine.ZedTest

public class ZedTest
extends java.lang.Object

A ZedTest object represents a single validation test from the testMap.

Author:
James Pritchett

Field Summary
static int RECOMMENDATION
           
static int REQUIREMENT
           
 
Constructor Summary
ZedTest(java.lang.String id, java.lang.String description, int type, java.util.HashMap onFalseMsgs, java.lang.String specRef)
           
 
Method Summary
 java.lang.String getDescription()
          Returns a description of test
 java.lang.String getId()
          Returns id of test from testMap document
 java.util.HashMap getOnFalseMsgs()
          Returns a HashMap of messages to be used in case of test failure
 ZedTestProcessor getProcessedBy()
          Returns the ZedTestProcessor that executes this test
 java.lang.String getSpecRef()
          Returns a reference to the applicable section of the Z39.86 specification
 int getType()
          Returns the type of test (requirement or recommendation)
 void setProcessedBy(ZedTestProcessor aTP)
          Sets up a pointer to the ZedTestProcessor that executes this test
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REQUIREMENT

public static final int REQUIREMENT
See Also:
Constant Field Values

RECOMMENDATION

public static final int RECOMMENDATION
See Also:
Constant Field Values
Constructor Detail

ZedTest

public ZedTest(java.lang.String id,
               java.lang.String description,
               int type,
               java.util.HashMap onFalseMsgs,
               java.lang.String specRef)
Parameters:
id - id from testMap document
description - description of test
type - test type (REQUIREMENT or RECOMMENDATION)
onFalseMsgs - ZedMessages to print on failure
specRef - URL of specification reference
Method Detail

getId

public java.lang.String getId()
Returns id of test from testMap document

Returns:
id of test from testMap document

getDescription

public java.lang.String getDescription()
Returns a description of test

Returns:
a description of test

getType

public int getType()
Returns the type of test (requirement or recommendation)

Returns:
the type code (REQUIREMENT or RECOMMENDATION)

getOnFalseMsgs

public java.util.HashMap getOnFalseMsgs()
Returns a HashMap of messages to be used in case of test failure

Returns:
a HashMap of ZedMessage objects

getSpecRef

public java.lang.String getSpecRef()
Returns a reference to the applicable section of the Z39.86 specification

Returns:
a reference to the applicable section of the Z39.86 specification

setProcessedBy

public void setProcessedBy(ZedTestProcessor aTP)
Sets up a pointer to the ZedTestProcessor that executes this test


getProcessedBy

public ZedTestProcessor getProcessedBy()
Returns the ZedTestProcessor that executes this test

Returns:
the ZedTestProcessor that executes this test

toString

public java.lang.String toString()