org.newsml.toolkit.conformance
Class DateTimeTest

java.lang.Object
  |
  +--org.newsml.toolkit.conformance.TestBase
        |
        +--org.newsml.toolkit.conformance.DateTimeTest

public class DateTimeTest
extends TestBase

Test date/time format.

The NewsML DTD sets out the required format, which it mistakenly refers to as ISO 8601 Basic format; in fact, it's a very restricted subset. This test may be used on any text node, element or attribute. In addition to checking the format, it runs some sanity checks on the date itself, and will report a warning for years outside the range 1900:2100.

Version:
2.0
Author:
Reuters PLC
See Also:
NewsMLTestManager

Constructor Summary
DateTimeTest()
           
 
Method Summary
 void run(BaseNode node, boolean useExternal)
          Run tests for a text node containing ISO 8601 Date/Time data.
 
Methods inherited from class org.newsml.toolkit.conformance.TestBase
error, internal, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTimeTest

public DateTimeTest()
Method Detail

run

public void run(BaseNode node,
                boolean useExternal)
         throws NewsMLException
Run tests for a text node containing ISO 8601 Date/Time data.
Overrides:
run in class TestBase
Parameters:
node - A Text node.
useExternal - Not used.
Throws:
NewsMLException - If the test fails.
See Also:
TestBase.run(org.newsml.toolkit.BaseNode, boolean)