Class TestCommand

java.lang.Object
org.phyloref.jphyloref.commands.TestCommand
All Implemented Interfaces:
Command

public class TestCommand
extends java.lang.Object
implements Command
Test whether the phyloreferences in the provided ontology resolve correctly. This currently supports RDF/XML input only, but we will eventually modify this to support PHYX files directly.

Testing output is produced using the Test Anything Protocol, which has nice libraries in both Python and Java.

Author:
Gaurav Vaidya
  • Constructor Summary

    Constructors
    Constructor Description
    TestCommand()  
  • Method Summary

    Modifier and Type Method Description
    void addCommandLineOptions​(org.apache.commons.cli.Options opts)
    Add command-line options specific to this command.
    int execute​(org.apache.commons.cli.CommandLine cmdLine)
    Given an input ontology, reason over it and determine if nodes are identified correctly.
    java.lang.String getDescription()
    A description of the Test command.
    java.lang.String getName()
    This command is named "test".

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TestCommand

      public TestCommand()
  • Method Details

    • getName

      public java.lang.String getName()
      This command is named "test". It should be invoked as "java -jar jphyloref.jar test ..."
      Specified by:
      getName in interface Command
      Returns:
      The name of this command.
    • getDescription

      public java.lang.String getDescription()
      A description of the Test command.
      Specified by:
      getDescription in interface Command
      Returns:
      A description of this command.
    • addCommandLineOptions

      public void addCommandLineOptions​(org.apache.commons.cli.Options opts)
      Add command-line options specific to this command.
      Specified by:
      addCommandLineOptions in interface Command
      Parameters:
      opts - The command-line options to modify for this command.
    • execute

      public int execute​(org.apache.commons.cli.CommandLine cmdLine) throws java.lang.RuntimeException
      Given an input ontology, reason over it and determine if nodes are identified correctly. It provides output on System.out using the Test Anything Protocol (TAP: https://testanything.org/).
      Specified by:
      execute in interface Command
      Parameters:
      cmdLine - The command line options provided to this command.
      Throws:
      java.lang.RuntimeException