test_class.declarator: activity
test_class.modifier: private
test_class.original_string: private SpreadsheetImportActivity activity;
test_class.type: SpreadsheetImportActivity
test_class.var_name: activity
test_class.declarator: activityFactory
test_class.modifier: private
test_class.original_string: private SpreadsheetImportActivityFactory activityFactory;
test_class.type: SpreadsheetImportActivityFactory
test_class.var_name: activityFactory
test_class.declarator: edits
test_class.modifier: private
test_class.original_string: private Edits edits;
test_class.type: Edits
test_class.var_name: edits
test_class.declarator: configuration
test_class.modifier: private
test_class.original_string: private ObjectNode configuration;
test_class.type: ObjectNode
test_class.var_name: configuration
test_class.file: taverna-spreadsheet-import-activity/src/test/java/org/apache/taverna/activities/spreadsheet/SpreadsheetImportActivityTest.java
test_class.identifier: SpreadsheetImportActivityTest
test_case.body: @Test
  	public void testExecuteAsynchMapOfStringT2ReferenceAsynchronousActivityCallback() throws Exception {
  		configuration.put("columnRange", configuration.objectNode().put("start", 0).put("end", 3));
  		activity.configure(configuration);
  		for (ActivityInputPort activityInputPort : activityFactory.getInputPorts(configuration)) {
  			edits.getAddActivityInputPortEdit(activity, activityInputPort).doEdit();
  		}
  		for (ActivityOutputPort activityOutputPort : activityFactory.getOutputPorts(configuration)) {
  			edits.getAddActivityOutputPortEdit(activity, activityOutputPort).doEdit();
  		}
  		Map<String, Class<?>> outputs = new HashMap<String, Class<?>>();
  		outputs.put("A", String.class);
  		outputs.put("B", String.class);
  		outputs.put("C", String.class);
  		outputs.put("D", String.class);
  		Map<String, Object> results = ActivityInvoker.invokeAsyncActivity(activity, Collections.singletonMap("fileurl",
  				(Object) "src/test/resources/test-spreadsheet.xls"), outputs);
  		assertEquals(4, results.size());
  		assertTrue(results.get("A") instanceof List<?>);
  		assertEquals(15, ((List<?>) results.get("A")).size());
  		results = ActivityInvoker.invokeAsyncActivity(activity, Collections.singletonMap("fileurl",
  				(Object) "src/test/resources/test-spreadsheet.ods"), outputs);
  		assertEquals(4, results.size());
  		assertTrue(results.get("A") instanceof List<?>);
  		assertEquals(15, ((List<?>) results.get("A")).size());
  		results = ActivityInvoker.invokeAsyncActivity(activity, Collections.singletonMap("fileurl",
  				(Object) "src/test/resources/test-spreadsheet.csv"), outputs);
  		assertEquals(4, results.size());
  		assertTrue(results.get("A") instanceof List<?>);
  		assertEquals(15, ((List<?>) results.get("A")).size());
  
  		// CSV output
  		configuration.put("outputFormat", SpreadsheetOutputFormat.SINGLE_PORT.name());
  		activity.configure(configuration);
  		outputs = new HashMap<String, Class<?>>();
  		outputs.put("output", String.class);
  		results = ActivityInvoker.invokeAsyncActivity(activity, Collections.singletonMap("fileurl",
  				(Object) "src/test/resources/test-spreadsheet.xls"), outputs);
  		assertEquals(1, results.size());
  		assertTrue(results.get("output") instanceof String);
  		assertEquals(15, ((String) results.get("output")).split(System.getProperty("line.separator")).length);
  
  		// TSV output
  		configuration.put("csvDelimiter", "\t");
  		activity.configure(configuration);
  		results = ActivityInvoker.invokeAsyncActivity(activity, Collections.singletonMap("fileurl",
  				(Object) "src/test/resources/test-spreadsheet.csv"), outputs);
  		assertEquals(1, results.size());
  		assertTrue(results.get("output") instanceof String);
  		assertEquals(15, ((String) results.get("output")).split(System.getProperty("line.separator")).length);
  	}
test_case.class_method_signature: SpreadsheetImportActivityTest.testExecuteAsynchMapOfStringT2ReferenceAsynchronousActivityCallback()
test_case.full_signature: @Test public void testExecuteAsynchMapOfStringT2ReferenceAsynchronousActivityCallback()
test_case.identifier: testExecuteAsynchMapOfStringT2ReferenceAsynchronousActivityCallback
test_case.invocations: put put put objectNode configure getInputPorts doEdit getAddActivityInputPortEdit getOutputPorts doEdit getAddActivityOutputPortEdit put put put put invokeAsyncActivity singletonMap assertEquals size assertTrue get assertEquals size get invokeAsyncActivity singletonMap assertEquals size assertTrue get assertEquals size get invokeAsyncActivity singletonMap assertEquals size assertTrue get assertEquals size get put name configure put invokeAsyncActivity singletonMap assertEquals size assertTrue get assertEquals split get getProperty put configure invokeAsyncActivity singletonMap assertEquals size assertTrue get assertEquals split get getProperty
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testExecuteAsynchMapOfStringT2ReferenceAsynchronousActivityCallback()
focal_class.declarator: URI = "http://ns.taverna.org.uk/2010/activity/spreadsheet-import"
focal_class.modifier: public static final
focal_class.original_string: public static final String URI = "http://ns.taverna.org.uk/2010/activity/spreadsheet-import";
focal_class.type: String
focal_class.var_name: URI
focal_class.declarator: INPUT_PORT_NAME = "fileurl"
focal_class.modifier: public static final
focal_class.original_string: public static final String INPUT_PORT_NAME = "fileurl";
focal_class.type: String
focal_class.var_name: INPUT_PORT_NAME
focal_class.declarator: OUTPUT_PORT_NAME = "output"
focal_class.modifier: public static final
focal_class.original_string: public static final String OUTPUT_PORT_NAME = "output";
focal_class.type: String
focal_class.var_name: OUTPUT_PORT_NAME
focal_class.declarator: logger = Logger.getLogger(SpreadsheetImportActivity.class)
focal_class.modifier: private static
focal_class.original_string: private static Logger logger = Logger.getLogger(SpreadsheetImportActivity.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: configurationBean
focal_class.modifier: private
focal_class.original_string: private JsonNode configurationBean;
focal_class.type: JsonNode
focal_class.var_name: configurationBean
focal_class.declarator: rowRange
focal_class.modifier: private
focal_class.original_string: private Range rowRange, columnRange;
focal_class.type: Range
focal_class.var_name: rowRange
focal_class.declarator: ignoreBlankRows
focal_class.modifier: private
focal_class.original_string: private boolean ignoreBlankRows;
focal_class.type: boolean
focal_class.var_name: ignoreBlankRows
focal_class.declarator: missingCellValue
focal_class.modifier: private
focal_class.original_string: private String missingCellValue;
focal_class.type: String
focal_class.var_name: missingCellValue
focal_class.declarator: emptyCellPolicy
focal_class.modifier: private
focal_class.original_string: private SpreadsheetEmptyCellPolicy emptyCellPolicy;
focal_class.type: SpreadsheetEmptyCellPolicy
focal_class.var_name: emptyCellPolicy
focal_class.declarator: outputFormat
focal_class.modifier: private
focal_class.original_string: private SpreadsheetOutputFormat outputFormat;
focal_class.type: SpreadsheetOutputFormat
focal_class.var_name: outputFormat
focal_class.declarator: csvDelimiter
focal_class.modifier: private
focal_class.original_string: private String csvDelimiter;
focal_class.type: String
focal_class.var_name: csvDelimiter
focal_class.file: taverna-spreadsheet-import-activity/src/main/java/org/apache/taverna/activities/spreadsheet/SpreadsheetImportActivity.java
focal_class.identifier: SpreadsheetImportActivity
focal_class.class_method_signature: SpreadsheetImportActivity.SpreadsheetImportActivity()
focal_class.full_signature: public  SpreadsheetImportActivity()
focal_class.identifier: SpreadsheetImportActivity
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  SpreadsheetImportActivity()
focal_class.class_method_signature: SpreadsheetImportActivity.configure(JsonNode configurationBean)
focal_class.full_signature: @Override public void configure(JsonNode configurationBean)
focal_class.identifier: configure
focal_class.modifiers: @Override public
focal_class.parameters: (JsonNode configurationBean)
focal_class.return: void
focal_class.signature: void configure(JsonNode configurationBean)
focal_class.class_method_signature: SpreadsheetImportActivity.configurePorts()
focal_class.full_signature: private void configurePorts()
focal_class.identifier: configurePorts
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void configurePorts()
focal_class.class_method_signature: SpreadsheetImportActivity.getConfiguration()
focal_class.full_signature: @Override public JsonNode getConfiguration()
focal_class.identifier: getConfiguration
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: JsonNode
focal_class.signature: JsonNode getConfiguration()
focal_class.class_method_signature: SpreadsheetImportActivity.executeAsynch(final Map<String, T2Reference> data,
  			final AsynchronousActivityCallback callback)
focal_class.full_signature: @Override public void executeAsynch(final Map<String, T2Reference> data,
  			final AsynchronousActivityCallback callback)
focal_class.identifier: executeAsynch
focal_class.modifiers: @Override public
focal_class.parameters: (final Map<String, T2Reference> data,
  			final AsynchronousActivityCallback callback)
focal_class.return: void
focal_class.signature: void executeAsynch(final Map<String, T2Reference> data,
  			final AsynchronousActivityCallback callback)
focal_class.class_method_signature: SpreadsheetImportActivity.getInputStream(InvocationContext context,
  			ReferenceService referenceService, T2Reference inputRef)
focal_class.full_signature: private InputStream getInputStream(InvocationContext context,
  			ReferenceService referenceService, T2Reference inputRef)
focal_class.identifier: getInputStream
focal_class.modifiers: private
focal_class.parameters: (InvocationContext context,
  			ReferenceService referenceService, T2Reference inputRef)
focal_class.return: InputStream
focal_class.signature: InputStream getInputStream(InvocationContext context,
  			ReferenceService referenceService, T2Reference inputRef)
focal_class.superclass: extends AbstractAsynchronousActivity<JsonNode>
focal_method.body: @Override
  	public void configure(JsonNode configurationBean)
  			throws ActivityConfigurationException {
  		this.configurationBean = configurationBean;
  		rowRange = SpreadsheetUtils.getRange(configurationBean.get("rowRange"));
  		logger.debug("Setting row range to " + rowRange);
  		columnRange = SpreadsheetUtils.getRange(configurationBean.get("columnRange"));
  		logger.debug("Setting column range to " + columnRange);
  		ignoreBlankRows = configurationBean.get("ignoreBlankRows").booleanValue();
  		missingCellValue = configurationBean.get("emptyCellValue").textValue();
  		logger.debug("Setting empty cell value to '" + missingCellValue + "'");
  		emptyCellPolicy = SpreadsheetEmptyCellPolicy.valueOf(configurationBean.get("emptyCellPolicy").textValue());
  		logger.debug("Setting empty cell policy to " + emptyCellPolicy);
  		outputFormat = SpreadsheetOutputFormat.valueOf(configurationBean.get("outputFormat").textValue());
  		logger.debug("Setting output format to " + outputFormat);
  		csvDelimiter = configurationBean.get("csvDelimiter").textValue();
  		logger.debug("Setting csv delimiter to '" + csvDelimiter + "'");
  //		configurePorts();
  	}
focal_method.class_method_signature: SpreadsheetImportActivity.configure(JsonNode configurationBean)
focal_method.full_signature: @Override public void configure(JsonNode configurationBean)
focal_method.identifier: configure
focal_method.invocations: getRange get debug getRange get debug booleanValue get textValue get debug valueOf textValue get debug valueOf textValue get debug textValue get debug
focal_method.modifiers: @Override public
focal_method.parameters: (JsonNode configurationBean)
focal_method.return: void
focal_method.signature: void configure(JsonNode configurationBean)