@Override public boolean initialize(ResourceSpecifier aSpecifier, Map<String, Object> tuples) throws ResourceInitializationException { String pp = (String) tuples.get("persistence-provider"); if (pp == null) { throw new ResourceInitializationException(new IllegalArgumentException( "Must provide a parameter of type <persistence-provider>")); } this.persistence = BaseExperimentBuilder.loadProvider(pp, RetrievalEvalPersistenceProvider.class); return true; }
@Override public boolean initialize(ResourceSpecifier aSpecifier, Map<String, Object> tuples) throws ResourceInitializationException { String pp = (String) tuples.get("persistence-provider"); if (pp == null) { throw new ResourceInitializationException(new IllegalArgumentException( "Must provide a parameter of type <persistence-provider>")); } this.persistence = BaseExperimentBuilder.loadProvider(pp, RetrievalEvalPersistenceProvider.class); return true; }
@Override public void initialize(UimaContext c) throws ResourceInitializationException { super.initialize(c); String pp = (String) c.getConfigParameterValue("persistence-provider"); if (pp == null) { throw new ResourceInitializationException(new IllegalArgumentException( "Must provide a parameter of type <persistence-provider>")); } this.persistence = BaseExperimentBuilder.loadProvider(pp, LogPersistenceProvider.class); }
private FunnelingStrategy getProcessingStrategy() throws ResourceInitializationException { FunnelingStrategy ps = new DefaultFunnelingStrategy(); AnyObject map = config.getAnyObject("processing-strategy"); if (map != null) { ps = BaseExperimentBuilder.loadProvider(map, FunnelingStrategy.class); } return ps; }
private FunnelingStrategy getProcessingStrategy() throws ResourceInitializationException { FunnelingStrategy ps = new DefaultFunnelingStrategy(); AnyObject map = config.getAnyObject("processing-strategy"); if (map != null) { ps = BaseExperimentBuilder.loadProvider(map, FunnelingStrategy.class); } return ps; }
@Override public void initialize() throws ResourceInitializationException { super.initialize(); String url = (String) getConfigParameterValue("broker-url"); // String user = (String) getConfigParameterValue("amq-username"); // String password = (String) getConfigParameterValue("amq-password"); String pp = (String) getConfigParameterValue("persistence-provider"); if (pp == null) { throw new ResourceInitializationException(new IllegalArgumentException( String.format("%s must be provided with a parameter of type <persistence-provider>", getClass().getSimpleName()))); } this.persistence = BaseExperimentBuilder.loadProvider(pp, ExperimentPersistenceProvider.class); try { this.producer = new ActiveMQQueueProducer(url, getUUID() + COLLECTION_READER_QUEUE_SUFFIX); } catch (JMSException e) { throw new ResourceInitializationException(e); } }
@Override public void initialize() throws ResourceInitializationException { this.dataset = (String) getConfigParameterValue("dataset"); this.experimentUuid = (String) getConfigParameterValue(BaseExperimentBuilder.EXPERIMENT_UUID_PROPERTY); this.stageId = (Integer) getConfigParameterValue(BaseExperimentBuilder.STAGE_ID_PROPERTY); String decoratorsNames = (String) getConfigParameterValue("decorators"); if (decoratorsNames != null) { this.decorators = BaseExperimentBuilder.createAnnotators(decoratorsNames); } String pp = (String) getConfigParameterValue("persistence-provider"); if (pp == null) { throw new ResourceInitializationException(new IllegalArgumentException( String.format("%s must be provided with a parameter of type <persistence-provider>", getClass().getSimpleName()))); } this.persistence = BaseExperimentBuilder.loadProvider(pp, ExperimentPersistenceProvider.class); }
"Must provide a parameter of type <persistence-provider>")); this.persistence = BaseExperimentBuilder.loadProvider(pp, PhasePersistenceProvider.class); this.phaseName = (String) ctx.getConfigParameterValue("name"); this.phaseNo = (Integer) ctx.getConfigParameterValue(QA_INTERNAL_PHASEID);