Added query and query language in virtual corpus table.
Change-Id: I25fbaf27e6e4e74032ffb58c47a2df059c507c6b
diff --git a/full/src/test/java/de/ids_mannheim/korap/dao/UserGroupDaoTest.java b/full/src/test/java/de/ids_mannheim/korap/dao/UserGroupDaoTest.java
index 4d26b71..3df8c24 100644
--- a/full/src/test/java/de/ids_mannheim/korap/dao/UserGroupDaoTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/dao/UserGroupDaoTest.java
@@ -137,7 +137,7 @@
int id = virtualCorpusDao.createVirtualCorpus(name,
ResourceType.PROJECT, QueryType.VIRTUAL_CORPUS,
CorpusAccess.PUB, "corpusSigle=WPD15", "", "", "", false,
- createdBy);
+ createdBy, null, null);
VirtualCorpus virtualCorpus = virtualCorpusDao.retrieveVCById(id);
userGroupDao.addVCToGroup(virtualCorpus, createdBy,
diff --git a/full/src/test/java/de/ids_mannheim/korap/dao/VirtualCorpusDaoTest.java b/full/src/test/java/de/ids_mannheim/korap/dao/VirtualCorpusDaoTest.java
index c6b5c43..3294099 100644
--- a/full/src/test/java/de/ids_mannheim/korap/dao/VirtualCorpusDaoTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/dao/VirtualCorpusDaoTest.java
@@ -45,7 +45,7 @@
int id = dao.createVirtualCorpus("system-vc", ResourceType.SYSTEM,
QueryType.VIRTUAL_CORPUS, User.CorpusAccess.FREE,
"corpusSigle=GOE", "definition", "description", "experimental",
- false, "test class");
+ false, "test class", null, null);
// select vc
List<VirtualCorpus> vcList =
@@ -69,7 +69,7 @@
dao.createVirtualCorpus("system-vc", ResourceType.SYSTEM,
QueryType.VIRTUAL_CORPUS, User.CorpusAccess.FREE,
"corpusSigle=GOE", "definition", "description", "experimental",
- false, "system");
+ false, "system", null, null);
}
@Test
diff --git a/full/src/test/java/de/ids_mannheim/korap/rewrite/QueryRewriteTest.java b/full/src/test/java/de/ids_mannheim/korap/rewrite/QueryRewriteTest.java
index e780769..dd7e295 100644
--- a/full/src/test/java/de/ids_mannheim/korap/rewrite/QueryRewriteTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/rewrite/QueryRewriteTest.java
@@ -44,7 +44,7 @@
.get(ClientResponse.class);
String ent = response.getEntity(String.class);
- System.out.println(ent);
+// System.out.println(ent);
JsonNode node = JsonUtils.readTree(ent);
}
diff --git a/full/src/test/java/de/ids_mannheim/korap/service/QueryReferenceServiceTest.java b/full/src/test/java/de/ids_mannheim/korap/service/QueryReferenceServiceTest.java
index cb3adbf..9590209 100644
--- a/full/src/test/java/de/ids_mannheim/korap/service/QueryReferenceServiceTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/service/QueryReferenceServiceTest.java
@@ -1,30 +1,21 @@
package de.ids_mannheim.korap.service;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import java.util.List;
-
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
-
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.fasterxml.jackson.databind.JsonNode;
-import de.ids_mannheim.korap.constant.UserGroupStatus;
-import de.ids_mannheim.korap.constant.ResourceType;
-import de.ids_mannheim.korap.dto.VirtualCorpusAccessDto;
-import de.ids_mannheim.korap.dto.VirtualCorpusDto;
-import de.ids_mannheim.korap.entity.UserGroup;
-import de.ids_mannheim.korap.entity.VirtualCorpus;
import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.web.input.QueryJson;
+@Ignore
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:test-config.xml")
public class QueryReferenceServiceTest {
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/QueryReferenceControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/QueryReferenceControllerTest.java
index f9b297f..a6ea7c7 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/QueryReferenceControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/QueryReferenceControllerTest.java
@@ -43,6 +43,8 @@
assertEquals(ResourceType.PRIVATE.displayName(),
node.at("/type").asText());
assertEquals(testUser, node.at("/createdBy").asText());
+ assertEquals("der", node.at("/query").asText());
+ assertEquals("poliqarp", node.at("/queryLanguage").asText());
}
@Test
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/VirtualCorpusControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/VirtualCorpusControllerTest.java
index f1e8101..d6c786c 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/VirtualCorpusControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/VirtualCorpusControllerTest.java
@@ -120,6 +120,8 @@
assertEquals(ResourceType.SYSTEM.displayName(),
node.at("/type").asText());
assertEquals("koral:doc", node.at("/koralQuery/collection/@type").asText());
+ assertTrue(node.at("/query").isMissingNode());
+ assertTrue(node.at("/queryLanguage").isMissingNode());
}
@Test
diff --git a/full/src/test/resources/log4j2-test.properties b/full/src/test/resources/log4j2-test.properties
index c80f94c..f961961 100644
--- a/full/src/test/resources/log4j2-test.properties
+++ b/full/src/test/resources/log4j2-test.properties
@@ -1,8 +1,8 @@
-#appenders = console
-#appender.console.type = Console
-#appender.console.name = STDOUT
-#appender.console.layout.type = PatternLayout
-#appender.console.layout.pattern = %d{yyyy-MM-dd, HH:mm:ss} %C{6} - %M%n %-5p: %m%n
+appenders = console
+appender.console.type = Console
+appender.console.name = STDOUT
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{yyyy-MM-dd, HH:mm:ss} %C{6} - %M%n %-5p: %m%n
#appender.file.type = File
#appender.file.name = ERRORLOG
@@ -11,7 +11,7 @@
#appender.file.layout.pattern= %d{yyyy-MM-dd, HH:mm:ss} %C{6} - %M%n %-5p: %m%n
rootLogger.level = error
-rootLogger.appenderRefs = stdout
+rootLogger.appenderRefs = console
rootLogger.appenderRef.stdout.ref = STDOUT
#loggers=console