You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by ch...@apache.org on 2013/02/22 15:15:00 UTC
svn commit: r1449052 -
/uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccletSubmit.java
Author: challngr
Date: Fri Feb 22 14:15:00 2013
New Revision: 1449052
URL: http://svn.apache.org/r1449052
Log:
UIMA-2687
Comment main() to illustrate the API.
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccletSubmit.java
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccletSubmit.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccletSubmit.java?rev=1449052&r1=1449051&r2=1449052&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccletSubmit.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccletSubmit.java Fri Feb 22 14:15:00 2013
@@ -326,9 +326,14 @@ public class DuccletSubmit
public static void main(String[] args)
{
try {
+ // Instantiate the object with args similar to the CLI, or a pre-built properties file
DuccletSubmit ds = new DuccletSubmit(args);
+
+ // Run the API. If process_attach_console was specified in the args, a console listener is
+ // started but this call does NOT block on it.
boolean rc = ds.execute();
+ // Fetch messages if any. null means none
String [] messages = ds.getMessages();
String [] warnings = ds.getWarnings();
String [] errors = ds.getErrors();
@@ -351,9 +356,13 @@ public class DuccletSubmit
}
}
+ // If the return is 'true' then as best the API can tell, the submit worked
if ( rc ) {
+
+ // Fetch the Ducc ID
System.out.println("Process " + ds.getDuccId() + " submitted.");
+ // If there is a console listener, you can block now
if ( ds.isConsoleAttached() ) {
ds.waitForCompletion();
}