private DataBaseConnector getDataBaseConnector(String costosysConfig) throws AnalysisEngineProcessException { DataBaseConnector dbc; try { dbc = new DataBaseConnector(costosysConfig); } catch (FileNotFoundException e) { throw new AnalysisEngineProcessException(e); } return dbc; }
@Override public void initialize(UimaContext context) throws ResourceInitializationException { super.initialize(context); driver = (String) getConfigParameterValue(PARAM_DB_DRIVER); batchSize = Optional.ofNullable((Integer) getConfigParameterValue(PARAM_BATCH_SIZE)).orElse(Integer.parseInt(DEFAULT_BATCH_SIZE)); tableName = (String) getConfigParameterValue(PARAM_TABLE); selectionOrder = (String) getConfigParameterValue(PARAM_SELECTION_ORDER); whereCondition = (String) getConfigParameterValue(PARAM_WHERE_CONDITION); limitParameter = (Integer) getConfigParameterValue(PARAM_LIMIT); costosysConfig = (String) getConfigParameterValue(PARAM_COSTOSYS_CONFIG_NAME); checkParameters(); try { // It might happen that a subclass has already initialized the DBC if (dbc == null) dbc = new DataBaseConnector(costosysConfig); dbc.setQueryBatchSize(batchSize); checkTableExists(); logConfigurationState(); } catch (FileNotFoundException e) { throw new ResourceInitializationException(e); } }
dbc = new DataBaseConnector(dbcConfigPath); } catch (FileNotFoundException e1) { throw new ResourceInitializationException(e1);
dbc = new DataBaseConnector(costosysConfig); } catch (FileNotFoundException e) { throw new ResourceInitializationException(e);
costosysConfig = (String) getConfigParameterValue(PARAM_COSTOSYS_CONFIG_NAME); try { dbc = new DataBaseConnector(costosysConfig); } catch (FileNotFoundException e) { throw new ResourceInitializationException(e);
costosysConfig = (String) getConfigParameterValue(PARAM_COSTOSYS_CONFIG_NAME); try { dbc = new DataBaseConnector(costosysConfig); } catch (FileNotFoundException e) { throw new ResourceInitializationException(e);