org.newsml.toolkit.conformance
Class FormalNameTest
java.lang.Object
|
+--org.newsml.toolkit.conformance.TestBase
|
+--org.newsml.toolkit.conformance.FormalNameTest
- public class FormalNameTest
- extends TestBase
FormalName-specific conformance tests.
This class tests that a FormalNameNode has a vocabulary (either
explicit or defaulted), and, if possible, confirms that the formal
name appears in that vocabulary. It is possible to pass on option
to the constructor to disable the error report if a vocabulary is
not available (for NewsItemId and ProviderId).
- Version:
- 2.0
- Author:
- Reuters PLC
- See Also:
NewsMLTestManager
Method Summary |
void |
run(BaseNode node,
boolean useExternal)
Run tests for a FormalNameNode. |
FormalNameTest
public FormalNameTest()
- Default constructor.
By default, the test will report an error if a vocabulary
is not specified for the formal name.
FormalNameTest
public FormalNameTest(boolean requireVocab)
- Constructor.
- Parameters:
requireVocab
- true if the test should report an error if
a vocabulary is not specified, false otherwise.
run
public void run(BaseNode node,
boolean useExternal)
throws NewsMLException
- Run tests for a FormalNameNode.
- Overrides:
run
in class TestBase
- Parameters:
node
- A FormalNameNode.useExternal
- Not used.- Throws:
NewsMLException
- If the test fails.java.lang.ClassCastException
- If the node parameter is not
an instance of FormalNameNode
.- See Also:
TestBase.run(org.newsml.toolkit.BaseNode, boolean)