Commit 1079e457 authored by Christian Reuschling's avatar Christian Reuschling
Browse files

now lucene stuff is managed by DynaQ and not by leechcrawler. We are

independent from leechcrawler regarding the lucene version now. | some
new migrations to several dependency versions
parent 5ca3df8e
target
dynaq.keys
.idea
dynaq.iml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>dfki.km.dynaq</groupId>
<groupId>dfki.sds.dynaq</groupId>
<artifactId>dynaq</artifactId>
<packaging>jar</packaging>
<version>2.4-SNAPSHOT</version>
<version>2.5-SNAPSHOT</version>
<name>dynaq</name>
<url>http://dynaq.opendfki.de</url>
......@@ -15,15 +15,15 @@
<developer>
<name>Christian Reuschling</name>
<email>reuschling@dfki.uni-kl.de</email>
<organization>DFKI, KnowledgeManagement</organization>
<organizationUrl>http://www.dfki.de/web/forschung/km</organizationUrl>
<organization>DFKI, SDS department</organization>
<organizationUrl>https://www.dfki.de/en/web/research/research-departments/smart-data-knowledge-services/</organizationUrl>
</developer>
</developers>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<j2seVersion>1.7</j2seVersion>
<!-- <j2seVersion>1.7</j2seVersion> -->
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
......@@ -42,7 +42,6 @@
<snapshotRepository>
<id>artifactory-libs-snapshots-local</id>
<url>http://www.dfki.uni-kl.de/artifactory/libs-snapshots-local</url>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
</distributionManagement>
......@@ -83,11 +82,25 @@
<scope>test</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.junit.jupiter</groupId>-->
<!-- <artifactId>junit-jupiter</artifactId>-->
<!-- <version>5.7.1</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.junit.vintage</groupId>-->
<!-- <artifactId>junit-vintage-engine</artifactId>-->
<!-- <version>5.7.1</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<!-- leechcrawler-->
<dependency>
<groupId>de.dfki.km</groupId>
<groupId>de.dfki.sds</groupId>
<artifactId>leechcrawler</artifactId>
<version>1.8</version>
<version>1.25.1</version>
<exclusions>
<exclusion>
<artifactId>asm-debug-all</artifactId>
......@@ -95,34 +108,38 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.8.0</version>
</dependency>
<!-- leechcrawler-->
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>jgoodies-binding</artifactId>
<version>2.6.1</version>
<!-- <version>2.13.0</version>-->
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.apache.lucene</groupId> -->
<!-- <artifactId>lucene-core</artifactId> -->
<!-- <version>3.5.0-dynaq-patched</version> -->
<!-- <version>3.5.0</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.apache.lucene</groupId> -->
<!-- <artifactId>lucene-analyzers</artifactId> -->
<!-- <version>3.5.0</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>com.tangentum.phonetix</groupId> -->
<!-- <artifactId>phonetix</artifactId> -->
<!-- <version>0.2</version> -->
<!-- </dependency> -->
<!-- <dependency>-->
<!-- <groupId>com.google.code.gson</groupId>-->
<!-- <artifactId>gson</artifactId>-->
<!-- <version>2.8.6</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.esotericsoftware</groupId>-->
<!-- <artifactId>kryo</artifactId>-->
<!-- <version>4.0.0</version>-->
<!-- </dependency>-->
<dependency>
......@@ -180,23 +197,23 @@
<!-- <version>4.9.0</version> -->
<!-- </dependency> -->
<dependency>
<groupId>de.dfki.km</groupId>
<artifactId>inquisition</artifactId>
<version>23-SNAPSHOT</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>de.dfki.km</groupId>-->
<!-- <artifactId>inquisition</artifactId>-->
<!-- <version>23-SNAPSHOT</version>-->
<!-- </dependency>-->
<dependency>
<groupId>de.dfki.km</groupId>
<groupId>de.dfki.sds</groupId>
<artifactId>kafka</artifactId>
<version>23-SNAPSHOT</version>
<version>1.3</version>
</dependency>
<dependency>
<groupId>de.dfki.km</groupId>
<artifactId>thumbnailer</artifactId>
<version>23-SNAPSHOT</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>de.dfki.km</groupId>-->
<!-- <artifactId>thumbnailer</artifactId>-->
<!-- <version>23-SNAPSHOT</version>-->
<!-- </dependency>-->
<!-- <dependency> -->
<!-- <groupId>dfki.km.delight</groupId> -->
......@@ -312,30 +329,6 @@
<!-- <dependency> -->
<!-- <groupId>org.apache.mahout</groupId> -->
<!-- <artifactId>mahout-integration</artifactId> -->
<!-- <version>0.9</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.apache.mahout</groupId> -->
<!-- <artifactId>mahout-examples</artifactId> -->
<!-- <version>0.9</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.apache.lucene</groupId> -->
<!-- <artifactId>lucene-facet</artifactId> -->
<!-- <version>4.9.0</version> -->
<!-- </dependency> -->
</dependencies>
......@@ -344,17 +337,6 @@
<!-- dummy for buildnumber plugin -->
<scm>
<connection>scm:svn:http://127.0.0.1/dummy</connection>
<developerConnection>scm:svn:https://127.0.0.1/dummy</developerConnection>
<tag>HEAD</tag>
<url>http://127.0.0.1/dummy</url>
</scm>
<build>
......@@ -364,14 +346,14 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.10</version>
<version>2.1.0</version>
<configuration>
<assembleDirectory>${project.build.directory}/assembleDir</assembleDirectory>
<extraJvmArguments>-Xmx2G</extraJvmArguments>
<binFolder>bin</binFolder>
<extraJvmArguments>-Xmx2G --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.desktop/sun.awt.dnd=ALL-UNNAMED</extraJvmArguments>
<binFolder>/bin</binFolder>
<repositoryName>lib</repositoryName>
<repositoryLayout>flat</repositoryLayout>
<useAsterikClassPath>true</useAsterikClassPath>
<useWildcardClassPath>true</useWildcardClassPath>
<projectArtifactFirstInClassPath>true</projectArtifactFirstInClassPath>
......@@ -409,13 +391,13 @@
<plugin>
<!-- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>webstart-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jnlp-inline</goal> <!-- use jnlp, jnlp-inline or jnlp-single as appropriate -->
<goal>jnlp-inline</goal>
</goals>
</execution>
</executions>
......@@ -432,58 +414,38 @@
<jnlp>
<inputTemplateResourcePath>${project.basedir}</inputTemplateResourcePath>
<inputTemplate>src/main/jnlp/template.vm</inputTemplate> <!--relative to inputTemplateResourcePath -->
<inputTemplate>src/main/jnlp/template.vm</inputTemplate>
<outputFile>launch.jnlp</outputFile>
<mainClass>org.dynaq.DynaQ</mainClass>
</jnlp>
<sign>
<keystore>keystore</keystore>
<keypass>keypass</keypass> <!-- we need to override passwords easily from the command line. ${keypass} -->
<storepass>storepass</storepass> <!-- ${storepass} -->
<keypass>keypass</keypass>
<storepass>storepass</storepass>
<alias>dynaq_sign</alias>
<validity>3650</validity>
<dnameCn>dynaq.opendfki.de</dnameCn>
<dnameOu>Knowledge Managment</dnameOu>
<dnameOu>SDS/dnameOu>
<dnameO>DFKI GmbH</dnameO>
<dnameL>Rhineland Palatinate</dnameL>
<dnameSt>Kaiserslautern</dnameSt>
<dnameC>Germany</dnameC>
<verify>true</verify> <!-- verify that the signing operation succeeded -->
<verify>true</verify>
<keystoreConfig>
<delete>false</delete> <!-- delete the keystore -->
<gen>true</gen> <!-- optional shortcut to generate the store. -->
<delete>false</delete>
<gen>true</gen>
</keystoreConfig>
</sign>
</configuration>
</plugin>
</plugin> -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
<revisionOnScmFailure>unknownbuild</revisionOnScmFailure>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
......@@ -491,13 +453,26 @@
<configuration>
<archive>
<manifestEntries>
<SCM-Revision>${buildNumber}</SCM-Revision>
<Buildtime>${maven.build.timestamp}</Buildtime>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
......@@ -505,56 +480,20 @@
<pluginManagement>
<!-- NOTE: plugins are not automatically added to lifecycle unless stated
in an <plugin> element. -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.8.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>${maven.compiler.encoding}</encoding>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>${maven.compiler.encoding}</encoding>
<quiet>true</quiet>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>${maven.compiler.encoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
......@@ -572,95 +511,14 @@
<profiles>
<profile>
<!-- Profile enables generation of additional javadoc files. Activate
profile with -Pjavadoc. -->
<id>javadoc</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>javadoc</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>javadoc-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.5</version>
<reportSets>
<reportSet>
<id>javadoc</id>
<configuration>
<goal>aggregate-jar</goal>
</configuration>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
</profile>
<profile>
<!-- Creates a additional source jar. Active by default. Must be activated
if package-binsrc is activated. -->
<id>package-source</id>
<id>disable-java8-doclint</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>package-source</name>
</property>
<jdk>[1.8,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>package-source-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>package-project</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
</plugin>
</plugins>
</build>
<properties>
<additionalparam>-Xdoclint:none</additionalparam>
</properties>
</profile>
......
......@@ -19,9 +19,9 @@ import org.apache.lucene.store.NativeFSLockFactory;
import org.kafkaRCP.core.KafkaRCPConstants;
import org.kafkaRCP.ui.KafkaRCP;
import de.dfki.inquisition.exceptions.ExceptionUtils;
import de.dfki.inquisition.file.FileUtils;
import de.dfki.inquisition.resources.ResourceUtilz;
import de.dfki.inquisitor.exceptions.ExceptionUtils;
import de.dfki.inquisitor.file.FileUtilz;
import de.dfki.inquisitor.resources.ResourceUtilz;
......@@ -121,7 +121,7 @@ public class DynaQ
if(bLogConfig)
{
File fLogProps = new File(KafkaRCPConstants.addKafkaBaseDir2RelativePath("config/logging.properties"));
if(!fLogProps.exists()) FileUtils.copyFile(new File(fLogProps.getAbsolutePath() + ".reference"), fLogProps);
if(!fLogProps.exists()) FileUtilz.copyFile(new File(fLogProps.getAbsolutePath() + ".reference"), fLogProps);
LogManager.getLogManager().readConfiguration(new FileInputStream(fLogProps));
System.setProperty("java.util.logging.config.file", fLogProps.getAbsolutePath());
}
......
......@@ -39,22 +39,26 @@ import org.dynaq.core.DynaQDocument;
import org.dynaq.core.DynaQException;
import org.dynaq.index.LuceneIndexSet;
import org.dynaq.util.DateUtils;
import org.dynaq.util.lucene.basic.Buzzwords;
// import org.dynaq.util.lucene.basic.DynamicFieldType;
import org.dynaq.util.lucene.basic.DynaQDefaultFieldConfig;
import org.dynaq.util.lucene.basic.DynamicFieldType;
import org.dynaq.util.lucene.basic.FieldConfig;
import org.kafkaRCP.core.KafkaRCPConstants;
import de.dfki.inquisition.collections.ConfigurationException;
import de.dfki.inquisition.collections.ConfigurationValue;
import de.dfki.inquisition.collections.MultiValueConfiguration;
import de.dfki.inquisition.collections.MultiValueLinkedHashMap;
import de.dfki.inquisition.file.FileUtils;
import de.dfki.inquisition.lucene.Buzzwords;
import de.dfki.inquisition.lucene.DynamicFieldType;
import de.dfki.inquisition.lucene.FieldConfig;
import de.dfki.inquisition.text.DateParser;
import de.dfki.inquisitor.collections.ConfigurationException;
import de.dfki.inquisitor.collections.ConfigurationValue;
import de.dfki.inquisitor.collections.MultiValueConfiguration;
import de.dfki.inquisitor.collections.MultiValueLinkedHashMap;
import de.dfki.inquisitor.file.FileUtilz;
import de.dfki.inquisitor.text.DateParser;
import de.dfki.km.leech.lucene.LeechDefaultFieldConfig;
import de.dfki.km.leech.metadata.LeechMetadata;
@SuppressWarnings({"JavaDoc", "ConstantConditions"})
public class AttributeConfig
{
......@@ -573,27 +577,27 @@ public class AttributeConfig
for (String targetAttributeName : targetAttributeNames)
{
if("integer".equals(strFieldType.toLowerCase()))
if("integer".equalsIgnoreCase(strFieldType))
{
numberAttributeQuery.add(NumericRangeQuery.newIntRange(targetAttributeName, (Integer) lowerBound, (Integer) upperBound, true, true), Occur.SHOULD);
}
else if("long".equals(strFieldType.toLowerCase()))
else if("long".equalsIgnoreCase(strFieldType))
{
numberAttributeQuery.add(NumericRangeQuery.newLongRange(targetAttributeName, (Long) lowerBound, (Long) upperBound, true, true), Occur.SHOULD);
}
else if("float".equals(strFieldType.toLowerCase()))
else if("float".equalsIgnoreCase(strFieldType))
{
numberAttributeQuery.add(NumericRangeQuery.newFloatRange(targetAttributeName, (Float) lowerBound, (Float) upperBound, true, true), Occur.SHOULD);
}
else if("double".equals(strFieldType.toLowerCase()))
else if("double".equalsIgnoreCase(strFieldType))
{
numberAttributeQuery.add(NumericRangeQuery.newDoubleRange(targetAttributeName, (Double) lowerBound, (Double) upperBound, true, true), Occur.SHOULD);
}
else if("date".equals(strFieldType.toLowerCase()))
else if("date".equalsIgnoreCase(strFieldType))
{
numberAttributeQuery.add(NumericRangeQuery.newLongRange(targetAttributeName, (Long) lowerBound, (Long) upperBound, true, true), Occur.SHOULD);
}
else if("time".equals(strFieldType.toLowerCase()))
else if("time".equalsIgnoreCase(strFieldType))
{
numberAttributeQuery.add(NumericRangeQuery.newIntRange(targetAttributeName, (Integer) lowerBound, (Integer) upperBound, true, true), Occur.SHOULD);
}
......@@ -1129,10 +1133,10 @@ public class AttributeConfig
// die fieldConfig muß noch aus der Konfiguration erzeugt werden. Wir nehmen schon mal eine StandardConfig, und überschreiben/erweitern dann mit der aus der
// Datei
m_fieldConfig = new LeechDefaultFieldConfig();
m_fieldConfig = new DynaQDefaultFieldConfig();
FieldConfig fieldConfigFromJson = new FieldConfig();
fieldConfigFromJson.fromJson(FileUtils.file2String(KafkaRCPConstants.addKafkaBaseDir2RelativePath(DynaQConstants.fieldsConf)));
fieldConfigFromJson.fromJson(FileUtilz.file2String(KafkaRCPConstants.addKafkaBaseDir2RelativePath(DynaQConstants.fieldsConf)));
if(fieldConfigFromJson.defaultFieldType != null) m_fieldConfig.defaultFieldType = fieldConfigFromJson.defaultFieldType;
m_fieldConfig.fieldName2FieldType.putAll(fieldConfigFromJson.fieldName2FieldType);
......
......@@ -12,6 +12,7 @@ import javax.mail.Folder;
import javax.mail.MessagingException;
import javax.mail.Store;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeNode;
......@@ -45,10 +46,10 @@ class CheckTreeTools
// If there are children and they are no dummies, check them
if((top.getChildCount() != 0) && (!(((DefaultMutableTreeNode) top.getFirstChild()).getUserObject().equals(DUMMY.getUserObject()))))
{
Enumeration<DefaultMutableTreeNode> e = top.children();
Enumeration<TreeNode> e = top.children();
for (int i = 0; i < top.getChildCount(); i++)
{
DefaultMutableTreeNode child = e.nextElement();
DefaultMutableTreeNode child = (DefaultMutableTreeNode) e.nextElement();
// Object childInfo = child.getUserObject();
changeChildrenSelectionState(child, set, false);
}
......@@ -76,10 +77,10 @@ class CheckTreeTools
// if a node got "unchecked"
{
// look, whether a other node on the same level is checked, or partly checked
Enumeration<DefaultMutableTreeNode> e = parent.children();
Enumeration<TreeNode> e = parent.children();
while (e.hasMoreElements())
{
DefaultMutableTreeNode child = e.nextElement();
DefaultMutableTreeNode child = (DefaultMutableTreeNode) e.nextElement();
// if one of the node's siblings is checked or partly checked, the selection of the parental nodes doesn't change
if(((Checkable) child.getUserObject()).getSelectionState() != Checkable.UNCHECKED)