Class VerifyCommand

  • All Implemented Interfaces:
    Command

    public class VerifyCommand
    extends Object
    implements Command
    Command that runs a sparql query expecting zero results. Any results represent violations in the queried ontology
    • Constructor Detail

      • VerifyCommand

        public VerifyCommand()
        Initialze the command.
    • Method Detail

      • getName

        public String getName()
        Name of the command.
        Specified by:
        getName in interface Command
        Returns:
        name
      • getDescription

        public String getDescription()
        Brief description of the command.
        Specified by:
        getDescription in interface Command
        Returns:
        description
      • getUsage

        public String getUsage()
        Command-line usage for the command.
        Specified by:
        getUsage in interface Command
        Returns:
        usage
      • getOptions

        public org.apache.commons.cli.Options getOptions()
        Command-line options for the command.
        Specified by:
        getOptions in interface Command
        Returns:
        options
      • main

        public void main​(String[] args)
        Handle the command-line and file operations for the VerifyOperation.
        Specified by:
        main in interface Command
        Parameters:
        args - strings to use as arguments
      • execute

        public CommandState execute​(CommandState state,
                                    String[] args)
                             throws Exception
        Given an input state and command line arguments, verify that the SPARQL queries return no results. The input ontology is not changed.
        Specified by:
        execute in interface Command
        Parameters:
        state - the state from the previous command, or null
        args - the command-line arguments
        Returns:
        the unchanged state
        Throws:
        Exception - on any problem