Integrated lite and full services and controllers in core.
Change-Id: I34914c89c2266fa02bee1a5b0522c46139b13966
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/AnnotationController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/AnnotationController.java
deleted file mode 100644
index 06b9957..0000000
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/AnnotationController.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package de.ids_mannheim.korap.web.controller;
-
-import java.io.IOException;
-import java.util.List;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.sun.jersey.spi.container.ResourceFilters;
-
-import de.ids_mannheim.korap.dto.FoundryDto;
-import de.ids_mannheim.korap.dto.LayerDto;
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.exceptions.StatusCodes;
-import de.ids_mannheim.korap.service.AnnotationService;
-import de.ids_mannheim.korap.utils.JsonUtils;
-import de.ids_mannheim.korap.web.KustvaktResponseHandler;
-import de.ids_mannheim.korap.web.APIVersionFilter;
-import de.ids_mannheim.korap.web.filter.DemoUserFilter;
-import de.ids_mannheim.korap.web.filter.PiwikFilter;
-
-/**
- * Provides services regarding annotation related information.
- *
- * @author margaretha
- *
- */
-@Controller
-@Path("/{version}/annotation/")
-@ResourceFilters({APIVersionFilter.class, DemoUserFilter.class, PiwikFilter.class })
-@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
-public class AnnotationController {
-
- @Autowired
- private KustvaktResponseHandler kustvaktResponseHandler;
-
- @Autowired
- private AnnotationService annotationService;
-
- /**
- * Returns information about all supported layers
- *
- * @return a json serialization of all supported layers
- */
- @GET
- @Path("layers")
- public List<LayerDto> getLayers () {
- return annotationService.getLayerDtos();
- }
-
-
- /**
- * Returns a list of foundry descriptions.
- *
- * @param codes
- * foundry-layer code or a Kleene-star
- * @param language
- * 2-letter language code (description language)
- * @return a list of foundry, layer, value information in json
- */
- @SuppressWarnings("unchecked")
- @POST
- @Path("description")
- @Consumes(MediaType.APPLICATION_JSON)
- public List<FoundryDto> getFoundryDescriptions (String json) {
- if (json == null || json.isEmpty()) {
- throw kustvaktResponseHandler
- .throwit(new KustvaktException(StatusCodes.MISSING_PARAMETER,
- "Missing a json string.", ""));
- }
-
- JsonNode node;
- try {
- node = JsonUtils.readTree(json);
- }
- catch (KustvaktException e1) {
- throw kustvaktResponseHandler.throwit(e1);
- }
-
- String language;
- if (!node.has("language")) {
- language = "en";
- }
- else {
- language = node.get("language").asText();
- if (language == null || language.isEmpty()) {
- language = "en";
- }
- else if (!(language.equals("en") || language.equals("de"))) {
- throw kustvaktResponseHandler.throwit(
- new KustvaktException(StatusCodes.UNSUPPORTED_VALUE,
- "Unsupported value:", language));
- }
- }
-
- List<String> codes;
- try {
- codes = JsonUtils.convert(node.get("codes"), List.class);
- }
- catch (IOException | NullPointerException e) {
- throw kustvaktResponseHandler.throwit(new KustvaktException(
- StatusCodes.INVALID_ARGUMENT, "Bad argument:", json));
- }
- if (codes == null) {
- throw kustvaktResponseHandler.throwit(
- new KustvaktException(StatusCodes.MISSING_ATTRIBUTE,
- "Missing attribute:", "codes"));
- }
- else if (codes.isEmpty()) {
- throw kustvaktResponseHandler
- .throwit(new KustvaktException(StatusCodes.NO_RESULT_FOUND,
- "No result found.", "codes:[]"));
- }
-
- try {
- return annotationService.getFoundryDtos(codes, language);
- }
- catch (KustvaktException e) {
- throw kustvaktResponseHandler.throwit(e);
- }
- }
-}
-
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2Controller.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2Controller.java
index e8047c2..d86a2b1 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2Controller.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2Controller.java
@@ -26,8 +26,8 @@
import com.sun.jersey.spi.container.ResourceFilters;
+import de.ids_mannheim.korap.constant.OAuth2Scope;
import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.oauth2.constant.OAuth2Scope;
import de.ids_mannheim.korap.oauth2.oltu.OAuth2AuthorizationRequest;
import de.ids_mannheim.korap.oauth2.oltu.OAuth2RevokeTokenRequest;
import de.ids_mannheim.korap.oauth2.oltu.service.OltuAuthorizationService;
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2WithOpenIdController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2WithOpenIdController.java
index 761c3f6..6eae61c 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2WithOpenIdController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2WithOpenIdController.java
@@ -31,8 +31,8 @@
import com.nimbusds.oauth2.sdk.id.State;
import com.sun.jersey.spi.container.ResourceFilters;
+import de.ids_mannheim.korap.constant.OAuth2Scope;
import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.oauth2.constant.OAuth2Scope;
import de.ids_mannheim.korap.oauth2.openid.OpenIdConfiguration;
import de.ids_mannheim.korap.oauth2.openid.OpenIdHttpRequestWrapper;
import de.ids_mannheim.korap.oauth2.openid.service.JWKService;
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuthClientController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuthClientController.java
index ebcfd51..ca7e168 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuthClientController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuthClientController.java
@@ -18,8 +18,8 @@
import com.sun.jersey.spi.container.ResourceFilters;
+import de.ids_mannheim.korap.constant.OAuth2Scope;
import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.oauth2.constant.OAuth2Scope;
import de.ids_mannheim.korap.oauth2.dto.OAuth2ClientDto;
import de.ids_mannheim.korap.oauth2.dto.OAuth2ClientInfoDto;
import de.ids_mannheim.korap.oauth2.service.OAuth2ClientService;
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/SearchController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/SearchController.java
deleted file mode 100644
index e65ae07..0000000
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/SearchController.java
+++ /dev/null
@@ -1,327 +0,0 @@
-package de.ids_mannheim.korap.web.controller;// package
- // de.ids_mannheim.korap.ext.web;
-
-import java.util.HashSet;
-import java.util.Locale;
-import java.util.Set;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-
-import com.sun.jersey.spi.container.ResourceFilters;
-
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.oauth2.constant.OAuth2Scope;
-import de.ids_mannheim.korap.oauth2.service.OAuth2ScopeService;
-import de.ids_mannheim.korap.security.context.TokenContext;
-import de.ids_mannheim.korap.service.SearchService;
-import de.ids_mannheim.korap.web.KustvaktResponseHandler;
-import de.ids_mannheim.korap.web.APIVersionFilter;
-import de.ids_mannheim.korap.web.filter.AuthenticationFilter;
-import de.ids_mannheim.korap.web.filter.DemoUserFilter;
-import de.ids_mannheim.korap.web.filter.PiwikFilter;
-
-/**
- *
- * @author hanl, margaretha, diewald
- * @date 29/01/2014
- * @lastUpdate 09/07/2018
- *
- */
-@Controller
-@Path("/")
-@ResourceFilters({ APIVersionFilter.class, AuthenticationFilter.class,
- DemoUserFilter.class, PiwikFilter.class })
-@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
-public class SearchController {
-
- private static Logger jlog = LogManager.getLogger(SearchController.class);
-
- @Autowired
- private KustvaktResponseHandler kustvaktResponseHandler;
-
- @Autowired
- private SearchService searchService;
- @Autowired
- private OAuth2ScopeService scopeService;
-
- /**
- * Builds a json query serialization from the given parameters.
- *
- * @param locale
- * @param securityContext
- * @param q
- * query string
- * @param ql
- * query language
- * @param v
- * version
- * @param context
- * @param cutoff
- * true if the number of results should be limited
- * @param pageLength
- * number of results per page
- * @param pageIndex
- * @param startPage
- * @param cq
- * corpus query
- * @return
- */
- // ref query parameter removed!
- @GET
- @Path("{version}/query")
- public Response serializeQuery (@Context Locale locale,
- @Context SecurityContext securityContext, @QueryParam("q") String q,
- @QueryParam("ql") String ql, @QueryParam("v") String v,
- @QueryParam("context") String context,
- @QueryParam("cutoff") Boolean cutoff,
- @QueryParam("count") Integer pageLength,
- @QueryParam("offset") Integer pageIndex,
- @QueryParam("page") Integer startPage,
- @QueryParam("cq") String cq) {
- TokenContext ctx = (TokenContext) securityContext.getUserPrincipal();
- try {
- scopeService.verifyScope(ctx, OAuth2Scope.SERIALIZE_QUERY);
- String result = searchService.serializeQuery(q, ql, v, cq,
- pageIndex, startPage, pageLength, context, cutoff);
- jlog.debug("Query: " + result);
- return Response.ok(result).build();
- }
- catch (KustvaktException e) {
- throw kustvaktResponseHandler.throwit(e);
- }
- }
-
- @POST
- @Path("{version}/search")
- public Response searchPost (@Context SecurityContext context,
- @Context Locale locale, @QueryParam("engine") String engine,
- String jsonld) {
- TokenContext ctx = (TokenContext) context.getUserPrincipal();
- try {
- scopeService.verifyScope(ctx, OAuth2Scope.SEARCH);
- }
- catch (KustvaktException e) {
- throw kustvaktResponseHandler.throwit(e);
- }
-
- jlog.debug("Serialized search: " + jsonld);
- String result = searchService.search(jsonld);
- jlog.debug("The result set: " + result);
- return Response.ok(result).build();
- }
-
- @GET
- @Path("{version}/search")
- public Response searchGet (@Context SecurityContext securityContext,
- @Context HttpHeaders headers, @Context Locale locale,
- @QueryParam("q") String q, @QueryParam("ql") String ql,
- @QueryParam("v") String v, @QueryParam("context") String ctx,
- @QueryParam("cutoff") Boolean cutoff,
- @QueryParam("count") Integer pageLength,
- @QueryParam("offset") Integer pageIndex,
- @QueryParam("page") Integer pageInteger,
- @QueryParam("fields") Set<String> fields,
- @QueryParam("cq") String cq, @QueryParam("engine") String engine) {
-
- TokenContext context =
- (TokenContext) securityContext.getUserPrincipal();
-
- String result;
- try {
- scopeService.verifyScope(context, OAuth2Scope.SEARCH);
- result = searchService.search(engine, context.getUsername(),
- headers, q, ql, v, cq, fields, pageIndex, pageInteger, ctx,
- pageLength, cutoff);
- }
- catch (KustvaktException e) {
- throw kustvaktResponseHandler.throwit(e);
- }
-
- return Response.ok(result).build();
- }
-
- @GET
- @Path("{version}/corpus/{corpusId}/{docId}/{textId}/{matchId}/matchInfo")
- public Response getMatchInfo (@Context SecurityContext ctx,
- @Context HttpHeaders headers, @Context Locale locale,
- @PathParam("corpusId") String corpusId,
- @PathParam("docId") String docId,
- @PathParam("textId") String textId,
- @PathParam("matchId") String matchId,
- @QueryParam("foundry") Set<String> foundries,
- @QueryParam("layer") Set<String> layers,
- @QueryParam("spans") Boolean spans,
- // Highlights may also be a list of valid highlight classes
- @QueryParam("hls") Boolean highlights) throws KustvaktException {
-
- TokenContext tokenContext = (TokenContext) ctx.getUserPrincipal();
- scopeService.verifyScope(tokenContext, OAuth2Scope.MATCH_INFO);
- spans = spans != null ? spans : false;
- highlights = highlights != null ? highlights : false;
- if (layers == null || layers.isEmpty()) layers = new HashSet<>();
-
- String results = searchService.retrieveMatchInfo(corpusId, docId,
- textId, matchId, foundries, tokenContext.getUsername(), headers,
- layers, spans, highlights);
- return Response.ok(results).build();
- }
-
- /*
- * Returns the meta data fields of a certain document
- */
- // This is currently identical to LiteService#getMeta(),
- // but may need auth code to work following policies
- @GET
- @Path("{version}/corpus/{corpusId}/{docId}/{textId}")
- public Response getMetadata (@PathParam("corpusId") String corpusId,
- @PathParam("docId") String docId, @PathParam("textId") String textId
- // @QueryParam("fields") Set<String> fields
- ) throws KustvaktException {
- String results =
- searchService.retrieveDocMetadata(corpusId, docId, textId);
- return Response.ok(results).build();
- }
-
- @POST
- @Path("{version}/colloc")
- public Response getCollocationBase (@QueryParam("q") String query) {
- String result;
- try {
- result = searchService.getCollocationBase(query);
- }
- catch (KustvaktException e) {
- throw kustvaktResponseHandler.throwit(e);
- }
- return Response.ok(result).build();
- }
-
- // @GET
- // @Path("colloc")
- // public Response getCollocationsAll(@Context SecurityContext
- // ctx,
- // @Context Locale locale, @QueryParam("props") String properties,
- // @QueryParam("sfskip") Integer sfs,
- // @QueryParam("sflimit") Integer limit, @QueryParam("q") String
- // query,
- // @QueryParam("ql") String ql, @QueryParam("context") Integer
- // context,
- // @QueryParam("foundry") String foundry,
- // @QueryParam("paths") Boolean wPaths) {
- // TokenContext tokenContext = (TokenContext)
- // ctx.getUserPrincipal();
- // ColloQuery.ColloQueryBuilder builder;
- // KoralCollectionQueryBuilder cquery = new
- // KoralCollectionQueryBuilder();
- // String result;
- // try {
- // User user = controller.getUser(tokenContext.getUsername());
- // Set<VirtualCollection> resources = ResourceFinder
- // .search(user, VirtualCollection.class);
- // for (KustvaktResource c : resources)
- // cquery.addResource(((VirtualCollection) c).getQuery());
- //
- // builder = functions
- // .buildCollocations(query, ql, properties, context, limit,
- // sfs, foundry, new ArrayList<Dependency>(), wPaths,
- // cquery);
- //
- // result = graphDBhandler
- // .getResponse("distCollo", "q", builder.build().toJSON());
- // }catch (KustvaktException e) {
- // throw KustvaktResponseHandler.throwit(e);
- // }catch (JsonProcessingException e) {
- // throw
- // KustvaktResponseHandler.throwit(StatusCodes.ILLEGAL_ARGUMENT);
- // }
- // return Response.ok(result).build();
- // }
-
- // /**
- // * @param locale
- // * @param properties a json object string containing field, op
- // and value
- // for the query
- // * @param query
- // * @param context
- // * @return
- // */
- // @GET
- // @Path("{type}/{id}/colloc")
- // public Response getCollocations(@Context SecurityContext ctx,
- // @Context Locale locale, @QueryParam("props") String properties,
- // @QueryParam("sfskip") Integer sfs,
- // @QueryParam("sflimit") Integer limit, @QueryParam("q") String
- // query,
- // @QueryParam("ql") String ql, @QueryParam("context") Integer
- // context,
- // @QueryParam("foundry") String foundry,
- // @QueryParam("paths") Boolean wPaths, @PathParam("id") String
- // id,
- // @PathParam("type") String type) {
- // ColloQuery.ColloQueryBuilder builder;
- // type = StringUtils.normalize(type);
- // id = StringUtils.decodeHTML(id);
- // TokenContext tokenContext = (TokenContext)
- // ctx.getUserPrincipal();
- // String result;
- // try {
- // KoralCollectionQueryBuilder cquery = new
- // KoralCollectionQueryBuilder();
- // try {
- // User user = controller.getUser(tokenContext.getUsername());
- //
- // KustvaktResource resource = this.resourceHandler
- // .findbyStrId(id, user, type);
- //
- // if (resource instanceof VirtualCollection)
- // cquery.addResource(
- // ((VirtualCollection) resource).getQuery());
- // else if (resource instanceof Corpus)
- // cquery.addMetaFilter("corpusID",
- // resource.getPersistentID());
- // else
- // throw KustvaktResponseHandler
- // .throwit(StatusCodes.ILLEGAL_ARGUMENT,
- // "Type parameter not supported", type);
- //
- // }catch (KustvaktException e) {
- // throw KustvaktResponseHandler.throwit(e);
- // }catch (NumberFormatException ex) {
- // throw KustvaktResponseHandler
- // .throwit(StatusCodes.ILLEGAL_ARGUMENT);
- // }
- //
- // builder = functions
- // .buildCollocations(query, ql, properties, context, limit,
- // sfs, foundry, new ArrayList<Dependency>(), wPaths,
- // cquery);
- //
- // result = graphDBhandler
- // .getResponse("distCollo", "q", builder.build().toJSON());
- //
- // }catch (JsonProcessingException e) {
- // throw
- // KustvaktResponseHandler.throwit(StatusCodes.ILLEGAL_ARGUMENT);
- // }catch (KustvaktException e) {
- // throw KustvaktResponseHandler.throwit(e);
- // }
- //
- // return Response.ok(result).build();
- // }
-
-}
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/StatisticController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/StatisticController.java
deleted file mode 100644
index 43970be..0000000
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/StatisticController.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package de.ids_mannheim.korap.web.controller;
-
-import java.util.Locale;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-
-import com.sun.jersey.spi.container.ResourceFilters;
-
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.exceptions.StatusCodes;
-import de.ids_mannheim.korap.utils.KoralCollectionQueryBuilder;
-import de.ids_mannheim.korap.web.CoreResponseHandler;
-import de.ids_mannheim.korap.web.SearchKrill;
-import de.ids_mannheim.korap.web.APIVersionFilter;
-import de.ids_mannheim.korap.web.filter.PiwikFilter;
-
-/**
- * Web services related to statistics
- *
- * @author hanl
- * @author margaretha
- *
- * @date 08/11/2017
- *
- */
-@Controller
-@Path("{version}/statistics/")
-@ResourceFilters({APIVersionFilter.class, PiwikFilter.class })
-@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
-public class StatisticController {
-
-
- private static Logger jlog =
- LogManager.getLogger(StatisticController.class);
- @Autowired
- private CoreResponseHandler kustvaktResponseHandler;
- @Autowired
- private SearchKrill searchKrill;
-
-
- /**
- * Returns statistics of the virtual corpus defined by the given
- * corpusQuery parameter.
- *
- * @param context
- * SecurityContext
- * @param locale
- * Locale
- * @param corpusQuery
- * a collection query specifying a virtual corpus
- * @return statistics of the virtual corpus defined by the given
- * corpusQuery parameter.
- */
- @GET
- public Response getStatistics (@Context SecurityContext context,
- @Context Locale locale,
- @QueryParam("corpusQuery") String corpusQuery) {
-
- KoralCollectionQueryBuilder builder = new KoralCollectionQueryBuilder();
-
- String stats;
- if (corpusQuery != null && !corpusQuery.isEmpty()) {
- builder.with(corpusQuery);
- String json = null;
- try {
- json = builder.toJSON();
- }
- catch (KustvaktException e) {
- throw kustvaktResponseHandler.throwit(e);
- }
- stats = searchKrill.getStatistics(json);
- }
- else {
- stats = searchKrill.getStatistics(null);
- };
-
- if (stats.contains("-1"))
- throw kustvaktResponseHandler.throwit(StatusCodes.NO_RESULT_FOUND);
- jlog.debug("Stats: " + stats);
- return Response.ok(stats).build();
- }
-}
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
index 6c9427d..c356d78 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
@@ -21,11 +21,11 @@
import com.sun.jersey.spi.container.ResourceFilters;
+import de.ids_mannheim.korap.constant.OAuth2Scope;
import de.ids_mannheim.korap.constant.UserGroupStatus;
import de.ids_mannheim.korap.dto.UserGroupDto;
import de.ids_mannheim.korap.exceptions.KustvaktException;
import de.ids_mannheim.korap.exceptions.StatusCodes;
-import de.ids_mannheim.korap.oauth2.constant.OAuth2Scope;
import de.ids_mannheim.korap.oauth2.service.OAuth2ScopeService;
import de.ids_mannheim.korap.security.context.TokenContext;
import de.ids_mannheim.korap.service.UserGroupService;
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/VirtualCorpusController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/VirtualCorpusController.java
index 553bfb3..12ce7bf 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/VirtualCorpusController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/VirtualCorpusController.java
@@ -21,12 +21,12 @@
import com.sun.jersey.spi.container.ResourceFilters;
+import de.ids_mannheim.korap.constant.OAuth2Scope;
import de.ids_mannheim.korap.constant.VirtualCorpusAccessStatus;
import de.ids_mannheim.korap.constant.VirtualCorpusType;
import de.ids_mannheim.korap.dto.VirtualCorpusAccessDto;
import de.ids_mannheim.korap.dto.VirtualCorpusDto;
import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.oauth2.constant.OAuth2Scope;
import de.ids_mannheim.korap.oauth2.service.OAuth2ScopeService;
import de.ids_mannheim.korap.security.context.TokenContext;
import de.ids_mannheim.korap.service.VirtualCorpusService;