- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Gson g =
new Gson()
GsonBuilder gsonBuilder;gsonBuilder.create()
new GsonBuilder().create()
- Smart code suggestions by Codota
}
public ECDDriver(String resource, String uuid) throws Exception { TypeSystemDescription typeSystem = TypeSystemDescriptionFactory.createTypeSystemDescription(); this.builder = new BaseExperimentBuilder(uuid, resource, typeSystem); this.config = builder.getConfiguration(); }
public static void runPipeline(String pipelinePath, String datasetName, String sequenceId, String question, String outputXmiPath) throws Exception { String uuid = UUID.randomUUID().toString(); TypeSystemDescription typeSystem = TypeSystemDescriptionFactory.createTypeSystemDescription(); ExperimentBuilder builder = new BaseExperimentBuilder(uuid, pipelinePath, typeSystem); AdHocDriver driver = new AdHocDriver(builder); AdHocSource source = new BaseAdHocSource() { public void publish(String quuid, String question) throws InterruptedException { DataElement result = new DataElement(datasetName, sequenceId, question, quuid); getReader().putQuestion(result); } }; XmiPrintCallbackListener callback = new XmiPrintCallbackListener(new File(outputXmiPath)); AdHocCollectionReader reader = driver.setupAndRun(source, callback); String quuid = UUID.randomUUID().toString(); source.publish(quuid, question); callback.await(); reader.shutdown(); }
public AsyncDriver(String resource, String uuid, OpMode op) throws Exception { this.opMode = op; this.localConfig = ConfigurationLoader.load(resource); if (opMode == OpMode.PRODUCER || opMode == OpMode.REPORT) { resource += "-producer"; this.config = ConfigurationLoader.load(resource); } else { resource += "-consumer"; this.config = ConfigurationLoader.load(resource); } TypeSystemDescription typeSystem = TypeSystemDescriptionFactory.createTypeSystemDescription(); this.builder = new BaseExperimentBuilder(uuid, resource, typeSystem); this.asyncConfig = builder.initializeResource(config, "async-configuration", AsyncConfiguration.class); }