@Test public void testBuildBelowThreshold() throws Exception { DocumentSimilarity docSim = buildDocSim("docId", "otherDocId", 0.1f); config.set(EXPORT_DOCUMENTSSIMILARITY_THRESHOLD, String.valueOf(similarityThreshold)); ActionBuilderModule<DocumentSimilarity, Relation> module = factory.instantiate(config); List<AtomicAction<Relation>> results = module.build(docSim); assertTrue(results.isEmpty()); }
@Override public ActionBuilderModule<DocumentSimilarity, Relation> instantiate(Configuration config) { Float similarityThreshold = null; String thresholdStr = WorkflowRuntimeParameters.getParamValue(EXPORT_DOCUMENTSSIMILARITY_THRESHOLD, config); if (thresholdStr != null) { similarityThreshold = Float.valueOf(thresholdStr); log.info("setting documents similarity exporter threshold to: " + similarityThreshold); } return new DocumentSimilarityActionBuilderModule(provideTrustLevelThreshold(config), similarityThreshold); }
DocumentSimilarityActionBuilderModuleFactory extends AbstractActionBuilderFactory<DocumentSimilarity, Relation> { @Override public ActionBuilderModule<DocumentSimilarity, Relation> instantiate(Configuration config) { Float similarityThreshold = null; String thresholdStr = WorkflowRuntimeParameters.getParamValue(EXPORT_DOCUMENTSSIMILARITY_THRESHOLD, config); if (thresholdStr != null) { similarityThreshold = Float.valueOf(thresholdStr); log.info("setting documents similarity exporter threshold to: " + similarityThreshold); } return new DocumentSimilarityActionBuilderModule(provideTrustLevelThreshold(config), similarityThreshold); } }
DocumentSimilarityActionBuilderModuleFactory extends AbstractActionBuilderFactory<DocumentSimilarity, Relation> { @Override public ActionBuilderModule<DocumentSimilarity, Relation> instantiate(Configuration config) { Float similarityThreshold = null; String thresholdStr = WorkflowRuntimeParameters.getParamValue(EXPORT_DOCUMENTSSIMILARITY_THRESHOLD, config); if (thresholdStr != null) { similarityThreshold = Float.valueOf(thresholdStr); log.info("setting documents similarity exporter threshold to: " + similarityThreshold); } return new DocumentSimilarityActionBuilderModule(provideTrustLevelThreshold(config), similarityThreshold); } DocumentSimilarityActionBuilderModuleFactory(); }
DocumentSimilarityActionBuilderModuleFactory extends AbstractActionBuilderFactory<DocumentSimilarity, Relation> { @Override public ActionBuilderModule<DocumentSimilarity, Relation> instantiate(Configuration config) { Float similarityThreshold = null; String thresholdStr = WorkflowRuntimeParameters.getParamValue(EXPORT_DOCUMENTSSIMILARITY_THRESHOLD, config); if (thresholdStr != null) { similarityThreshold = Float.valueOf(thresholdStr); log.info("setting documents similarity exporter threshold to: " + similarityThreshold); } return new DocumentSimilarityActionBuilderModule(provideTrustLevelThreshold(config), similarityThreshold); } DocumentSimilarityActionBuilderModuleFactory(); @Override ActionBuilderModule<DocumentSimilarity, Relation> instantiate(Configuration config); }
DocumentSimilarityActionBuilderModuleFactory extends AbstractActionBuilderFactory<DocumentSimilarity, Relation> { @Override public ActionBuilderModule<DocumentSimilarity, Relation> instantiate(Configuration config) { Float similarityThreshold = null; String thresholdStr = WorkflowRuntimeParameters.getParamValue(EXPORT_DOCUMENTSSIMILARITY_THRESHOLD, config); if (thresholdStr != null) { similarityThreshold = Float.valueOf(thresholdStr); log.info("setting documents similarity exporter threshold to: " + similarityThreshold); } return new DocumentSimilarityActionBuilderModule(provideTrustLevelThreshold(config), similarityThreshold); } DocumentSimilarityActionBuilderModuleFactory(); @Override ActionBuilderModule<DocumentSimilarity, Relation> instantiate(Configuration config);  }