@Test public void testBuild() throws Exception { String docId = "documentId"; String pdbId = "pdbId"; float confidenceLevel = 1f; ActionBuilderModule<DocumentToConceptIds, Result> module = factory.instantiate(config); List<AtomicAction<Result>> actions = module.build(buildDocumentToConceptIds(docId, pdbId, confidenceLevel)); assertNotNull(actions); assertEquals(1, actions.size()); AtomicAction<Result> action = actions.get(0); assertNotNull(action); assertEquals(Result.class, action.getClazz()); assertOaf(action.getPayload(), docId, pdbId, confidenceLevel); }
@Override public ActionBuilderModule<DocumentToConceptIds, Result> instantiate(Configuration config) { return new DocumentToPdbActionBuilderModule(provideTrustLevelThreshold(config), config.get(EXPORT_PDB_URL_ROOT)); }
DocumentToPdbActionBuilderModuleFactory extends AbstractActionBuilderFactory<DocumentToConceptIds, Result> { @Override public ActionBuilderModule<DocumentToConceptIds, Result> instantiate(Configuration config) { return new DocumentToPdbActionBuilderModule(provideTrustLevelThreshold(config), config.get(EXPORT_PDB_URL_ROOT)); } }
DocumentToPdbActionBuilderModuleFactory extends AbstractActionBuilderFactory<DocumentToConceptIds, Result> { @Override public ActionBuilderModule<DocumentToConceptIds, Result> instantiate(Configuration config) { return new DocumentToPdbActionBuilderModule(provideTrustLevelThreshold(config), config.get(EXPORT_PDB_URL_ROOT)); } DocumentToPdbActionBuilderModuleFactory(); }
DocumentToPdbActionBuilderModuleFactory extends AbstractActionBuilderFactory<DocumentToConceptIds, Result> { @Override public ActionBuilderModule<DocumentToConceptIds, Result> instantiate(Configuration config) { return new DocumentToPdbActionBuilderModule(provideTrustLevelThreshold(config), config.get(EXPORT_PDB_URL_ROOT)); } DocumentToPdbActionBuilderModuleFactory(); @Override ActionBuilderModule<DocumentToConceptIds, Result> instantiate(Configuration config); }
DocumentToPdbActionBuilderModuleFactory extends AbstractActionBuilderFactory<DocumentToConceptIds, Result> { @Override public ActionBuilderModule<DocumentToConceptIds, Result> instantiate(Configuration config) { return new DocumentToPdbActionBuilderModule(provideTrustLevelThreshold(config), config.get(EXPORT_PDB_URL_ROOT)); } DocumentToPdbActionBuilderModuleFactory(); @Override ActionBuilderModule<DocumentToConceptIds, Result> instantiate(Configuration config); static final String EXPORT_PDB_URL_ROOT; static final String SITENAME; static final String CLASS; static final String SCHEME; }