diff --git a/src/main/java/org/myrobotlab/document/transformer/Configuration.java b/src/main/java/org/myrobotlab/document/transformer/Configuration.java index 2479c433ee..366266093e 100644 --- a/src/main/java/org/myrobotlab/document/transformer/Configuration.java +++ b/src/main/java/org/myrobotlab/document/transformer/Configuration.java @@ -8,7 +8,7 @@ import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.StaxDriver; -public class Configuration implements Serializable { +public abstract class Configuration implements Serializable { // TODO: add a map type. // TODO: push the name/class onto this ? @@ -22,14 +22,9 @@ public class Configuration implements Serializable { * */ private static final long serialVersionUID = 1L; - public HashMap config = null; - // private XStream xstream = null; + public HashMap config = new HashMap(); public Configuration() { - config = new HashMap(); - // figure that we need to be able to serialize / deserialize - // TODO: consider a faster driver / serializer - // xstream = new XStream(new StaxDriver()); } public void setStringParam(String name, String value) { diff --git a/src/main/java/org/myrobotlab/document/transformer/StageConfiguration.java b/src/main/java/org/myrobotlab/document/transformer/StageConfiguration.java index 0359931814..6243f41c88 100644 --- a/src/main/java/org/myrobotlab/document/transformer/StageConfiguration.java +++ b/src/main/java/org/myrobotlab/document/transformer/StageConfiguration.java @@ -4,20 +4,16 @@ public class StageConfiguration extends Configuration { - // private HashMap config = null; - private String stageName = "defaultStage"; private String stageClass = "org.myrobotlab.document.transformer.AbstractStage"; public StageConfiguration(String stageName, String stageClass) { - config = new HashMap(); this.stageName = stageName; this.stageClass = stageClass; } public StageConfiguration() { // depricate this constructor? - config = new HashMap(); } @Override diff --git a/src/main/java/org/myrobotlab/service/Solr.java b/src/main/java/org/myrobotlab/service/Solr.java index 043287d923..5445f607f0 100644 --- a/src/main/java/org/myrobotlab/service/Solr.java +++ b/src/main/java/org/myrobotlab/service/Solr.java @@ -177,9 +177,7 @@ public synchronized void startEmbedded(String path) throws SolrServerException, */ public void addDocument(SolrInputDocument doc) { // Always batch! - ArrayList docs = new ArrayList(); - docs.add(doc); - addDocuments(docs); + addDocuments(List.of(doc)); } /** @@ -670,11 +668,9 @@ private SolrInputDocument convertDocument(Document doc) { @Override public ProcessingStatus onDocument(Document doc) { // always be batching when sending docs. - ArrayList docs = new ArrayList(); - docs.add(doc); // TODO: we want to add to the current batch to send.. // and make sure we have a thread flushing the batch if it gets too old. - return onDocuments(docs); + return onDocuments(List.of(doc)); } @Override diff --git a/src/main/resources/resource/config/mediasearch/python.yml b/src/main/resources/resource/config/mediasearch/python.yml deleted file mode 100755 index c372d6ec5d..0000000000 --- a/src/main/resources/resource/config/mediasearch/python.yml +++ /dev/null @@ -1,11 +0,0 @@ -!!org.myrobotlab.service.config.PythonConfig -listeners: null -modulePaths: -- resource\Python\modules -peers: null -scriptRootDir: C:\dev\workspace.mrl4\myrobotlab\data\Python\python -startScripts: [ - ] -stopScripts: [ - ] -type: Python diff --git a/src/main/resources/resource/config/mediasearch/runtime.yml b/src/main/resources/resource/config/mediasearch/runtime.yml index 9e2fb0c0a5..cf77865501 100755 --- a/src/main/resources/resource/config/mediasearch/runtime.yml +++ b/src/main/resources/resource/config/mediasearch/runtime.yml @@ -9,7 +9,6 @@ peers: null registry: - runtime - security -- python - webgui - solr - audiofile