Author: cwiklik
Date: Tue Sep 27 13:19:51 2011
New Revision: 1176377

URL: http://svn.apache.org/viewvc?rev=1176377&view=rev
Log:
UIMA-2163 removed dead code

Modified:
    
uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/resourceSpecifier/factory/DeploymentDescriptorFactory.java

Modified: 
uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/resourceSpecifier/factory/DeploymentDescriptorFactory.java
URL: 
http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/resourceSpecifier/factory/DeploymentDescriptorFactory.java?rev=1176377&r1=1176376&r2=1176377&view=diff
==============================================================================
--- 
uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/resourceSpecifier/factory/DeploymentDescriptorFactory.java
 (original)
+++ 
uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/resourceSpecifier/factory/DeploymentDescriptorFactory.java
 Tue Sep 27 13:19:51 2011
@@ -125,133 +125,6 @@ public final class DeploymentDescriptorF
   throws ResourceInitializationException {
     return new 
UimaASPrimitiveDeploymentDescriptorImpl(AnalysisEngineDeploymentDescriptionDocument.Factory.newInstance(),context);
   }
-/*
-  public static UimaASAggregateDeploymentDescriptor 
createAggregateDeploymentDescriptor(ServiceContext context, 
DelegateConfiguration ... delegateConfigurations) 
-  throws ResourceInitializationException {
-//    props.remove(UimaASDeploymentDescriptor.AGGREGATE);
-//    props.put(UimaASDeploymentDescriptor.AGGREGATE,"true");
-    File descriptor = new File(context.getDescriptor());
-    if ( !descriptor.exists() ) {
-      throw new ResourceInitializationException(new 
FileNotFoundException("Provided Aggregate Analysis Engine Decriptor Not 
Found:"+context.getDescriptor()));
-    }
-    try {
-      ResourceSpecifier resourceSpecifier = 
-        UimaClassFactory.produceResourceSpecifier(context.getDescriptor());
-      if ( resourceSpecifier instanceof AnalysisEngineDescription ) {
-        if ( ((AnalysisEngineDescription)resourceSpecifier).isPrimitive() ) {
-          throw new ResourceInitializationException(new Exception("Invalid 
Resource Specifier. Expected Aggregate Analysis Engine Descriptor but received 
Primitive Analysis Engine Descriptor"));
-        } else { // aggregate 
-          
-          Map<String,ResourceSpecifier> delegates = 
-            
((AnalysisEngineDescription)resourceSpecifier).getDelegateAnalysisEngineSpecifiers();
-          Set<String> keys = delegates.keySet();
-          Set<String> validKeys = new LinkedHashSet<String>();
-          
-          StringBuffer sb = new StringBuffer();
-          for( String key : keys) {
-            sb.append(key).append(",");
-          }
-          System.out.println("Delegate Keys:"+sb.toString());
-//          for( DelegateConfiguration cfg : delegateConfigurations ) {
-//            if ( !keys.contains(cfg.getKey())) {
-//              throw new ResourceInitializationException(new 
Exception("Invalid Delegate Key:"+cfg.getKey()+". Make sure the delegate key is 
defined in provided Aggregate Analysis Engine Descriptor:"+aeDescriptor));
-//            }
-//            if ( validKeys.add(cfg.getKey()) == false ) {  // check for 
duplicate key
-//              throw new ResourceInitializationException(new 
Exception("Duplicate Delegate Key:"+cfg.getKey()+". Make sure the delegate key 
is unique"));
-//            }
-//          }
-        }
-      } else {
-        throw new ResourceInitializationException(new Exception("Invalid 
Resource Specifier. Expected AnalysisEngineDescription but received 
"+resourceSpecifier.getClass().getName()));
-      }
-    } catch( Exception ex) {
-      throw new ResourceInitializationException(ex);
-    }
-    UimaASAggregateDeploymentDescriptor dd = 
-      createAggregateDeploymentDescriptor(context, delegateConfigurations);
-    //Deployment d = dd.getDeployment();
-
-    //Service service = d.getService();
-    //service.getTopDescriptor().getImport().setLocation(aeDescriptor);
-    
-    
-//    TopLevelAnalysisEngine tae = service.getTopLevelAnalysisEngine();
-//    Delegates delegates = tae.getDelegates();
-//    delegates.
-    //    TopLevelAnalysisEngine taes = service.getTopLevelAnalysisEngine();
-//    taes.getInputQueueScaleout().setNumberOfInstances(1);
-//    taes.getReplyQueueScaleout().setNumberOfInstances(1);
-//    
taes.getPrimitiveErrorConfiguration().getProcessCasErrors().setThresholdCount(0);
-//    
taes.getPrimitiveErrorConfiguration().getProcessCasErrors().setThresholdWindow(0);
-//    
taes.getPrimitiveErrorConfiguration().getProcessCasErrors().setThresholdAction(Action.Terminate);
-    
-    
-    return dd;
-  }
-
-  
-  public static UimaASDeploymentDescriptor createAggregate(ServiceContext 
context, DelegateConfiguration ... delegateConfigurations) 
-  throws ResourceInitializationException {
-//    props.remove(UimaASDeploymentDescriptor.AGGREGATE);
-//    props.put(UimaASDeploymentDescriptor.AGGREGATE,"true");
-    File descriptor = new File(context.getDescriptor());
-    if ( !descriptor.exists() ) {
-      throw new ResourceInitializationException(new 
FileNotFoundException("Provided Aggregate Analysis Engine Decriptor Not 
Found:"+context.getDescriptor()));
-    }
-    try {
-      ResourceSpecifier resourceSpecifier = 
-        UimaClassFactory.produceResourceSpecifier(context.getDescriptor());
-      if ( resourceSpecifier instanceof AnalysisEngineDescription ) {
-        if ( ((AnalysisEngineDescription)resourceSpecifier).isPrimitive() ) {
-          throw new ResourceInitializationException(new Exception("Invalid 
Resource Specifier. Expected Aggregate Analysis Engine Descriptor but received 
Primitive Analysis Engine Descriptor"));
-        } else { // aggregate 
-          
-          Map<String,ResourceSpecifier> delegates = 
-            
((AnalysisEngineDescription)resourceSpecifier).getDelegateAnalysisEngineSpecifiers();
-          Set<String> keys = delegates.keySet();
-          Set<String> validKeys = new LinkedHashSet<String>();
-          
-          StringBuffer sb = new StringBuffer();
-          for( String key : keys) {
-            sb.append(key).append(",");
-          }
-          System.out.println("Delegate Keys:"+sb.toString());
-//          for( DelegateConfiguration cfg : delegateConfigurations ) {
-//            if ( !keys.contains(cfg.getKey())) {
-//              throw new ResourceInitializationException(new 
Exception("Invalid Delegate Key:"+cfg.getKey()+". Make sure the delegate key is 
defined in provided Aggregate Analysis Engine Descriptor:"+aeDescriptor));
-//            }
-//            if ( validKeys.add(cfg.getKey()) == false ) {  // check for 
duplicate key
-//              throw new ResourceInitializationException(new 
Exception("Duplicate Delegate Key:"+cfg.getKey()+". Make sure the delegate key 
is unique"));
-//            }
-//          }
-        }
-      } else {
-        throw new ResourceInitializationException(new Exception("Invalid 
Resource Specifier. Expected AnalysisEngineDescription but received 
"+resourceSpecifier.getClass().getName()));
-      }
-    } catch( Exception ex) {
-      throw new ResourceInitializationException(ex);
-    }
-    UimaASDeploymentDescriptor dd = createDeploymentDescriptor(context, 
delegateConfigurations);
-    //Deployment d = dd.getDeployment();
-
-    //Service service = d.getService();
-    //service.getTopDescriptor().getImport().setLocation(aeDescriptor);
-    
-    
-//    TopLevelAnalysisEngine tae = service.getTopLevelAnalysisEngine();
-//    Delegates delegates = tae.getDelegates();
-//    delegates.
-    //    TopLevelAnalysisEngine taes = service.getTopLevelAnalysisEngine();
-//    taes.getInputQueueScaleout().setNumberOfInstances(1);
-//    taes.getReplyQueueScaleout().setNumberOfInstances(1);
-//    
taes.getPrimitiveErrorConfiguration().getProcessCasErrors().setThresholdCount(0);
-//    
taes.getPrimitiveErrorConfiguration().getProcessCasErrors().setThresholdWindow(0);
-//    
taes.getPrimitiveErrorConfiguration().getProcessCasErrors().setThresholdAction(Action.Terminate);
-    
-    
-    return dd;
-  }
-*/
   /**
  * Creates a new DeploymentDescriptor object.
  *
@@ -276,10 +149,6 @@ public static DelegateConfiguration crea
   }
   
   
-//  public static RemoteDelegateConfiguration 
createRemoteDelegateConfiguration() {
-//    return new RemoteDelegateConfigurationImpl();
-//  }
-  
   /**
  * Creates a new DeploymentDescriptor object.
  *


Reply via email to