You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2008/01/08 17:26:30 UTC

svn commit: r610054 [2/13] - in /incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core: ./ src/main/java/org/apache/uima/aae/ src/main/java/org/apache/uima/aae/client/ src/main/java/org/apache/uima/aae/controller/ src/main/java/org/apache/uima/aae/deploym...

Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/OutputChannel.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/OutputChannel.java?rev=610054&r1=610053&r2=610054&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/OutputChannel.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/OutputChannel.java Tue Jan  8 08:26:05 2008
@@ -1,42 +1,42 @@
-package org.apache.uima.aae;
-
-import org.apache.uima.aae.controller.AnalysisEngineController;
-import org.apache.uima.aae.controller.Endpoint;
-import org.apache.uima.aae.error.AsynchAEException;
-import org.apache.uima.analysis_engine.metadata.AnalysisEngineMetaData;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.resource.metadata.ProcessingResourceMetaData;
-
-public interface OutputChannel extends Channel
-{
-	public void setController( AnalysisEngineController aContainer );
-	
-	public void initialize() throws AsynchAEException;
-
-	public void sendRequest( String aCasReferenceId, Endpoint anEndpoint ) throws AsynchAEException;
-
-	public void sendRequest( String aCasReferenceId, Endpoint[] anEndpoint ) throws AsynchAEException;
-
-	public void sendRequest( int aCommand, Endpoint anEndpoint ) throws AsynchAEException;
-
-	public void sendRequest( int aCommand, String aCasReferenceId, Endpoint anEndpoint ) throws AsynchAEException;
-
-	public void sendReply( int aCommand, Endpoint anEndpoint ) throws AsynchAEException;
-
-	public void sendReply( CAS aCas, String anInputCasReferenceId, String aNewCasReferenceId,  Endpoint anEndpoint, long sequence ) throws AsynchAEException;
-	
-	public void sendReply( String aCasReferenceId, Endpoint anEndpoint ) throws AsynchAEException;
-
-//	public void sendReply( AnalysisEngineMetaData anAnalysisEngineMetadata, Endpoint anEndpoint, boolean serialize ) throws AsynchAEException;
-	public void sendReply( ProcessingResourceMetaData aProcessingResourceMetadata, Endpoint anEndpoint, boolean serialize ) throws AsynchAEException;
-
-	public void sendReply(Throwable t, String aCasReferenceId, Endpoint anEndpoint, int aCommand) throws AsynchAEException;
-	
-	
-	
-	public void setServerURI( String aServerURI );
-	
-	public void stop();
-	
-    static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
-}
+package org.apache.uima.aae;
+
+import org.apache.uima.aae.controller.AnalysisEngineController;
+import org.apache.uima.aae.controller.Endpoint;
+import org.apache.uima.aae.error.AsynchAEException;
+import org.apache.uima.analysis_engine.metadata.AnalysisEngineMetaData;
+import org.apache.uima.cas.CAS;
+import org.apache.uima.resource.metadata.ProcessingResourceMetaData;
+
+public interface OutputChannel extends Channel
+{
+	public void setController( AnalysisEngineController aContainer );
+	
+	public void initialize() throws AsynchAEException;
+
+	public void sendRequest( String aCasReferenceId, Endpoint anEndpoint ) throws AsynchAEException;
+
+	public void sendRequest( String aCasReferenceId, Endpoint[] anEndpoint ) throws AsynchAEException;
+
+	public void sendRequest( int aCommand, Endpoint anEndpoint ) throws AsynchAEException;
+
+	public void sendRequest( int aCommand, String aCasReferenceId, Endpoint anEndpoint ) throws AsynchAEException;
+
+	public void sendReply( int aCommand, Endpoint anEndpoint ) throws AsynchAEException;
+
+	public void sendReply( CAS aCas, String anInputCasReferenceId, String aNewCasReferenceId,  Endpoint anEndpoint, long sequence ) throws AsynchAEException;
+	
+	public void sendReply( String aCasReferenceId, Endpoint anEndpoint ) throws AsynchAEException;
+
+//	public void sendReply( AnalysisEngineMetaData anAnalysisEngineMetadata, Endpoint anEndpoint, boolean serialize ) throws AsynchAEException;
+	public void sendReply( ProcessingResourceMetaData aProcessingResourceMetadata, Endpoint anEndpoint, boolean serialize ) throws AsynchAEException;
+
+	public void sendReply(Throwable t, String aCasReferenceId, Endpoint anEndpoint, int aCommand) throws AsynchAEException;
+	
+	
+	
+	public void setServerURI( String aServerURI );
+	
+	public void stop();
+	
+    static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
+}

Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/OutputChannel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/ParallelStep.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/ParallelStep.java?rev=610054&r1=610053&r2=610054&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/ParallelStep.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/ParallelStep.java Tue Jan  8 08:26:05 2008
@@ -1,37 +1,37 @@
-package org.apache.uima.aae;
-
-import org.apache.uima.flow.FlowControllerContext;
-import org.apache.uima.flow.Step;
-
-public class ParallelStep extends Step 
-{
-	  public ParallelStep(String[] aCasProcessorKeys) {
-		    mKeys = aCasProcessorKeys;
-		  }
-
-		  /**
-		   * Gets the key of the Analysis Engine to which the CAS should be routed.
-		   * 
-		   * @return an AnalysisEngine key
-		   */
-		  public String[] getAnalysisEngineKeys() {
-		    return mKeys;
-		  }
-
-		  /**
-		   * Sets the key of the Analysis Engine to which the CAS should be routed. By using this method, a
-		   * user's Flow implementation can (but is not required to) reuse the same SimpleStep object
-		   * multiple times.
-		   * 
-		   * @return an Analysis Engine key. This must be one of the keys in the FlowController's
-		   *         {@link FlowControllerContext#getAnalysisEngineMetaDataMap()}.
-		   */
-		  public void setAnalysisEngineKeys(String[] aKeys) {
-		    mKeys = aKeys;
-		  }
-
-		  private String[] mKeys;
-
-
-private static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
-}
+package org.apache.uima.aae;
+
+import org.apache.uima.flow.FlowControllerContext;
+import org.apache.uima.flow.Step;
+
+public class ParallelStep extends Step 
+{
+	  public ParallelStep(String[] aCasProcessorKeys) {
+		    mKeys = aCasProcessorKeys;
+		  }
+
+		  /**
+		   * Gets the key of the Analysis Engine to which the CAS should be routed.
+		   * 
+		   * @return an AnalysisEngine key
+		   */
+		  public String[] getAnalysisEngineKeys() {
+		    return mKeys;
+		  }
+
+		  /**
+		   * Sets the key of the Analysis Engine to which the CAS should be routed. By using this method, a
+		   * user's Flow implementation can (but is not required to) reuse the same SimpleStep object
+		   * multiple times.
+		   * 
+		   * @return an Analysis Engine key. This must be one of the keys in the FlowController's
+		   *         {@link FlowControllerContext#getAnalysisEngineMetaDataMap()}.
+		   */
+		  public void setAnalysisEngineKeys(String[] aKeys) {
+		    mKeys = aKeys;
+		  }
+
+		  private String[] mKeys;
+
+
+private static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
+}

Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/ParallelStep.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UIDGenerator.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UIDGenerator.java?rev=610054&r1=610053&r2=610054&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UIDGenerator.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UIDGenerator.java Tue Jan  8 08:26:05 2008
@@ -1,14 +1,14 @@
-package org.apache.uima.aae;
-
-import java.rmi.server.UID;
-
-public class UIDGenerator implements UniqueIdGenerator
-{
-	public String nextId()
-	{
-		return new UID().toString();
-	}
-
-
-private static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
-}
+package org.apache.uima.aae;
+
+import java.rmi.server.UID;
+
+public class UIDGenerator implements UniqueIdGenerator
+{
+	public String nextId()
+	{
+		return new UID().toString();
+	}
+
+
+private static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
+}

Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UIDGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UIMAEE_Constants.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UIMAEE_Constants.java?rev=610054&r1=610053&r2=610054&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UIMAEE_Constants.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UIMAEE_Constants.java Tue Jan  8 08:26:05 2008
@@ -1,10 +1,10 @@
-package org.apache.uima.aae;
-
-public class UIMAEE_Constants
-{
-    public static final String JMS_LOG_RESOURCE_BUNDLE = "uimaee_messages";
-	public static final String Terminate = "terminate";
-
-
-private static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
-}
+package org.apache.uima.aae;
+
+public class UIMAEE_Constants
+{
+    public static final String JMS_LOG_RESOURCE_BUNDLE = "uimaee_messages";
+	public static final String Terminate = "terminate";
+
+
+private static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
+}

Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UIMAEE_Constants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaClassFactory.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaClassFactory.java?rev=610054&r1=610053&r2=610054&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaClassFactory.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaClassFactory.java Tue Jan  8 08:26:05 2008
@@ -1,197 +1,197 @@
-package org.apache.uima.aae;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.apache.uima.UIMAFramework;
-import org.apache.uima.UimaContextAdmin;
-import org.apache.uima.aae.jmx.JmxManagement;
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineDescription;
-import org.apache.uima.analysis_engine.asb.impl.FlowControllerContainer;
-import org.apache.uima.analysis_engine.metadata.AnalysisEngineMetaData;
-import org.apache.uima.analysis_engine.metadata.FlowControllerDeclaration;
-import org.apache.uima.analysis_engine.metadata.SofaMapping;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.flow.FlowController;
-import org.apache.uima.flow.FlowControllerContext;
-import org.apache.uima.flow.FlowControllerDescription;
-import org.apache.uima.flow.impl.FlowControllerContext_impl;
-import org.apache.uima.resource.Resource;
-import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.resource.ResourceManager;
-import org.apache.uima.resource.ResourceSpecifier;
-import org.apache.uima.resource.metadata.Import;
-import org.apache.uima.resource.metadata.ProcessingResourceMetaData;
-import org.apache.uima.resource.metadata.impl.Import_impl;
-import org.apache.uima.util.InvalidXMLException;
-import org.apache.uima.util.XMLInputSource;
-
-public class UimaClassFactory
-{
-	public static final String IMPORT_BY_NAME_PREFIX = "*importByName:";
-	
-	public static AnalysisEngine produceAnalysisEngine()
-	{
-		return null;
-	}
-
-	
-	public static ResourceSpecifier produceResourceSpecifier( String aFileResource )
-	throws InvalidXMLException, ResourceInitializationException, IOException
-	{
-	    XMLInputSource input = resolveImportByName(aFileResource, UIMAFramework.newDefaultResourceManager());
-		return 	UIMAFramework.getXMLParser().parseResourceSpecifier(input);
-
-	}
-	
-	public static AnalysisEngine produceAnalysisEngine(String aDescriptor)
-	throws InvalidXMLException, ResourceInitializationException, IOException
-	{
-		
-		ResourceSpecifier specifier = 
-			UIMAFramework.getXMLParser().
-				parseAnalysisEngineDescription(new XMLInputSource(new File(aDescriptor)));		
-		
-		
-		
-		AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
-		return ae;
-	}
-
-	public static ResourceManager produceResourceManager()
-	{
-		return UIMAFramework.newDefaultResourceManager();
-	}
-
-	public static ProcessingResourceMetaData produceProcessingResourceMetaData(AnalysisEngine analysisEngine)
-	{
-		return analysisEngine.getProcessingResourceMetaData();
-	}
-	private static XMLInputSource resolveImportByName( String aFileResource, ResourceManager aResourceManager ) throws InvalidXMLException,
-    ResourceInitializationException, IOException
-	{
-	    XMLInputSource input;
-	    
-	    if (aFileResource.startsWith(IMPORT_BY_NAME_PREFIX)) 
-	    {
-	      Import theImport = new Import_impl();
-	      theImport.setName(aFileResource.substring(IMPORT_BY_NAME_PREFIX.length()));
-	      input = new XMLInputSource(theImport.findAbsoluteUrl(aResourceManager));
-	    } 
-	    else 
-	    {
-	      input = new XMLInputSource(aFileResource);
-	    }
-	    return input;
-	    
-	}
-
-	public static FlowControllerContainer produceAggregateFlowControllerContainer(
-			AnalysisEngineDescription aeSpecifier, String aFlowControllerDescriptor,
-	          Map anAggregateMergedTypeSystem, UimaContextAdmin aParentContext, SofaMapping[] aSofaMappings, JmxManagement aJmxManagementInterface ) throws InvalidXMLException,
-	          ResourceInitializationException, IOException {
-		{
-			
-		    FlowControllerDeclaration fcd = aeSpecifier.getFlowControllerDeclaration();
-		    String key = "_FlowController";   // default
-		    if ( fcd != null && fcd.getKey() != null && fcd.getKey().trim().length() > 0)
-		    {
-		    	key = fcd.getKey();
-		    }
-
-		    ResourceManager resourceManager = aParentContext.getRootContext().getResourceManager();   // NEW
-			XMLInputSource input = resolveImportByName(aFlowControllerDescriptor, resourceManager);
-
-		    FlowControllerDescription specifier = (FlowControllerDescription) UIMAFramework.getXMLParser()
-		            .parseResourceSpecifier(input);
-			AnalysisEngineMetaData anAggregateMetadata = aeSpecifier.getAnalysisEngineMetaData();
-		    
-		    Map sofamap = new TreeMap();
-		    if (aSofaMappings != null && aSofaMappings.length > 0) {
-		      for (int s = 0; s < aSofaMappings.length; s++) {
-		        // the mapping is for this analysis engine
-		        if (aSofaMappings[s].getComponentKey().equals(key)) {
-		          // if component sofa name is null, replace it with the default for TCAS sofa name
-		          // This is to support old style TCAS
-		          if (aSofaMappings[s].getComponentSofaName() == null)
-		            aSofaMappings[s].setComponentSofaName(CAS.NAME_DEFAULT_SOFA);
-		          sofamap.put(aSofaMappings[s].getComponentSofaName(), aSofaMappings[s]
-		                  .getAggregateSofaName());
-		        }
-		      }
-		    }
-		    Map flowControllerParams = new HashMap();
-		    FlowControllerContext fctx = new FlowControllerContext_impl(aParentContext, key,
-		    		sofamap, anAggregateMergedTypeSystem, anAggregateMetadata);
-		    
-		    flowControllerParams.put(Resource.PARAM_UIMA_CONTEXT, fctx);
-		    flowControllerParams.put(Resource.PARAM_RESOURCE_MANAGER, resourceManager);
-		    flowControllerParams.put(AnalysisEngine.PARAM_MBEAN_NAME_PREFIX, aJmxManagementInterface.getJmxDomain());
-		    if( aJmxManagementInterface.getMBeanServer() != null )
-		    {
-			    flowControllerParams.put(AnalysisEngine.PARAM_MBEAN_SERVER, aJmxManagementInterface.getMBeanServer());
-		    }
-		    FlowControllerContainer flowControllerContainer = new FlowControllerContainer();
-		    flowControllerContainer.initialize(specifier, flowControllerParams);
-		    return flowControllerContainer;
-		}
-	}
-	
-	public static UimaContextAdmin produceUimaContext()
-	{
-		UimaContextAdmin uctxt = UIMAFramework.newUimaContext(UIMAFramework.getLogger(), 
-				UIMAFramework.newDefaultResourceManager(), 
-				UIMAFramework.newConfigurationManager());
-
-		
-		return uctxt;
-	}
-	
-	
-    public static FlowController produceFlowController( String aFlowControllerDescriptor ) throws Exception
-    {
-		FlowControllerDescription specifier = (FlowControllerDescription)
-			UIMAFramework.getXMLParser().parseResourceSpecifier(new XMLInputSource(new File(aFlowControllerDescriptor)));
-
-		String flowControllerClassName;
-		flowControllerClassName = specifier.getImplementationName();
-
-		if (flowControllerClassName == null || flowControllerClassName.length() == 0)
-		{
-			throw new ResourceInitializationException(ResourceInitializationException.MISSING_IMPLEMENTATION_CLASS_NAME, new Object[] { specifier.getSourceUrlString() });
-		}
-		// load FlowController class
-		Class flowControllerClass = null;
-		try
-		{
-			// use application ClassLoader to load the class
-			flowControllerClass = Class.forName(flowControllerClassName);
-		}
-		catch ( ClassNotFoundException e)
-		{
-			throw new ResourceInitializationException(ResourceInitializationException.CLASS_NOT_FOUND, new Object[] { flowControllerClassName, specifier.getSourceUrlString() }, e);
-		}
-
-		Object userObject;
-		try
-		{
-			userObject = flowControllerClass.newInstance();
-		}
-		catch ( Exception e)
-		{
-			throw new ResourceInitializationException(ResourceInitializationException.COULD_NOT_INSTANTIATE, new Object[] { flowControllerClassName, specifier.getSourceUrlString() }, e);
-		}
-		if (!(userObject instanceof FlowController))
-		{
-			throw new ResourceInitializationException(ResourceInitializationException.RESOURCE_DOES_NOT_IMPLEMENT_INTERFACE, new Object[] { flowControllerClassName, FlowController.class, specifier.getSourceUrlString() });
-		}
-		return (FlowController) userObject;
-    }
-
-
-private static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
-}
+package org.apache.uima.aae;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.apache.uima.UIMAFramework;
+import org.apache.uima.UimaContextAdmin;
+import org.apache.uima.aae.jmx.JmxManagement;
+import org.apache.uima.analysis_engine.AnalysisEngine;
+import org.apache.uima.analysis_engine.AnalysisEngineDescription;
+import org.apache.uima.analysis_engine.asb.impl.FlowControllerContainer;
+import org.apache.uima.analysis_engine.metadata.AnalysisEngineMetaData;
+import org.apache.uima.analysis_engine.metadata.FlowControllerDeclaration;
+import org.apache.uima.analysis_engine.metadata.SofaMapping;
+import org.apache.uima.cas.CAS;
+import org.apache.uima.flow.FlowController;
+import org.apache.uima.flow.FlowControllerContext;
+import org.apache.uima.flow.FlowControllerDescription;
+import org.apache.uima.flow.impl.FlowControllerContext_impl;
+import org.apache.uima.resource.Resource;
+import org.apache.uima.resource.ResourceInitializationException;
+import org.apache.uima.resource.ResourceManager;
+import org.apache.uima.resource.ResourceSpecifier;
+import org.apache.uima.resource.metadata.Import;
+import org.apache.uima.resource.metadata.ProcessingResourceMetaData;
+import org.apache.uima.resource.metadata.impl.Import_impl;
+import org.apache.uima.util.InvalidXMLException;
+import org.apache.uima.util.XMLInputSource;
+
+public class UimaClassFactory
+{
+	public static final String IMPORT_BY_NAME_PREFIX = "*importByName:";
+	
+	public static AnalysisEngine produceAnalysisEngine()
+	{
+		return null;
+	}
+
+	
+	public static ResourceSpecifier produceResourceSpecifier( String aFileResource )
+	throws InvalidXMLException, ResourceInitializationException, IOException
+	{
+	    XMLInputSource input = resolveImportByName(aFileResource, UIMAFramework.newDefaultResourceManager());
+		return 	UIMAFramework.getXMLParser().parseResourceSpecifier(input);
+
+	}
+	
+	public static AnalysisEngine produceAnalysisEngine(String aDescriptor)
+	throws InvalidXMLException, ResourceInitializationException, IOException
+	{
+		
+		ResourceSpecifier specifier = 
+			UIMAFramework.getXMLParser().
+				parseAnalysisEngineDescription(new XMLInputSource(new File(aDescriptor)));		
+		
+		
+		
+		AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
+		return ae;
+	}
+
+	public static ResourceManager produceResourceManager()
+	{
+		return UIMAFramework.newDefaultResourceManager();
+	}
+
+	public static ProcessingResourceMetaData produceProcessingResourceMetaData(AnalysisEngine analysisEngine)
+	{
+		return analysisEngine.getProcessingResourceMetaData();
+	}
+	private static XMLInputSource resolveImportByName( String aFileResource, ResourceManager aResourceManager ) throws InvalidXMLException,
+    ResourceInitializationException, IOException
+	{
+	    XMLInputSource input;
+	    
+	    if (aFileResource.startsWith(IMPORT_BY_NAME_PREFIX)) 
+	    {
+	      Import theImport = new Import_impl();
+	      theImport.setName(aFileResource.substring(IMPORT_BY_NAME_PREFIX.length()));
+	      input = new XMLInputSource(theImport.findAbsoluteUrl(aResourceManager));
+	    } 
+	    else 
+	    {
+	      input = new XMLInputSource(aFileResource);
+	    }
+	    return input;
+	    
+	}
+
+	public static FlowControllerContainer produceAggregateFlowControllerContainer(
+			AnalysisEngineDescription aeSpecifier, String aFlowControllerDescriptor,
+	          Map anAggregateMergedTypeSystem, UimaContextAdmin aParentContext, SofaMapping[] aSofaMappings, JmxManagement aJmxManagementInterface ) throws InvalidXMLException,
+	          ResourceInitializationException, IOException {
+		{
+			
+		    FlowControllerDeclaration fcd = aeSpecifier.getFlowControllerDeclaration();
+		    String key = "_FlowController";   // default
+		    if ( fcd != null && fcd.getKey() != null && fcd.getKey().trim().length() > 0)
+		    {
+		    	key = fcd.getKey();
+		    }
+
+		    ResourceManager resourceManager = aParentContext.getRootContext().getResourceManager();   // NEW
+			XMLInputSource input = resolveImportByName(aFlowControllerDescriptor, resourceManager);
+
+		    FlowControllerDescription specifier = (FlowControllerDescription) UIMAFramework.getXMLParser()
+		            .parseResourceSpecifier(input);
+			AnalysisEngineMetaData anAggregateMetadata = aeSpecifier.getAnalysisEngineMetaData();
+		    
+		    Map sofamap = new TreeMap();
+		    if (aSofaMappings != null && aSofaMappings.length > 0) {
+		      for (int s = 0; s < aSofaMappings.length; s++) {
+		        // the mapping is for this analysis engine
+		        if (aSofaMappings[s].getComponentKey().equals(key)) {
+		          // if component sofa name is null, replace it with the default for TCAS sofa name
+		          // This is to support old style TCAS
+		          if (aSofaMappings[s].getComponentSofaName() == null)
+		            aSofaMappings[s].setComponentSofaName(CAS.NAME_DEFAULT_SOFA);
+		          sofamap.put(aSofaMappings[s].getComponentSofaName(), aSofaMappings[s]
+		                  .getAggregateSofaName());
+		        }
+		      }
+		    }
+		    Map flowControllerParams = new HashMap();
+		    FlowControllerContext fctx = new FlowControllerContext_impl(aParentContext, key,
+		    		sofamap, anAggregateMergedTypeSystem, anAggregateMetadata);
+		    
+		    flowControllerParams.put(Resource.PARAM_UIMA_CONTEXT, fctx);
+		    flowControllerParams.put(Resource.PARAM_RESOURCE_MANAGER, resourceManager);
+		    flowControllerParams.put(AnalysisEngine.PARAM_MBEAN_NAME_PREFIX, aJmxManagementInterface.getJmxDomain());
+		    if( aJmxManagementInterface.getMBeanServer() != null )
+		    {
+			    flowControllerParams.put(AnalysisEngine.PARAM_MBEAN_SERVER, aJmxManagementInterface.getMBeanServer());
+		    }
+		    FlowControllerContainer flowControllerContainer = new FlowControllerContainer();
+		    flowControllerContainer.initialize(specifier, flowControllerParams);
+		    return flowControllerContainer;
+		}
+	}
+	
+	public static UimaContextAdmin produceUimaContext()
+	{
+		UimaContextAdmin uctxt = UIMAFramework.newUimaContext(UIMAFramework.getLogger(), 
+				UIMAFramework.newDefaultResourceManager(), 
+				UIMAFramework.newConfigurationManager());
+
+		
+		return uctxt;
+	}
+	
+	
+    public static FlowController produceFlowController( String aFlowControllerDescriptor ) throws Exception
+    {
+		FlowControllerDescription specifier = (FlowControllerDescription)
+			UIMAFramework.getXMLParser().parseResourceSpecifier(new XMLInputSource(new File(aFlowControllerDescriptor)));
+
+		String flowControllerClassName;
+		flowControllerClassName = specifier.getImplementationName();
+
+		if (flowControllerClassName == null || flowControllerClassName.length() == 0)
+		{
+			throw new ResourceInitializationException(ResourceInitializationException.MISSING_IMPLEMENTATION_CLASS_NAME, new Object[] { specifier.getSourceUrlString() });
+		}
+		// load FlowController class
+		Class flowControllerClass = null;
+		try
+		{
+			// use application ClassLoader to load the class
+			flowControllerClass = Class.forName(flowControllerClassName);
+		}
+		catch ( ClassNotFoundException e)
+		{
+			throw new ResourceInitializationException(ResourceInitializationException.CLASS_NOT_FOUND, new Object[] { flowControllerClassName, specifier.getSourceUrlString() }, e);
+		}
+
+		Object userObject;
+		try
+		{
+			userObject = flowControllerClass.newInstance();
+		}
+		catch ( Exception e)
+		{
+			throw new ResourceInitializationException(ResourceInitializationException.COULD_NOT_INSTANTIATE, new Object[] { flowControllerClassName, specifier.getSourceUrlString() }, e);
+		}
+		if (!(userObject instanceof FlowController))
+		{
+			throw new ResourceInitializationException(ResourceInitializationException.RESOURCE_DOES_NOT_IMPLEMENT_INTERFACE, new Object[] { flowControllerClassName, FlowController.class, specifier.getSourceUrlString() });
+		}
+		return (FlowController) userObject;
+    }
+
+
+private static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
+}

Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaClassFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaEEAdminContext.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaEEAdminContext.java?rev=610054&r1=610053&r2=610054&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaEEAdminContext.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaEEAdminContext.java Tue Jan  8 08:26:05 2008
@@ -1,9 +1,9 @@
-package org.apache.uima.aae;
-
-public interface UimaEEAdminContext
-{
-	public void shutdown();
-	public void stopListener(String anEndpoint );
-
-    static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
-}
+package org.apache.uima.aae;
+
+public interface UimaEEAdminContext
+{
+	public void shutdown();
+	public void stopListener(String anEndpoint );
+
+    static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
+}

Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaEEAdminContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaEEShutdownHook.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaEEShutdownHook.java?rev=610054&r1=610053&r2=610054&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaEEShutdownHook.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaEEShutdownHook.java Tue Jan  8 08:26:05 2008
@@ -1,35 +1,35 @@
-package org.apache.uima.aae;
-
-import java.util.ArrayList;
-
-import org.apache.uima.aae.jmx.JmxManager;
-
-public class UimaEEShutdownHook extends Thread
-{
-	private JmxManager[] jmxMgrs;
-	private String serviceName;
-	
-	public UimaEEShutdownHook( ArrayList jmxManagers, String aServiceName )
-	{
-		jmxMgrs = new JmxManager[jmxManagers.size()];
-		jmxManagers.toArray(jmxMgrs);
-		serviceName = aServiceName;
-	}
-	public void run() 
-	{
-//        try
-//        {
-//        	for( int i=0; jmxMgrs!= null && i < jmxMgrs.length; i++ )
-//        	{
-//            	jmxMgrs[i].removeQueue();
-//        	}
-//        }
-//        catch( Exception e)
-//        {
-//        	e.printStackTrace();
-//        }
-	}
-
-
-private static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
-}
+package org.apache.uima.aae;
+
+import java.util.ArrayList;
+
+import org.apache.uima.aae.jmx.JmxManager;
+
+public class UimaEEShutdownHook extends Thread
+{
+	private JmxManager[] jmxMgrs;
+	private String serviceName;
+	
+	public UimaEEShutdownHook( ArrayList jmxManagers, String aServiceName )
+	{
+		jmxMgrs = new JmxManager[jmxManagers.size()];
+		jmxManagers.toArray(jmxMgrs);
+		serviceName = aServiceName;
+	}
+	public void run() 
+	{
+//        try
+//        {
+//        	for( int i=0; jmxMgrs!= null && i < jmxMgrs.length; i++ )
+//        	{
+//            	jmxMgrs[i].removeQueue();
+//        	}
+//        }
+//        catch( Exception e)
+//        {
+//        	e.printStackTrace();
+//        }
+	}
+
+
+private static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
+}

Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaEEShutdownHook.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaSerializer.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaSerializer.java?rev=610054&r1=610053&r2=610054&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaSerializer.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaSerializer.java Tue Jan  8 08:26:05 2008
@@ -1,177 +1,177 @@
-package org.apache.uima.aae;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.io.Writer;
-
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.OutputKeys;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.TypeSystem;
-import org.apache.uima.cas.impl.OutOfTypeSystemData;
-import org.apache.uima.cas.impl.XCASDeserializer;
-import org.apache.uima.cas.impl.XCASSerializer;
-import org.apache.uima.cas.impl.XmiCasDeserializer;
-import org.apache.uima.cas.impl.XmiCasSerializer;
-import org.apache.uima.cas.impl.XmiSerializationSharedData;
-import org.apache.uima.util.XMLSerializer;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLReaderFactory;
-
-public class UimaSerializer
-{
-	/**
-	 * Serializes XCas into CAS
-	 * 
-	 * @param anXcas
-	 * @param aCas
-	 * @throws Exception
-	 */
-	public static OutOfTypeSystemData deSerialiazeFromXCAS(String anXcas, CAS aCas) throws Exception
-	{
-		OutOfTypeSystemData otsd = new OutOfTypeSystemData();
-		TypeSystem typesToLoad2 = aCas.getTypeSystem();
-		ByteArrayInputStream bis = new ByteArrayInputStream(anXcas.getBytes());
-		XCASDeserializer deser2 = new XCASDeserializer(typesToLoad2);
-		ContentHandler deserHandler2 = deser2.getXCASHandler(aCas, otsd);
-
-		SAXParserFactory fact2 = SAXParserFactory.newInstance();
-		SAXParser parser2;
-		parser2 = fact2.newSAXParser();
-		XMLReader xmlReader2 = parser2.getXMLReader();
-		xmlReader2.setContentHandler(deserHandler2);
-		xmlReader2.parse(new InputSource(bis));
-		return otsd;
-	}
-
-	/**
-	 * Serializes CAS into a given OutputStream
-	 * 
-	 * @param stream
-	 * @param aCAS
-	 * @param encoding
-	 * @param typeSystem
-	 * @throws IOException
-	 * @throws SAXException
-	 */
-	public static void serializeToXCAS(OutputStream stream, CAS aCAS, String encoding, TypeSystem typeSystem, OutOfTypeSystemData otsd) throws IOException, SAXException
-	{
-
-		if (typeSystem == null)
-			typeSystem = aCAS.getTypeSystem();
-		XMLSerializer xmlSer = new XMLSerializer(stream, false);
-		if (encoding != null)
-			xmlSer.setOutputProperty(OutputKeys.ENCODING, encoding);
-		XCASSerializer ser = new XCASSerializer(typeSystem);
-		ser.serialize(aCAS, xmlSer.getContentHandler(), false, otsd);
-	}
-
-	/**
-	 * Serializes CAS into a given OutputStream
-	 * 
-	 * @param stream
-	 * @param aCAS
-	 * @param encoding
-	 * @param typeSystem
-	 * @throws IOException
-	 * @throws SAXException
-	 */
-	public static void serializeToXMI(OutputStream stream, CAS aCAS, String encoding, TypeSystem typeSystem, OutOfTypeSystemData otsd) throws IOException, SAXException
-	{
-
-		if (typeSystem == null)
-			typeSystem = aCAS.getTypeSystem();
-//		XMLSerializer xmlSer = new XMLSerializer(writer, false);
-		XMLSerializer xmlSer = new XMLSerializer(stream, false);
-		if (encoding != null)
-			xmlSer.setOutputProperty(OutputKeys.ENCODING, encoding);
-
-		XmiCasSerializer ser = new XmiCasSerializer(typeSystem);
-		
-		ser.serialize(aCAS, xmlSer.getContentHandler());
-		// ser.serialize(aCAS, xmlSer.getContentHandler(),false, otsd);
-	}
-
-	/**
-	 * Utility method for serializing a CAS to an XMI String
-	 */
-	public static String serializeCasToXmi(CAS aCAS, XmiSerializationSharedData serSharedData) throws Exception
-	{
-		Writer writer = new StringWriter();
-		try
-		{
-			XMLSerializer xmlSer = new XMLSerializer(writer, false);
-			XmiCasSerializer ser = new XmiCasSerializer(aCAS.getTypeSystem()); 
-			ser.serialize(aCAS, xmlSer.getContentHandler(), null, serSharedData);
-			return writer.toString();
-		}
-		catch( Exception e)
-		{
-			throw e;
-		}
-		finally
-		{
-			writer.close();
-		}
-	}
-/*
-	public static  String serializeCasToXmi(CAS cas, XmiSerializationSharedData serSharedData) throws IOException, SAXException
-	{
-		ByteArrayOutputStream baos = new ByteArrayOutputStream();
-		XmiCasSerializer.serialize(cas, null, baos, false, serSharedData);
-		
-		baos.close();
-		String xmiStr = new String(baos.toByteArray(), "UTF-8"); 
-		return xmiStr;
-	}
-*/
-	
-	/** Utility method for deserializing a CAS from an XMI String */
-	public static void deserializeCasFromXmi(String anXmlStr, CAS aCAS, XmiSerializationSharedData aSharedData, boolean aLenient, int aMergePoint) 
-	throws FactoryConfigurationError, ParserConfigurationException, SAXException, IOException
-	{
-		
-		Reader reader = new StringReader(anXmlStr);
-		XMLReader xmlReader = XMLReaderFactory.createXMLReader();
-	    XmiCasDeserializer deser = new XmiCasDeserializer(aCAS.getTypeSystem());
-	    ContentHandler handler = deser.getXmiCasHandler(aCAS, aLenient, aSharedData, aMergePoint);
-	    xmlReader.setContentHandler(handler);
-	    xmlReader.parse(new InputSource(reader));
-
-	    
-	    
-	    
-	    
-	    /*		
-		byte[] bytes = xmlStr.getBytes("UTF-8"); // this assumes the encoding
-													// is UTF-8, which is the
-													// default output encoding
-													// of the XmiCasSerializer
-		ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-		try
-		{
-			XmiCasDeserializer.deserialize(bais, cas, lenient, sharedData, mergePoint);
-		}
-		finally
-		{
-			bais.close();
-		}
-*/
-		
-	}
-
-
-private static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
-}
+package org.apache.uima.aae;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.io.Writer;
+
+import javax.xml.parsers.FactoryConfigurationError;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.OutputKeys;
+
+import org.apache.uima.cas.CAS;
+import org.apache.uima.cas.TypeSystem;
+import org.apache.uima.cas.impl.OutOfTypeSystemData;
+import org.apache.uima.cas.impl.XCASDeserializer;
+import org.apache.uima.cas.impl.XCASSerializer;
+import org.apache.uima.cas.impl.XmiCasDeserializer;
+import org.apache.uima.cas.impl.XmiCasSerializer;
+import org.apache.uima.cas.impl.XmiSerializationSharedData;
+import org.apache.uima.util.XMLSerializer;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.XMLReaderFactory;
+
+public class UimaSerializer
+{
+	/**
+	 * Serializes XCas into CAS
+	 * 
+	 * @param anXcas
+	 * @param aCas
+	 * @throws Exception
+	 */
+	public static OutOfTypeSystemData deSerialiazeFromXCAS(String anXcas, CAS aCas) throws Exception
+	{
+		OutOfTypeSystemData otsd = new OutOfTypeSystemData();
+		TypeSystem typesToLoad2 = aCas.getTypeSystem();
+		ByteArrayInputStream bis = new ByteArrayInputStream(anXcas.getBytes());
+		XCASDeserializer deser2 = new XCASDeserializer(typesToLoad2);
+		ContentHandler deserHandler2 = deser2.getXCASHandler(aCas, otsd);
+
+		SAXParserFactory fact2 = SAXParserFactory.newInstance();
+		SAXParser parser2;
+		parser2 = fact2.newSAXParser();
+		XMLReader xmlReader2 = parser2.getXMLReader();
+		xmlReader2.setContentHandler(deserHandler2);
+		xmlReader2.parse(new InputSource(bis));
+		return otsd;
+	}
+
+	/**
+	 * Serializes CAS into a given OutputStream
+	 * 
+	 * @param stream
+	 * @param aCAS
+	 * @param encoding
+	 * @param typeSystem
+	 * @throws IOException
+	 * @throws SAXException
+	 */
+	public static void serializeToXCAS(OutputStream stream, CAS aCAS, String encoding, TypeSystem typeSystem, OutOfTypeSystemData otsd) throws IOException, SAXException
+	{
+
+		if (typeSystem == null)
+			typeSystem = aCAS.getTypeSystem();
+		XMLSerializer xmlSer = new XMLSerializer(stream, false);
+		if (encoding != null)
+			xmlSer.setOutputProperty(OutputKeys.ENCODING, encoding);
+		XCASSerializer ser = new XCASSerializer(typeSystem);
+		ser.serialize(aCAS, xmlSer.getContentHandler(), false, otsd);
+	}
+
+	/**
+	 * Serializes CAS into a given OutputStream
+	 * 
+	 * @param stream
+	 * @param aCAS
+	 * @param encoding
+	 * @param typeSystem
+	 * @throws IOException
+	 * @throws SAXException
+	 */
+	public static void serializeToXMI(OutputStream stream, CAS aCAS, String encoding, TypeSystem typeSystem, OutOfTypeSystemData otsd) throws IOException, SAXException
+	{
+
+		if (typeSystem == null)
+			typeSystem = aCAS.getTypeSystem();
+//		XMLSerializer xmlSer = new XMLSerializer(writer, false);
+		XMLSerializer xmlSer = new XMLSerializer(stream, false);
+		if (encoding != null)
+			xmlSer.setOutputProperty(OutputKeys.ENCODING, encoding);
+
+		XmiCasSerializer ser = new XmiCasSerializer(typeSystem);
+		
+		ser.serialize(aCAS, xmlSer.getContentHandler());
+		// ser.serialize(aCAS, xmlSer.getContentHandler(),false, otsd);
+	}
+
+	/**
+	 * Utility method for serializing a CAS to an XMI String
+	 */
+	public static String serializeCasToXmi(CAS aCAS, XmiSerializationSharedData serSharedData) throws Exception
+	{
+		Writer writer = new StringWriter();
+		try
+		{
+			XMLSerializer xmlSer = new XMLSerializer(writer, false);
+			XmiCasSerializer ser = new XmiCasSerializer(aCAS.getTypeSystem()); 
+			ser.serialize(aCAS, xmlSer.getContentHandler(), null, serSharedData);
+			return writer.toString();
+		}
+		catch( Exception e)
+		{
+			throw e;
+		}
+		finally
+		{
+			writer.close();
+		}
+	}
+/*
+	public static  String serializeCasToXmi(CAS cas, XmiSerializationSharedData serSharedData) throws IOException, SAXException
+	{
+		ByteArrayOutputStream baos = new ByteArrayOutputStream();
+		XmiCasSerializer.serialize(cas, null, baos, false, serSharedData);
+		
+		baos.close();
+		String xmiStr = new String(baos.toByteArray(), "UTF-8"); 
+		return xmiStr;
+	}
+*/
+	
+	/** Utility method for deserializing a CAS from an XMI String */
+	public static void deserializeCasFromXmi(String anXmlStr, CAS aCAS, XmiSerializationSharedData aSharedData, boolean aLenient, int aMergePoint) 
+	throws FactoryConfigurationError, ParserConfigurationException, SAXException, IOException
+	{
+		
+		Reader reader = new StringReader(anXmlStr);
+		XMLReader xmlReader = XMLReaderFactory.createXMLReader();
+	    XmiCasDeserializer deser = new XmiCasDeserializer(aCAS.getTypeSystem());
+	    ContentHandler handler = deser.getXmiCasHandler(aCAS, aLenient, aSharedData, aMergePoint);
+	    xmlReader.setContentHandler(handler);
+	    xmlReader.parse(new InputSource(reader));
+
+	    
+	    
+	    
+	    
+	    /*		
+		byte[] bytes = xmlStr.getBytes("UTF-8"); // this assumes the encoding
+													// is UTF-8, which is the
+													// default output encoding
+													// of the XmiCasSerializer
+		ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+		try
+		{
+			XmiCasDeserializer.deserialize(bais, cas, lenient, sharedData, mergePoint);
+		}
+		finally
+		{
+			bais.close();
+		}
+*/
+		
+	}
+
+
+private static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
+}

Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UimaSerializer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UniqueIdGenerator.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UniqueIdGenerator.java?rev=610054&r1=610053&r2=610054&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UniqueIdGenerator.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UniqueIdGenerator.java Tue Jan  8 08:26:05 2008
@@ -1,8 +1,8 @@
-package org.apache.uima.aae;
-
-public interface UniqueIdGenerator
-{
-	public String nextId();
-
-	static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
-}
+package org.apache.uima.aae;
+
+public interface UniqueIdGenerator
+{
+	public String nextId();
+
+	static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
+}

Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/UniqueIdGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/client/UimaAsynchronousEngine.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/client/UimaAsynchronousEngine.java?rev=610054&r1=610053&r2=610054&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/client/UimaAsynchronousEngine.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/client/UimaAsynchronousEngine.java Tue Jan  8 08:26:05 2008
@@ -1,152 +1,152 @@
-package org.apache.uima.aae.client;
-
-import java.util.Map;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.collection.CollectionReader;
-import org.apache.uima.collection.StatusCallbackListener;
-import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.resource.ResourceProcessException;
-import org.apache.uima.resource.metadata.ProcessingResourceMetaData;
-
-public interface UimaAsynchronousEngine
-{
-	public final String ApplicationContext = "ApplicationContext";
-	public final String ServerUri = "ServerURI";
-	public final String Endpoint = "Endpoint";
-	public final String CasPoolSize = "CasPoolSize";
-	public static final String ReplyWindow = "ReplyWindow";
-	public static final String Timeout = "Timeout";
-	public static final String CpcTimeout = "CpcTimeout";
-	public static final String GetMetaTimeout = "GetMetaTimeout";
-	public static final String DD2SpringXsltFilePath = "DD2SpringXsltFilePath";
-	public static final String SaxonClasspath = "SaxonClasspath";
-	public static final String UimaEeDebug = "-uimaEeDebug";
-	/**
-	 * Initializes and instantiates UIMA EE Client component from
-	 * provided spring xml context configuration file(s). 
-	 * 
-	 * @param configFiles - spring xml context files
-	 * @param anApplicationContext
-	 * 
-	 * @throws ResourceInitializationException
-	 */
-	public void initialize( String[] configFiles, Map anApplicationContext ) throws ResourceInitializationException;
-
-	/**
-	 * Initializes asynchronous client using configuration parameters provided in a Map object. It creates a
-	 * connection to a service queue managed by a Broker as specified in the parameters. A temporary reply 
-	 * queue is also created here with a jms listener attached to it. Once the connections are made and the
-	 * listener is started the method sends getMeta request to the uima ee service and waits for a response.
-	 * When the reply to getMeta is receives the uima ee client is fully initialized and notifies an
-	 * application by calling initializationComplete() on the application listener.
-	 * 
-	 * @param anApplicationContext - configuration containing UIMA EE Service Broker URI, service
-	 * queue name, timeout value, reply window size, and Cas Pool size.
-	 * 
-	 * @throws ResourceInitializationException 
-	 */
-	public void initialize( Map anApplicationContext ) throws ResourceInitializationException;
-
-	/**
-	 * Plugs in a CollectionReader instance to use. The application calls process() method to
-	 * begin analyzing the collection.
-	 * 
-	 * @param aCollectionReader - instnace of a CollectionReader
-	 */
-	public void setCollectionReader( CollectionReader aCollectionReader ) throws ResourceInitializationException;
-	
-	/**
-	 * Plugs-in application specific listener. Via this listener the
-	 * application receives callbacks. More than one listener can be added.
-	 *
-	 * 
-	 * @param aListener - application listener object to add
-	 */
-	public void addStatusCallbackListener(UimaEEStatusCallbackListener aListener);
-	
-	/**
-	 * Removes named application listener. 
-	 * 
-	 * @param aListener - application listener to remove
-	 */
-	public void removeStatusCallbackListener(UimaEEStatusCallbackListener aListener);
-	
-	/**
-	 * Stops the asynchronous client. Cleans up resources, drops connection to UIMA EE
-	 * service queue and stops listening on a response queue.
-	 * 
-	 * @throws Exception
-	 */
-	public void stop()  throws Exception;
-	
-	/**
-	 * Not implemented
-	 * 
-	 * @return null
-	 */
-	public String getPerformanceReport();
-	
-	/**
-	 * Starts processing a collection. This method should be only called after an instance
-	 * of a CollectionReader is provided via setCollectionReader(). The method will block
-	 * until the CollectionReader finishes processing of the entire collection.  
-	 * 
-	 * @throws ResourceProcessException - when CollectionReader is not provided, or initialize()
-	 *  has not been called.
-	 */
-	public void process() throws ResourceProcessException;
-	/**
-	 * Sends a given CAS for analysis to UIMA EE Service. This method may block if 
-	 * the client is configured to use a reply window which prevents from sending too
-	 * many CASes to the service. Assuming the window is large enough to send the CAS
-	 * this method returns as soon as the CAS is sent. Before sending the CAS, a timer 
-	 * starts that will expire if a reply doesnt arrive in a given interval.
-	 * 
-	 * @param aCAS - a CAS to analyze.
-	 * 
-	 * @throws ResourceProcessException 
-	 */
-	public String sendCAS( CAS aCAS ) throws ResourceProcessException;
-	
-	/**
-	 * Requests a new CAS instance from a CAS pool. This method blocks
-	 * until a free instance of CAS is available in a CAS pool.
-	 * 
-	 * @return - CAS instance
-	 * @throws Exception
-	 */
-	public CAS getCAS() throws Exception;
-	
-	/**
-	 * Sends a Collection Processing Complete request to UIMA EE Analysis Service and
-	 * blocks waiting for a reply. The method blocks until the service replies
-	 * or a timeout occurs. Before returning, this method will notify the application
-	 * of completing Collection Processing Complete request via a listener 
-	 * 
-	 * @throws ResourceProcessException
-	 */
-	public void collectionProcessingComplete() throws ResourceProcessException;
-	
-	 /**
-	   * Returns ProcessingResourceMetadata of the UIMA EE Analysis Service. The metadata is 
-	   * obtained from the service during initialization and cached . 
-	   * 	   
-	   *  returns - instance of ProcessingResourceMetadata received from an asynchronous
-	   *  Analysis Engine service, or null if initialize() has not yet been called.
-	   */
-	  public ProcessingResourceMetaData getMetaData() throws ResourceInitializationException;
-	  
-	  /**
-	   * Send a CAS, wait for response, and deserialize into same CAS. 
-	   */
-	  public void sendAndReceiveCAS(CAS aCAS) throws ResourceProcessException;
-	
-	  public String deploy( String aDeploymentDescriptor, Map anApplicationContext) throws Exception;
-	  
-	  public String deploy( String[] aDeploymentDescriptorList,  Map anApplicationContext ) throws Exception;
-	  
-	  public void undeploy( String aSpringContainerId ) throws Exception;
-
-public static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
-}
+package org.apache.uima.aae.client;
+
+import java.util.Map;
+
+import org.apache.uima.cas.CAS;
+import org.apache.uima.collection.CollectionReader;
+import org.apache.uima.collection.StatusCallbackListener;
+import org.apache.uima.resource.ResourceInitializationException;
+import org.apache.uima.resource.ResourceProcessException;
+import org.apache.uima.resource.metadata.ProcessingResourceMetaData;
+
+public interface UimaAsynchronousEngine
+{
+	public final String ApplicationContext = "ApplicationContext";
+	public final String ServerUri = "ServerURI";
+	public final String Endpoint = "Endpoint";
+	public final String CasPoolSize = "CasPoolSize";
+	public static final String ReplyWindow = "ReplyWindow";
+	public static final String Timeout = "Timeout";
+	public static final String CpcTimeout = "CpcTimeout";
+	public static final String GetMetaTimeout = "GetMetaTimeout";
+	public static final String DD2SpringXsltFilePath = "DD2SpringXsltFilePath";
+	public static final String SaxonClasspath = "SaxonClasspath";
+	public static final String UimaEeDebug = "-uimaEeDebug";
+	/**
+	 * Initializes and instantiates UIMA EE Client component from
+	 * provided spring xml context configuration file(s). 
+	 * 
+	 * @param configFiles - spring xml context files
+	 * @param anApplicationContext
+	 * 
+	 * @throws ResourceInitializationException
+	 */
+	public void initialize( String[] configFiles, Map anApplicationContext ) throws ResourceInitializationException;
+
+	/**
+	 * Initializes asynchronous client using configuration parameters provided in a Map object. It creates a
+	 * connection to a service queue managed by a Broker as specified in the parameters. A temporary reply 
+	 * queue is also created here with a jms listener attached to it. Once the connections are made and the
+	 * listener is started the method sends getMeta request to the uima ee service and waits for a response.
+	 * When the reply to getMeta is receives the uima ee client is fully initialized and notifies an
+	 * application by calling initializationComplete() on the application listener.
+	 * 
+	 * @param anApplicationContext - configuration containing UIMA EE Service Broker URI, service
+	 * queue name, timeout value, reply window size, and Cas Pool size.
+	 * 
+	 * @throws ResourceInitializationException 
+	 */
+	public void initialize( Map anApplicationContext ) throws ResourceInitializationException;
+
+	/**
+	 * Plugs in a CollectionReader instance to use. The application calls process() method to
+	 * begin analyzing the collection.
+	 * 
+	 * @param aCollectionReader - instnace of a CollectionReader
+	 */
+	public void setCollectionReader( CollectionReader aCollectionReader ) throws ResourceInitializationException;
+	
+	/**
+	 * Plugs-in application specific listener. Via this listener the
+	 * application receives callbacks. More than one listener can be added.
+	 *
+	 * 
+	 * @param aListener - application listener object to add
+	 */
+	public void addStatusCallbackListener(UimaEEStatusCallbackListener aListener);
+	
+	/**
+	 * Removes named application listener. 
+	 * 
+	 * @param aListener - application listener to remove
+	 */
+	public void removeStatusCallbackListener(UimaEEStatusCallbackListener aListener);
+	
+	/**
+	 * Stops the asynchronous client. Cleans up resources, drops connection to UIMA EE
+	 * service queue and stops listening on a response queue.
+	 * 
+	 * @throws Exception
+	 */
+	public void stop()  throws Exception;
+	
+	/**
+	 * Not implemented
+	 * 
+	 * @return null
+	 */
+	public String getPerformanceReport();
+	
+	/**
+	 * Starts processing a collection. This method should be only called after an instance
+	 * of a CollectionReader is provided via setCollectionReader(). The method will block
+	 * until the CollectionReader finishes processing of the entire collection.  
+	 * 
+	 * @throws ResourceProcessException - when CollectionReader is not provided, or initialize()
+	 *  has not been called.
+	 */
+	public void process() throws ResourceProcessException;
+	/**
+	 * Sends a given CAS for analysis to UIMA EE Service. This method may block if 
+	 * the client is configured to use a reply window which prevents from sending too
+	 * many CASes to the service. Assuming the window is large enough to send the CAS
+	 * this method returns as soon as the CAS is sent. Before sending the CAS, a timer 
+	 * starts that will expire if a reply doesnt arrive in a given interval.
+	 * 
+	 * @param aCAS - a CAS to analyze.
+	 * 
+	 * @throws ResourceProcessException 
+	 */
+	public String sendCAS( CAS aCAS ) throws ResourceProcessException;
+	
+	/**
+	 * Requests a new CAS instance from a CAS pool. This method blocks
+	 * until a free instance of CAS is available in a CAS pool.
+	 * 
+	 * @return - CAS instance
+	 * @throws Exception
+	 */
+	public CAS getCAS() throws Exception;
+	
+	/**
+	 * Sends a Collection Processing Complete request to UIMA EE Analysis Service and
+	 * blocks waiting for a reply. The method blocks until the service replies
+	 * or a timeout occurs. Before returning, this method will notify the application
+	 * of completing Collection Processing Complete request via a listener 
+	 * 
+	 * @throws ResourceProcessException
+	 */
+	public void collectionProcessingComplete() throws ResourceProcessException;
+	
+	 /**
+	   * Returns ProcessingResourceMetadata of the UIMA EE Analysis Service. The metadata is 
+	   * obtained from the service during initialization and cached . 
+	   * 	   
+	   *  returns - instance of ProcessingResourceMetadata received from an asynchronous
+	   *  Analysis Engine service, or null if initialize() has not yet been called.
+	   */
+	  public ProcessingResourceMetaData getMetaData() throws ResourceInitializationException;
+	  
+	  /**
+	   * Send a CAS, wait for response, and deserialize into same CAS. 
+	   */
+	  public void sendAndReceiveCAS(CAS aCAS) throws ResourceProcessException;
+	
+	  public String deploy( String aDeploymentDescriptor, Map anApplicationContext) throws Exception;
+	  
+	  public String deploy( String[] aDeploymentDescriptorList,  Map anApplicationContext ) throws Exception;
+	  
+	  public void undeploy( String aSpringContainerId ) throws Exception;
+
+public static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
+}

Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/client/UimaAsynchronousEngine.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/client/UimaEEProcessStatusImpl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/client/UimaEEProcessStatusImpl.java?rev=610054&r1=610053&r2=610054&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/client/UimaEEProcessStatusImpl.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/client/UimaEEProcessStatusImpl.java Tue Jan  8 08:26:05 2008
@@ -1,117 +1,117 @@
-package org.apache.uima.aae.client;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.uima.util.ProcessTrace;
-
-public class UimaEEProcessStatusImpl implements org.apache.uima.collection.EntityProcessStatus 
-{
-
-	  private static final long serialVersionUID = -5101356145458558249L;
-
-	  ProcessTrace prT;
-
-	  HashMap eventMap = new HashMap();
-
-	  List exceptionList = new ArrayList();
-
-	  List failedList = new ArrayList();
-
-	  HashMap resultHM = new HashMap();
-
-	  private boolean isSkipped = false;
-
-	  public boolean isProcessed = true;
-
-	  public UimaEEProcessStatusImpl(ProcessTrace p) {
-	    prT = p;
-	  }
-
-	  public UimaEEProcessStatusImpl(ProcessTrace p, boolean aSkip) {
-	    prT = p;
-	    isSkipped = aSkip;
-	  }
-
-	  public boolean isException() {
-	    if (failedList.size() > 0) {
-	      return true;
-	    } else {
-	      return false;
-	    }
-	  }
-
-	  public String getStatusMessage() {
-	    if (failedList.size() > 0)
-	      return "failed";
-	    return "success";
-	  }
-
-	  public List getExceptions() {
-	    return exceptionList;
-	  }
-
-	  public List getFailedComponentNames() {
-
-	    return failedList;
-	  }
-
-	  public void addEventStatus(String aEventName, String aResultS, Throwable aE) {
-	    EventLog eL = new EventLog(aResultS, aE);
-	    eventMap.put(aEventName, eL);
-	    if (!aResultS.equalsIgnoreCase("success")) {
-	      failedList.add(aEventName);
-	      exceptionList.add(aE);
-
-	    }
-	    resultHM.put(aEventName, aE);
-	  }
-
-	  public ProcessTrace getProcessTrace() {
-	    return prT;
-	  }
-
-	  public void printEventLog() {
-	    Iterator iter = eventMap.entrySet().iterator();
-	    while (iter.hasNext()) {
-	      Object obj = iter.next();
-	      String key = (String) ((Map.Entry) obj).getKey();
-	      EventLog eL = (EventLog) ((Map.Entry) obj).getValue();
-	      System.out.println(" EVENT " + key + "  Result " + eL.status);
-	      if (eL.exception != null) {
-	        eL.exception.printStackTrace();
-	      }
-
-	    }
-	    for (int j = 0; j < failedList.size(); j++) {
-
-	      System.out.println(" failed component name " + failedList.get(j));
-	    }
-	  }
-
-	  static class EventLog {
-	    String status;
-
-	    // Exception exception;
-	    Throwable exception;
-
-	    // public EventLog( String stats , Exception e ) {
-	    public EventLog(String stats, Throwable e) {
-	      status = stats;
-	      exception = e;
-	    }
-
-	  }
-
-	  /**
-	   * Gets whether an entity has beed skipped during processing
-	   * 
-	   * @return true if an entity was skipped, false otherwise
-	   */
-	  public boolean isEntitySkipped() {
-	    return isSkipped;
-	  }
-	}
+package org.apache.uima.aae.client;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.uima.util.ProcessTrace;
+
+public class UimaEEProcessStatusImpl implements org.apache.uima.collection.EntityProcessStatus 
+{
+
+	  private static final long serialVersionUID = -5101356145458558249L;
+
+	  ProcessTrace prT;
+
+	  HashMap eventMap = new HashMap();
+
+	  List exceptionList = new ArrayList();
+
+	  List failedList = new ArrayList();
+
+	  HashMap resultHM = new HashMap();
+
+	  private boolean isSkipped = false;
+
+	  public boolean isProcessed = true;
+
+	  public UimaEEProcessStatusImpl(ProcessTrace p) {
+	    prT = p;
+	  }
+
+	  public UimaEEProcessStatusImpl(ProcessTrace p, boolean aSkip) {
+	    prT = p;
+	    isSkipped = aSkip;
+	  }
+
+	  public boolean isException() {
+	    if (failedList.size() > 0) {
+	      return true;
+	    } else {
+	      return false;
+	    }
+	  }
+
+	  public String getStatusMessage() {
+	    if (failedList.size() > 0)
+	      return "failed";
+	    return "success";
+	  }
+
+	  public List getExceptions() {
+	    return exceptionList;
+	  }
+
+	  public List getFailedComponentNames() {
+
+	    return failedList;
+	  }
+
+	  public void addEventStatus(String aEventName, String aResultS, Throwable aE) {
+	    EventLog eL = new EventLog(aResultS, aE);
+	    eventMap.put(aEventName, eL);
+	    if (!aResultS.equalsIgnoreCase("success")) {
+	      failedList.add(aEventName);
+	      exceptionList.add(aE);
+
+	    }
+	    resultHM.put(aEventName, aE);
+	  }
+
+	  public ProcessTrace getProcessTrace() {
+	    return prT;
+	  }
+
+	  public void printEventLog() {
+	    Iterator iter = eventMap.entrySet().iterator();
+	    while (iter.hasNext()) {
+	      Object obj = iter.next();
+	      String key = (String) ((Map.Entry) obj).getKey();
+	      EventLog eL = (EventLog) ((Map.Entry) obj).getValue();
+	      System.out.println(" EVENT " + key + "  Result " + eL.status);
+	      if (eL.exception != null) {
+	        eL.exception.printStackTrace();
+	      }
+
+	    }
+	    for (int j = 0; j < failedList.size(); j++) {
+
+	      System.out.println(" failed component name " + failedList.get(j));
+	    }
+	  }
+
+	  static class EventLog {
+	    String status;
+
+	    // Exception exception;
+	    Throwable exception;
+
+	    // public EventLog( String stats , Exception e ) {
+	    public EventLog(String stats, Throwable e) {
+	      status = stats;
+	      exception = e;
+	    }
+
+	  }
+
+	  /**
+	   * Gets whether an entity has beed skipped during processing
+	   * 
+	   * @return true if an entity was skipped, false otherwise
+	   */
+	  public boolean isEntitySkipped() {
+	    return isSkipped;
+	  }
+	}

Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/client/UimaEEProcessStatusImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/client/UimaEEStatusCallbackListener.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/client/UimaEEStatusCallbackListener.java?rev=610054&r1=610053&r2=610054&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/client/UimaEEStatusCallbackListener.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/client/UimaEEStatusCallbackListener.java Tue Jan  8 08:26:05 2008
@@ -1,42 +1,42 @@
-package org.apache.uima.aae.client;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.collection.EntityProcessStatus;
-
-/**
- * 
- * Interface for a Listener that receives notification from the {@link UimaAsynchronousEngine} as 
- * various events occur. 
- * 
- */
-public interface UimaEEStatusCallbackListener
-{
-	 /**
-	   * The callback used to inform the application that the initialization request has completed. 
-	   * On success aStatus will be null; on failure use the EntityProcessStatus class to get the details.
-	   * 
-	   * @param aStatus
-	   *          the status of the processing. This object contains a record of any Exception that
-	   *          occurred, as well as timing information.
-	   */
-	public void initializationComplete(EntityProcessStatus aStatus);
-	 /**
-	   * Called when the processing of each entity has completed.
-	   * 
-	   * @param aCas
-	   *          the CAS containing the processed entity and the analysis results
-	   * @param aStatus
-	   *          the status of the processing. This object contains a record of any Exception that
-	   *          occurred, as well as timing information.
-	   */
-	public void entityProcessComplete(CAS aCas, EntityProcessStatus aStatus);
-	  /**
-	   * The callback used to inform the application that the CPC request has completed. 
-	   * On success aStatus will be null; on failure use the EntityProcessStatus class to get the details.
-	   * 
-	   * @param aStatus
-	   *          the status of the processing. This object contains a record of any Exception that
-	   *          occurred, as well as timing information.
-	   */
-	public void collectionProcessComplete(EntityProcessStatus aStatus);
-}
+package org.apache.uima.aae.client;
+
+import org.apache.uima.cas.CAS;
+import org.apache.uima.collection.EntityProcessStatus;
+
+/**
+ * 
+ * Interface for a Listener that receives notification from the {@link UimaAsynchronousEngine} as 
+ * various events occur. 
+ * 
+ */
+public interface UimaEEStatusCallbackListener
+{
+	 /**
+	   * The callback used to inform the application that the initialization request has completed. 
+	   * On success aStatus will be null; on failure use the EntityProcessStatus class to get the details.
+	   * 
+	   * @param aStatus
+	   *          the status of the processing. This object contains a record of any Exception that
+	   *          occurred, as well as timing information.
+	   */
+	public void initializationComplete(EntityProcessStatus aStatus);
+	 /**
+	   * Called when the processing of each entity has completed.
+	   * 
+	   * @param aCas
+	   *          the CAS containing the processed entity and the analysis results
+	   * @param aStatus
+	   *          the status of the processing. This object contains a record of any Exception that
+	   *          occurred, as well as timing information.
+	   */
+	public void entityProcessComplete(CAS aCas, EntityProcessStatus aStatus);
+	  /**
+	   * The callback used to inform the application that the CPC request has completed. 
+	   * On success aStatus will be null; on failure use the EntityProcessStatus class to get the details.
+	   * 
+	   * @param aStatus
+	   *          the status of the processing. This object contains a record of any Exception that
+	   *          occurred, as well as timing information.
+	   */
+	public void collectionProcessComplete(EntityProcessStatus aStatus);
+}

Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/client/UimaEEStatusCallbackListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController.java?rev=610054&r1=610053&r2=610054&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController.java Tue Jan  8 08:26:05 2008
@@ -1,96 +1,96 @@
-package org.apache.uima.aae.controller;
-
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.uima.UimaContext;
-import org.apache.uima.aae.error.AsynchAEException;
-import org.apache.uima.aae.jmx.AggregateServiceInfo;
-import org.apache.uima.aae.jmx.PrimitiveServiceInfo;
-import org.apache.uima.aae.jmx.ServiceErrors;
-import org.apache.uima.aae.jmx.ServiceInfo;
-import org.apache.uima.aae.jmx.ServicePerformance;
-
-public interface AggregateAnalysisEngineController extends AnalysisEngineController
-{
-	public void mergeTypeSystem(String aTypeSystem, String fromDestination) throws AsynchAEException;
-
-	public void sendRequestForMetadataToRemoteDelegates() throws AsynchAEException;
-	
-	public void addMessageOrigin( String aCasReferenceId, Endpoint anEndpoint );
-
-	public Endpoint getMessageOrigin( String aCasReferenceId );
-	
-	public void removeMessageOrigin( String aCasReferenceId );
-	
-	public void processCollectionCompleteReplyFromDelegate( String aDelegateKey, boolean sendReply ) throws AsynchAEException;
-	
-	public boolean isDelegateKeyValid(String anEndpointName);
-	
-	public void mapEndpointsToKeys(ConcurrentHashMap aDestinationMap);
-	
-	public Endpoint lookUpEndpoint(String anAnalysisEngineKey, boolean clone) throws AsynchAEException;
-
-	public void dispatchMetadataRequest(Endpoint anEndpoint) throws AsynchAEException;
-
-	public void retryLastCommand( int aCommand, Endpoint anEndpoint, String aCasReferenceId );
-
-	public void retryMetadataRequest( Endpoint anEndpoint) throws AsynchAEException;
-	
-	public String lookUpDelegateKey( String aDelegateEndpointName );
-	
-	public UimaContext getChildUimaContext( String aDelegateEndpointName ) throws Exception;
-	
-//	public void retryCAS( String aCasReferenceId, Endpoint anEndpoint )throws AsynchAEException;
-
-	public void retryProcessCASRequest( String aCasReferenceId, Endpoint anEndpoint, boolean addEndpointToCache ) throws AsynchAEException;
-	
-	public void enableDelegates( List aDelegateList ) throws AsynchAEException;
-	
-	public void disableDelegates( List aDelegateList ) throws AsynchAEException;
-
-	public boolean continueOnError(String aCasReferenceId, String aDelegateKey, Exception anException )throws AsynchAEException;
-
-	public void dropFlow( String aCasReferenceId, boolean dropFlow );
-	
-	public boolean isDelegateDisabled( String aDelegateKey );
-
-	
-	public String getLastDelegateKeyFromFlow(String anInputCasReferenceId);
-
-	public boolean sendRequestToReleaseCas();
-	
-	public void registerChildController( AnalysisEngineController aChildController, String aDelegateKey) throws Exception;
-
-	public void saveStatsFromService( String aServiceEndpointName, Map aServiceStats);
-
-	public Map getDelegateStats();
-	
-	public AggregateServiceInfo getServiceInfo();
-
-	public ServicePerformance getDelegateServicePerformance( String aDelegateKey );
-
-    public PrimitiveServiceInfo getDelegateServiceInfo( String aDelegateKey );
-
-    public ServiceErrors getDelegateServiceErrors( String aDelegateKey );
-
-    public void incrementCasProcessedByDelegate(String aDelegateKey);
-    
-    public void incrementCasSerializationTime( String aDelegateKey,long aSerializationTime );
-    
-    public void incrementCasDeserializationTime( String aDelegateKey, long aDeserializationTime );
-    
-    public void incrementDelegateIdleTime(String aDelegateKey, long anIdleTime);
-
-	public void stopTimers();
-
-	
-	public boolean requestForMetaSentToRemotes();
-	
-	public void setRequestForMetaSentToRemotes();
-	
-	public Map getDestinations();
-
-	static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
-}
+package org.apache.uima.aae.controller;
+
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.uima.UimaContext;
+import org.apache.uima.aae.error.AsynchAEException;
+import org.apache.uima.aae.jmx.AggregateServiceInfo;
+import org.apache.uima.aae.jmx.PrimitiveServiceInfo;
+import org.apache.uima.aae.jmx.ServiceErrors;
+import org.apache.uima.aae.jmx.ServiceInfo;
+import org.apache.uima.aae.jmx.ServicePerformance;
+
+public interface AggregateAnalysisEngineController extends AnalysisEngineController
+{
+	public void mergeTypeSystem(String aTypeSystem, String fromDestination) throws AsynchAEException;
+
+	public void sendRequestForMetadataToRemoteDelegates() throws AsynchAEException;
+	
+	public void addMessageOrigin( String aCasReferenceId, Endpoint anEndpoint );
+
+	public Endpoint getMessageOrigin( String aCasReferenceId );
+	
+	public void removeMessageOrigin( String aCasReferenceId );
+	
+	public void processCollectionCompleteReplyFromDelegate( String aDelegateKey, boolean sendReply ) throws AsynchAEException;
+	
+	public boolean isDelegateKeyValid(String anEndpointName);
+	
+	public void mapEndpointsToKeys(ConcurrentHashMap aDestinationMap);
+	
+	public Endpoint lookUpEndpoint(String anAnalysisEngineKey, boolean clone) throws AsynchAEException;
+
+	public void dispatchMetadataRequest(Endpoint anEndpoint) throws AsynchAEException;
+
+	public void retryLastCommand( int aCommand, Endpoint anEndpoint, String aCasReferenceId );
+
+	public void retryMetadataRequest( Endpoint anEndpoint) throws AsynchAEException;
+	
+	public String lookUpDelegateKey( String aDelegateEndpointName );
+	
+	public UimaContext getChildUimaContext( String aDelegateEndpointName ) throws Exception;
+	
+//	public void retryCAS( String aCasReferenceId, Endpoint anEndpoint )throws AsynchAEException;
+
+	public void retryProcessCASRequest( String aCasReferenceId, Endpoint anEndpoint, boolean addEndpointToCache ) throws AsynchAEException;
+	
+	public void enableDelegates( List aDelegateList ) throws AsynchAEException;
+	
+	public void disableDelegates( List aDelegateList ) throws AsynchAEException;
+
+	public boolean continueOnError(String aCasReferenceId, String aDelegateKey, Exception anException )throws AsynchAEException;
+
+	public void dropFlow( String aCasReferenceId, boolean dropFlow );
+	
+	public boolean isDelegateDisabled( String aDelegateKey );
+
+	
+	public String getLastDelegateKeyFromFlow(String anInputCasReferenceId);
+
+	public boolean sendRequestToReleaseCas();
+	
+	public void registerChildController( AnalysisEngineController aChildController, String aDelegateKey) throws Exception;
+
+	public void saveStatsFromService( String aServiceEndpointName, Map aServiceStats);
+
+	public Map getDelegateStats();
+	
+	public AggregateServiceInfo getServiceInfo();
+
+	public ServicePerformance getDelegateServicePerformance( String aDelegateKey );
+
+    public PrimitiveServiceInfo getDelegateServiceInfo( String aDelegateKey );
+
+    public ServiceErrors getDelegateServiceErrors( String aDelegateKey );
+
+    public void incrementCasProcessedByDelegate(String aDelegateKey);
+    
+    public void incrementCasSerializationTime( String aDelegateKey,long aSerializationTime );
+    
+    public void incrementCasDeserializationTime( String aDelegateKey, long aDeserializationTime );
+    
+    public void incrementDelegateIdleTime(String aDelegateKey, long anIdleTime);
+
+	public void stopTimers();
+
+	
+	public boolean requestForMetaSentToRemotes();
+	
+	public void setRequestForMetaSentToRemotes();
+	
+	public Map getDestinations();
+
+	static final String copyright = com.ibm.uima.copyright.Copyright.COPYRIGHT;
+}

Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ee-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController.java
------------------------------------------------------------------------------
    svn:eol-style = native