Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package net.trustyuri;
 
 
 
This class can run the following commands by calling the respective class: CheckFile, ProcessFile, CheckLargeRdf, TransformRdf, TransformLargeRdf, CheckSortedRdf, TransformNanopub, and CheckNanopubViaSparql

Author(s):
Tobias Kuhn
public class Run {
	private Run() {}  // no instances allowed
Interprets the arguments as a command to run, for example: {"ProcessFile", "file.txt"}

Parameters:
args the command
	public static void main(String[] argsthrows IOExceptionOpenRDFExceptionTrustyUriException {
		run(args);
	}

Runs the given command, for example: {"ProcessFile", "file.txt"}

Parameters:
command the command, as a String array
	public static void run(String[] commandthrows IOExceptionOpenRDFExceptionTrustyUriException {
		String cmd = command[0];
		String[] cmdArgs = Arrays.copyOfRange(command, 1, command.length);
		if (cmd.equals("CheckFile")) {
			CheckFile.main(cmdArgs);
else if (cmd.equals("ProcessFile")) {
			ProcessFile.main(cmdArgs);
else if (cmd.equals("CheckLargeRdf")) {
			CheckLargeRdf.main(cmdArgs);
else if (cmd.equals("TransformRdf")) {
			TransformRdf.main(cmdArgs);
else if (cmd.equals("TransformLargeRdf")) {
			TransformLargeRdf.main(cmdArgs);
else if (cmd.equals("CheckSortedRdf")) {
			CheckSortedRdf.main(cmdArgs);
else {
			..println("ERROR: Unrecognized command " + cmd);
			System.exit(1);
		}
	}
New to GrepCode? Check out our FAQ X