Formatted project
Change-Id: I6993ddfab02e06541b4138040280a4777c719562
diff --git a/full/src/main/resources/basic-config.xml b/full/src/main/resources/basic-config.xml
index c8cfdaa..d882532 100644
--- a/full/src/main/resources/basic-config.xml
+++ b/full/src/main/resources/basic-config.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util"
- xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:p="http://www.springframework.org/schema/p"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xmlns="http://www.springframework.org/schema/beans"
+ xmlns:context="http://www.springframework.org/schema/context"
xmlns:cache="http://www.springframework.org/schema/cache"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
@@ -15,7 +18,8 @@
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-4.0.xsd">
- <context:component-scan base-package="de.ids_mannheim.korap" />
+ <context:component-scan
+ base-package="de.ids_mannheim.korap" />
<context:annotation-config />
<bean id="props"
@@ -46,7 +50,8 @@
</property>
</bean>
- <bean id='cacheManager' class='org.springframework.cache.ehcache.EhCacheCacheManager'
+ <bean id='cacheManager'
+ class='org.springframework.cache.ehcache.EhCacheCacheManager'
p:cacheManager-ref='ehcache' />
<bean id='ehcache'
@@ -55,9 +60,10 @@
<!--class="org.apache.commons.dbcp2.BasicDataSource" -->
<!-- org.springframework.jdbc.datasource.SingleConnectionDataSource -->
- <bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource"
- lazy-init="true">
- <property name="driverClassName" value="${jdbc.driverClassName}" />
+ <bean id="dataSource"
+ class="org.apache.commons.dbcp2.BasicDataSource" lazy-init="true">
+ <property name="driverClassName"
+ value="${jdbc.driverClassName}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
@@ -74,7 +80,8 @@
<bean id="sqliteDataSource"
class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
lazy-init="true">
- <property name="driverClassName" value="${jdbc.driverClassName}" />
+ <property name="driverClassName"
+ value="${jdbc.driverClassName}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
@@ -93,22 +100,26 @@
</bean>
<!-- to configure database for sqlite, mysql, etc. migrations -->
- <bean id="flywayConfig" class="org.flywaydb.core.api.configuration.ClassicConfiguration">
+ <bean id="flywayConfig"
+ class="org.flywaydb.core.api.configuration.ClassicConfiguration">
<property name="baselineOnMigrate" value="true" />
<!-- <property name="validateOnMigrate" value="false" /> -->
<!-- <property name="cleanOnValidationError" value="true" /> -->
- <property name="locations" value="#{'${jdbc.schemaPath}'.split(',')}"/>
+ <property name="locations"
+ value="#{'${jdbc.schemaPath}'.split(',')}" />
<!-- <property name="dataSource" ref="dataSource" /> -->
<property name="dataSource" ref="sqliteDataSource" />
- <property name="outOfOrder" value="true"/>
+ <property name="outOfOrder" value="true" />
</bean>
-
- <bean id="flyway" class="org.flywaydb.core.Flyway" init-method="migrate">
- <constructor-arg ref="flywayConfig"/>
+
+ <bean id="flyway" class="org.flywaydb.core.Flyway"
+ init-method="migrate">
+ <constructor-arg ref="flywayConfig" />
</bean>
- <bean id="kustvakt_db" class="de.ids_mannheim.korap.handlers.JDBCClient">
+ <bean id="kustvakt_db"
+ class="de.ids_mannheim.korap.handlers.JDBCClient">
<constructor-arg index="0" ref="dataSource" />
<!-- deprecated property -->
<property name="database" value="${jdbc.database}" />
@@ -129,7 +140,8 @@
<property name="jpaVendorAdapter">
<bean id="jpaVendorAdapter"
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
- <property name="databasePlatform" value="${hibernate.dialect}" />
+ <property name="databasePlatform"
+ value="${hibernate.dialect}" />
</bean>
</property>
<property name="jpaProperties">
@@ -151,8 +163,10 @@
<tx:annotation-driven proxy-target-class="true"
transaction-manager="transactionManager" />
- <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory" />
+ <bean id="transactionManager"
+ class="org.springframework.orm.jpa.JpaTransactionManager">
+ <property name="entityManagerFactory"
+ ref="entityManagerFactory" />
</bean>
<bean id="transactionTemplate"
@@ -162,70 +176,86 @@
<!-- Data access objects -->
<bean id="adminDao" class="de.ids_mannheim.korap.dao.AdminDaoImpl" />
- <bean id="authorizationDao" class="de.ids_mannheim.korap.oauth2.dao.CachedAuthorizationDaoImpl" />
+ <bean id="authorizationDao"
+ class="de.ids_mannheim.korap.oauth2.dao.CachedAuthorizationDaoImpl" />
<!-- Services -->
- <bean id="scopeService" class="de.ids_mannheim.korap.oauth2.service.OAuth2ScopeServiceImpl" />
-
+ <bean id="scopeService"
+ class="de.ids_mannheim.korap.oauth2.service.OAuth2ScopeServiceImpl" />
+
<!-- props are injected from default-config.xml -->
- <bean id="kustvakt_config" class="de.ids_mannheim.korap.config.FullConfiguration">
+ <bean id="kustvakt_config"
+ class="de.ids_mannheim.korap.config.FullConfiguration">
<constructor-arg name="properties" ref="props" />
</bean>
- <bean id="initializator" class="de.ids_mannheim.de.init.Initializator"
- init-method="init">
+ <bean id="initializator"
+ class="de.ids_mannheim.de.init.Initializator" init-method="init">
</bean>
-
+
<!-- Krill -->
- <bean id="search_krill" class="de.ids_mannheim.korap.web.SearchKrill">
+ <bean id="search_krill"
+ class="de.ids_mannheim.korap.web.SearchKrill">
<constructor-arg value="${krill.indexDir}" />
</bean>
- <!-- Validator -->
- <bean id="validator" class="de.ids_mannheim.korap.validator.ApacheValidator"/>
-
+ <!-- Validator -->
+ <bean id="validator"
+ class="de.ids_mannheim.korap.validator.ApacheValidator" />
+
<!-- URLValidator -->
- <bean id="redirectURIValidator" class="org.apache.commons.validator.routines.UrlValidator">
+ <bean id="redirectURIValidator"
+ class="org.apache.commons.validator.routines.UrlValidator">
<constructor-arg value="http,https" index="0" />
<constructor-arg index="1" type="long">
<util:constant
static-field="org.apache.commons.validator.routines.UrlValidator.NO_FRAGMENTS" />
</constructor-arg>
</bean>
- <bean id="urlValidator" class="org.apache.commons.validator.routines.UrlValidator">
+ <bean id="urlValidator"
+ class="org.apache.commons.validator.routines.UrlValidator">
<constructor-arg value="http,https" />
</bean>
-
+
<!-- Rewrite -->
- <bean id="foundryRewrite" class="de.ids_mannheim.korap.rewrite.FoundryRewrite"/>
- <bean id="collectionRewrite" class="de.ids_mannheim.korap.rewrite.CollectionRewrite"/>
- <bean id="virtualCorpusRewrite" class="de.ids_mannheim.korap.rewrite.VirtualCorpusRewrite"/>
- <bean id="queryReferenceRewrite" class="de.ids_mannheim.korap.rewrite.QueryReferenceRewrite"/>
-
+ <bean id="foundryRewrite"
+ class="de.ids_mannheim.korap.rewrite.FoundryRewrite" />
+ <bean id="collectionRewrite"
+ class="de.ids_mannheim.korap.rewrite.CollectionRewrite" />
+ <bean id="virtualCorpusRewrite"
+ class="de.ids_mannheim.korap.rewrite.VirtualCorpusRewrite" />
+ <bean id="queryReferenceRewrite"
+ class="de.ids_mannheim.korap.rewrite.QueryReferenceRewrite" />
+
<util:list id="rewriteTasks"
value-type="de.ids_mannheim.korap.rewrite.RewriteTask">
<ref bean="foundryRewrite" />
<ref bean="collectionRewrite" />
<ref bean="virtualCorpusRewrite" />
- <ref bean="queryReferenceRewrite" />
+ <ref bean="queryReferenceRewrite" />
</util:list>
-
- <bean id="rewriteHandler" class="de.ids_mannheim.korap.rewrite.RewriteHandler">
- <constructor-arg ref="rewriteTasks"/>
+
+ <bean id="rewriteHandler"
+ class="de.ids_mannheim.korap.rewrite.RewriteHandler">
+ <constructor-arg ref="rewriteTasks" />
</bean>
- <bean id="kustvaktResponseHandler" class="de.ids_mannheim.korap.web.KustvaktResponseHandler">
+ <bean id="kustvaktResponseHandler"
+ class="de.ids_mannheim.korap.web.KustvaktResponseHandler">
</bean>
<!-- OAuth -->
- <bean id="oauth2ResponseHandler" class="de.ids_mannheim.korap.web.OAuth2ResponseHandler">
+ <bean id="oauth2ResponseHandler"
+ class="de.ids_mannheim.korap.web.OAuth2ResponseHandler">
</bean>
- <bean id="kustvakt_userdb" class="de.ids_mannheim.korap.handlers.EntityDao">
+ <bean id="kustvakt_userdb"
+ class="de.ids_mannheim.korap.handlers.EntityDao">
<constructor-arg ref="kustvakt_db" />
</bean>
- <bean name="kustvakt_encryption" class="de.ids_mannheim.korap.encryption.KustvaktEncryption">
+ <bean name="kustvakt_encryption"
+ class="de.ids_mannheim.korap.encryption.KustvaktEncryption">
<constructor-arg ref="kustvakt_config" />
</bean>
@@ -234,8 +264,10 @@
<constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration"
ref="kustvakt_config" /> </bean> -->
- <bean id="ldap_auth" class="de.ids_mannheim.korap.authentication.LdapAuth3">
- <constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration"
+ <bean id="ldap_auth"
+ class="de.ids_mannheim.korap.authentication.LdapAuth3">
+ <constructor-arg
+ type="de.ids_mannheim.korap.config.KustvaktConfiguration"
ref="kustvakt_config" />
</bean>
@@ -245,32 +277,33 @@
<bean id="session_auth"
class="de.ids_mannheim.korap.authentication.SessionAuthentication">
- <constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration"
+ <constructor-arg
+ type="de.ids_mannheim.korap.config.KustvaktConfiguration"
ref="kustvakt_config" />
- <constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface"
+ <constructor-arg
+ type="de.ids_mannheim.korap.interfaces.EncryptionIface"
ref="kustvakt_encryption" />
</bean>
<bean id="oauth2_auth"
class="de.ids_mannheim.korap.authentication.OAuth2Authentication" />
-
+
<util:list id="kustvakt_authproviders"
value-type="de.ids_mannheim.korap.interfaces.AuthenticationIface">
<ref bean="basic_auth" />
<ref bean="ldap_auth" />
- <!--
- <ref bean="session_auth" />
- <ref bean="api_auth" />
- -->
+ <!-- <ref bean="session_auth" /> <ref bean="api_auth" /> -->
<ref bean="oauth2_auth" />
</util:list>
- <bean id="userdata_details" class="de.ids_mannheim.korap.handlers.UserDetailsDao">
+ <bean id="userdata_details"
+ class="de.ids_mannheim.korap.handlers.UserDetailsDao">
<constructor-arg ref="kustvakt_db" />
</bean>
- <bean id="userdata_settings" class="de.ids_mannheim.korap.handlers.UserSettingsDao">
+ <bean id="userdata_settings"
+ class="de.ids_mannheim.korap.handlers.UserSettingsDao">
<constructor-arg ref="kustvakt_db" />
</bean>
@@ -283,16 +316,18 @@
<!-- specify type for constructor argument -->
<bean id="authenticationManager"
class="de.ids_mannheim.korap.authentication.KustvaktAuthenticationManager">
- <constructor-arg type="de.ids_mannheim.korap.interfaces.EntityHandlerIface"
+ <constructor-arg
+ type="de.ids_mannheim.korap.interfaces.EntityHandlerIface"
ref="kustvakt_userdb" />
- <constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface"
+ <constructor-arg
+ type="de.ids_mannheim.korap.interfaces.EncryptionIface"
ref="kustvakt_encryption" />
<constructor-arg ref="kustvakt_config" />
<constructor-arg ref="kustvakt_userdata" />
<!-- inject authentication providers to use -->
<property name="providers" ref="kustvakt_authproviders" />
</bean>
-
+
<!-- todo: if db interfaces not loaded via spring, does transaction even
work then? -->
<!-- the transactional advice (i.e. what 'happens'; see the <aop:advisor/>
@@ -301,7 +336,8 @@
<!-- the transactional semantics... -->
<tx:attributes>
<!-- all methods starting with 'get' are read-only -->
- <tx:method name="get*" read-only="true" rollback-for="KorAPException" />
+ <tx:method name="get*" read-only="true"
+ rollback-for="KorAPException" />
<!-- other methods use the default transaction settings (see below) -->
<tx:method name="*" rollback-for="KorAPException" />
</tx:attributes>
@@ -323,11 +359,13 @@
</bean>
<!-- mail -->
- <bean id="authenticator" class="de.ids_mannheim.korap.service.MailAuthenticator">
+ <bean id="authenticator"
+ class="de.ids_mannheim.korap.service.MailAuthenticator">
<constructor-arg index="0" value="${mail.username}" />
<constructor-arg index="1" value="${mail.password}" />
</bean>
- <bean id="smtpSession" class="jakarta.mail.Session" factory-method="getInstance">
+ <bean id="smtpSession" class="jakarta.mail.Session"
+ factory-method="getInstance">
<constructor-arg index="0">
<props>
<prop key="mail.smtp.submitter">${mail.username}</prop>
@@ -340,12 +378,14 @@
</constructor-arg>
<constructor-arg index="1" ref="authenticator" />
</bean>
- <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
+ <bean id="mailSender"
+ class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="username" value="${mail.username}" />
<property name="password" value="${mail.password}" />
<property name="session" ref="smtpSession" />
</bean>
- <bean id="velocityEngine" class="org.apache.velocity.app.VelocityEngine">
+ <bean id="velocityEngine"
+ class="org.apache.velocity.app.VelocityEngine">
<constructor-arg index="0">
<props>
<prop key="resource.loader">class</prop>
diff --git a/full/src/main/resources/default-config.xml b/full/src/main/resources/default-config.xml
index 36925cb..073bf26 100644
--- a/full/src/main/resources/default-config.xml
+++ b/full/src/main/resources/default-config.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util"
- xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:p="http://www.springframework.org/schema/p"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xmlns="http://www.springframework.org/schema/beans"
+ xmlns:context="http://www.springframework.org/schema/context"
xmlns:cache="http://www.springframework.org/schema/cache"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
@@ -15,7 +18,8 @@
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
- <context:component-scan base-package="de.ids_mannheim.korap" />
+ <context:component-scan
+ base-package="de.ids_mannheim.korap" />
<context:annotation-config />
<bean id="props"
@@ -46,18 +50,15 @@
</property>
</bean>
- <!-- <bean id='cacheManager' class='org.springframework.cache.ehcache.EhCacheCacheManager'
- p:cacheManager-ref='ehcache' />
-
- <bean id='ehcache'
- class='org.springframework.cache.ehcache.EhCacheManagerFactoryBean'
- p:configLocation='classpath:ehcache.xml' p:shared='true' />
- -->
+ <!-- <bean id='cacheManager' class='org.springframework.cache.ehcache.EhCacheCacheManager'
+ p:cacheManager-ref='ehcache' /> <bean id='ehcache' class='org.springframework.cache.ehcache.EhCacheManagerFactoryBean'
+ p:configLocation='classpath:ehcache.xml' p:shared='true' /> -->
<!--class="org.apache.commons.dbcp2.BasicDataSource" -->
<!-- org.springframework.jdbc.datasource.SingleConnectionDataSource -->
- <bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource"
- lazy-init="true">
- <property name="driverClassName" value="${jdbc.driverClassName}" />
+ <bean id="dataSource"
+ class="org.apache.commons.dbcp2.BasicDataSource" lazy-init="true">
+ <property name="driverClassName"
+ value="${jdbc.driverClassName}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
@@ -70,8 +71,9 @@
<property name="maxWaitMillis" value="-1" />
<!--<property name="poolPreparedStatements" value="true"/> -->
</bean>
-
- <bean id="c3p0DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
+
+ <bean id="c3p0DataSource"
+ class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close" lazy-init="true">
<property name="driverClass" value="${jdbc.driverClassName}" />
<property name="jdbcUrl" value="${jdbc.url}" />
@@ -88,7 +90,8 @@
<bean id="sqliteDataSource"
class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
lazy-init="true">
- <property name="driverClassName" value="${jdbc.driverClassName}" />
+ <property name="driverClassName"
+ value="${jdbc.driverClassName}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
@@ -107,26 +110,29 @@
</bean>
<!-- to configure database for sqlite, mysql, etc. migrations -->
- <bean id="flywayConfig" class="org.flywaydb.core.api.configuration.ClassicConfiguration">
+ <bean id="flywayConfig"
+ class="org.flywaydb.core.api.configuration.ClassicConfiguration">
<property name="baselineOnMigrate" value="true" />
<!-- <property name="validateOnMigrate" value="false" /> -->
<!-- <property name="cleanOnValidationError" value="true" /> -->
- <property name="locations" value="#{'${jdbc.schemaPath}'.split(',')}"/>
+ <property name="locations"
+ value="#{'${jdbc.schemaPath}'.split(',')}" />
<property name="dataSource" ref="dataSource" />
<!-- <property name="dataSource" ref="sqliteDataSource" /> -->
<!-- <property name="dataSource" ref="c3p0DataSource" /> -->
<property name="outOfOrder" value="true" />
</bean>
-
- <bean id="flyway" class="org.flywaydb.core.Flyway" init-method="migrate">
- <constructor-arg ref="flywayConfig"/>
+
+ <bean id="flyway" class="org.flywaydb.core.Flyway"
+ init-method="migrate">
+ <constructor-arg ref="flywayConfig" />
</bean>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
depends-on="flyway">
<property name="dataSource" ref="dataSource" />
- <!-- <property name="dataSource" ref="sqliteDataSource" /> -->
+ <!-- <property name="dataSource" ref="sqliteDataSource" /> -->
<!-- <property name="dataSource" ref="c3p0DataSource" /> -->
<property name="packagesToScan">
@@ -139,7 +145,8 @@
<property name="jpaVendorAdapter">
<bean id="jpaVendorAdapter"
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
- <property name="databasePlatform" value="${hibernate.dialect}" />
+ <property name="databasePlatform"
+ value="${hibernate.dialect}" />
</bean>
</property>
<property name="jpaProperties">
@@ -160,8 +167,10 @@
<tx:annotation-driven proxy-target-class="true"
transaction-manager="transactionManager" />
- <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory" />
+ <bean id="transactionManager"
+ class="org.springframework.orm.jpa.JpaTransactionManager">
+ <property name="entityManagerFactory"
+ ref="entityManagerFactory" />
</bean>
<bean id="transactionTemplate"
@@ -171,94 +180,103 @@
<!-- Data access objects -->
<bean id="adminDao" class="de.ids_mannheim.korap.dao.AdminDaoImpl" />
- <bean id="authorizationDao" class="de.ids_mannheim.korap.oauth2.dao.CachedAuthorizationDaoImpl" />
+ <bean id="authorizationDao"
+ class="de.ids_mannheim.korap.oauth2.dao.CachedAuthorizationDaoImpl" />
<!-- Filters -->
- <!-- <bean id="authenticationFilter" class="de.ids_mannheim.korap.web.filter.AuthenticationFilter" >
- <property name="authenticationManager" ref="kustvakt_authenticationmanager"/>
- </bean>
- <bean id="piwikFilter" class="de.ids_mannheim.korap.web.filter.PiwikFilter" >
- <property name="authenticationManager" ref="kustvakt_authenticationmanager"/>
- </bean> -->
-
+ <!-- <bean id="authenticationFilter" class="de.ids_mannheim.korap.web.filter.AuthenticationFilter"
+ > <property name="authenticationManager" ref="kustvakt_authenticationmanager"/>
+ </bean> <bean id="piwikFilter" class="de.ids_mannheim.korap.web.filter.PiwikFilter"
+ > <property name="authenticationManager" ref="kustvakt_authenticationmanager"/>
+ </bean> -->
+
<!-- Services -->
- <bean id="scopeService" class="de.ids_mannheim.korap.oauth2.service.OAuth2ScopeServiceImpl" />
-
+ <bean id="scopeService"
+ class="de.ids_mannheim.korap.oauth2.service.OAuth2ScopeServiceImpl" />
+
<!-- props are injected from default-config.xml -->
- <bean id="kustvakt_config" class="de.ids_mannheim.korap.config.FullConfiguration">
+ <bean id="kustvakt_config"
+ class="de.ids_mannheim.korap.config.FullConfiguration">
<constructor-arg name="properties" ref="props" />
</bean>
- <bean id="initializator" class="de.ids_mannheim.korap.init.Initializator"
- init-method="init">
+ <bean id="initializator"
+ class="de.ids_mannheim.korap.init.Initializator" init-method="init">
</bean>
-
+
<!-- Krill -->
- <bean id="search_krill" class="de.ids_mannheim.korap.web.SearchKrill">
+ <bean id="search_krill"
+ class="de.ids_mannheim.korap.web.SearchKrill">
<constructor-arg value="${krill.indexDir}" />
</bean>
-
+
<!-- Validator -->
- <bean id="validator" class="de.ids_mannheim.korap.validator.ApacheValidator"/>
+ <bean id="validator"
+ class="de.ids_mannheim.korap.validator.ApacheValidator" />
<!-- URLValidator -->
- <bean id="redirectURIValidator" class="org.apache.commons.validator.routines.UrlValidator">
+ <bean id="redirectURIValidator"
+ class="org.apache.commons.validator.routines.UrlValidator">
<constructor-arg value="http,https" index="0" />
- <constructor-arg index="1" type="long"
- value="#{T(org.apache.commons.validator.routines.UrlValidator).ALLOW_LOCAL_URLS +
- T(org.apache.commons.validator.routines.UrlValidator).NO_FRAGMENTS}"/>
-
- <!-- <constructor-arg index="1" type="long">
- <util:constant
- static-field="org.apache.commons.validator.routines.UrlValidator.NO_FRAGMENTS" />
- </constructor-arg> -->
+ <constructor-arg index="1" type="long"
+ value="#{T(org.apache.commons.validator.routines.UrlValidator).ALLOW_LOCAL_URLS +
+ T(org.apache.commons.validator.routines.UrlValidator).NO_FRAGMENTS}" />
+
+ <!-- <constructor-arg index="1" type="long"> <util:constant static-field="org.apache.commons.validator.routines.UrlValidator.NO_FRAGMENTS"
+ /> </constructor-arg> -->
</bean>
- <bean id="urlValidator" class="org.apache.commons.validator.routines.UrlValidator">
+ <bean id="urlValidator"
+ class="org.apache.commons.validator.routines.UrlValidator">
<constructor-arg value="http,https" />
</bean>
-
+
<!-- Rewrite -->
- <bean id="foundryRewrite" class="de.ids_mannheim.korap.rewrite.FoundryRewrite"/>
- <bean id="collectionRewrite" class="de.ids_mannheim.korap.rewrite.CollectionRewrite"/>
- <bean id="virtualCorpusRewrite" class="de.ids_mannheim.korap.rewrite.VirtualCorpusRewrite"/>
- <bean id="queryReferenceRewrite" class="de.ids_mannheim.korap.rewrite.QueryReferenceRewrite"/>
-
+ <bean id="foundryRewrite"
+ class="de.ids_mannheim.korap.rewrite.FoundryRewrite" />
+ <bean id="collectionRewrite"
+ class="de.ids_mannheim.korap.rewrite.CollectionRewrite" />
+ <bean id="virtualCorpusRewrite"
+ class="de.ids_mannheim.korap.rewrite.VirtualCorpusRewrite" />
+ <bean id="queryReferenceRewrite"
+ class="de.ids_mannheim.korap.rewrite.QueryReferenceRewrite" />
+
<util:list id="rewriteTasks"
value-type="de.ids_mannheim.korap.rewrite.RewriteTask">
<ref bean="foundryRewrite" />
<ref bean="collectionRewrite" />
<ref bean="virtualCorpusRewrite" />
- <ref bean="queryReferenceRewrite" />
+ <ref bean="queryReferenceRewrite" />
</util:list>
-
- <bean id="rewriteHandler" class="de.ids_mannheim.korap.rewrite.RewriteHandler">
- <constructor-arg ref="rewriteTasks"/>
+
+ <bean id="rewriteHandler"
+ class="de.ids_mannheim.korap.rewrite.RewriteHandler">
+ <constructor-arg ref="rewriteTasks" />
</bean>
- <bean id="kustvaktResponseHandler" class="de.ids_mannheim.korap.web.KustvaktResponseHandler">
+ <bean id="kustvaktResponseHandler"
+ class="de.ids_mannheim.korap.web.KustvaktResponseHandler">
</bean>
<!-- OAuth -->
- <bean id="oauth2ResponseHandler" class="de.ids_mannheim.korap.web.OAuth2ResponseHandler">
+ <bean id="oauth2ResponseHandler"
+ class="de.ids_mannheim.korap.web.OAuth2ResponseHandler">
</bean>
- <bean name="kustvakt_encryption" class="de.ids_mannheim.korap.encryption.KustvaktEncryption">
+ <bean name="kustvakt_encryption"
+ class="de.ids_mannheim.korap.encryption.KustvaktEncryption">
<constructor-arg ref="kustvakt_config" />
</bean>
<!-- authentication providers to use -->
- <!-- <bean id="session_auth"
- class="de.ids_mannheim.korap.authentication.SessionAuthentication">
- <constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration"
- ref="kustvakt_config" />
- <constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface"
- ref="kustvakt_encryption" />
- </bean> -->
+ <!-- <bean id="session_auth" class="de.ids_mannheim.korap.authentication.SessionAuthentication">
+ <constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration"
+ ref="kustvakt_config" /> <constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface"
+ ref="kustvakt_encryption" /> </bean> -->
<bean id="oauth2_auth"
class="de.ids_mannheim.korap.authentication.OAuth2Authentication" />
-
+
<util:list id="kustvakt_authproviders"
value-type="de.ids_mannheim.korap.interfaces.AuthenticationIface">
<!-- <ref bean="session_auth" /> -->
@@ -269,13 +287,14 @@
<!-- specify type for constructor argument -->
<bean id="authenticationManager"
class="de.ids_mannheim.korap.authentication.KustvaktAuthenticationManager">
- <constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface"
+ <constructor-arg
+ type="de.ids_mannheim.korap.interfaces.EncryptionIface"
ref="kustvakt_encryption" />
<constructor-arg ref="kustvakt_config" />
<!-- inject authentication providers to use -->
<property name="providers" ref="kustvakt_authproviders" />
</bean>
-
+
<!-- todo: if db interfaces not loaded via spring, does transaction even
work then? -->
<!-- the transactional advice (i.e. what 'happens'; see the <aop:advisor/>
@@ -284,7 +303,8 @@
<!-- the transactional semantics... -->
<tx:attributes>
<!-- all methods starting with 'get' are read-only -->
- <tx:method name="get*" read-only="true" rollback-for="KorAPException" />
+ <tx:method name="get*" read-only="true"
+ rollback-for="KorAPException" />
<!-- other methods use the default transaction settings (see below) -->
<tx:method name="*" rollback-for="KorAPException" />
</tx:attributes>
@@ -307,11 +327,13 @@
</bean>
<!-- mail -->
- <bean id="authenticator" class="de.ids_mannheim.korap.service.MailAuthenticator">
+ <bean id="authenticator"
+ class="de.ids_mannheim.korap.service.MailAuthenticator">
<constructor-arg index="0" value="${mail.username}" />
<constructor-arg index="1" value="${mail.password}" />
</bean>
- <bean id="smtpSession" class="jakarta.mail.Session" factory-method="getInstance">
+ <bean id="smtpSession" class="jakarta.mail.Session"
+ factory-method="getInstance">
<constructor-arg index="0">
<props>
<prop key="mail.smtp.submitter">${mail.username}</prop>
@@ -324,12 +346,14 @@
</constructor-arg>
<constructor-arg index="1" ref="authenticator" />
</bean>
- <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
+ <bean id="mailSender"
+ class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="username" value="${mail.username}" />
<property name="password" value="${mail.password}" />
<property name="session" ref="smtpSession" />
</bean>
- <bean id="velocityEngine" class="org.apache.velocity.app.VelocityEngine">
+ <bean id="velocityEngine"
+ class="org.apache.velocity.app.VelocityEngine">
<constructor-arg index="0">
<props>
<prop key="resource.loader">class</prop>
diff --git a/full/src/main/resources/default-lite-config.xml b/full/src/main/resources/default-lite-config.xml
index 8069c8e..da27995 100644
--- a/full/src/main/resources/default-lite-config.xml
+++ b/full/src/main/resources/default-lite-config.xml
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
- xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
@@ -11,7 +13,8 @@
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
- <context:component-scan base-package="
+ <context:component-scan
+ base-package="
de.ids_mannheim.korap.core.service,
de.ids_mannheim.korap.core.web,
de.ids_mannheim.korap.web.filter,
@@ -44,8 +47,10 @@
</property>
</bean>
- <bean id="config" class="de.ids_mannheim.korap.config.KustvaktConfiguration">
- <constructor-arg index="0" name="properties" ref="properties" />
+ <bean id="config"
+ class="de.ids_mannheim.korap.config.KustvaktConfiguration">
+ <constructor-arg index="0" name="properties"
+ ref="properties" />
</bean>
<!-- Database -->
@@ -53,7 +58,8 @@
<bean id="sqliteDataSource"
class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
lazy-init="true">
- <property name="driverClassName" value="${jdbc.driverClassName}" />
+ <property name="driverClassName"
+ value="${jdbc.driverClassName}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
@@ -70,19 +76,22 @@
<!--<property name="initialSize" value="2"/> -->
<!--<property name="poolPreparedStatements" value="true"/> -->
</bean>
- <bean id="flywayConfig" class="org.flywaydb.core.api.configuration.ClassicConfiguration">
+ <bean id="flywayConfig"
+ class="org.flywaydb.core.api.configuration.ClassicConfiguration">
<property name="baselineOnMigrate" value="true" />
<!-- <property name="validateOnMigrate" value="false" /> -->
<!-- <property name="cleanOnValidationError" value="true" /> -->
- <property name="locations" value="#{'${jdbc.schemaPath}'.split(',')}"/>
+ <property name="locations"
+ value="#{'${jdbc.schemaPath}'.split(',')}" />
<property name="dataSource" ref="sqliteDataSource" />
<property name="outOfOrder" value="true" />
</bean>
-
- <bean id="flyway" class="org.flywaydb.core.Flyway" init-method="migrate">
- <constructor-arg ref="flywayConfig"/>
+
+ <bean id="flyway" class="org.flywaydb.core.Flyway"
+ init-method="migrate">
+ <constructor-arg ref="flywayConfig" />
</bean>
-
+
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
@@ -96,7 +105,8 @@
<property name="jpaVendorAdapter">
<bean id="jpaVendorAdapter"
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
- <property name="databasePlatform" value="${hibernate.dialect}" />
+ <property name="databasePlatform"
+ value="${hibernate.dialect}" />
</bean>
</property>
<property name="jpaProperties">
@@ -116,8 +126,10 @@
<tx:annotation-driven proxy-target-class="true"
transaction-manager="transactionManager" />
- <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory" />
+ <bean id="transactionManager"
+ class="org.springframework.orm.jpa.JpaTransactionManager">
+ <property name="entityManagerFactory"
+ ref="entityManagerFactory" />
</bean>
<bean id="transactionTemplate"
@@ -130,18 +142,17 @@
</bean>
<!-- Initialization -->
- <!--
- <bean id="annotationParser" class="de.ids_mannheim.korap.annotation.AnnotationParser"
- scope="singleton" />
- -->
+ <!-- <bean id="annotationParser" class="de.ids_mannheim.korap.annotation.AnnotationParser"
+ scope="singleton" /> -->
<!-- Search Engine -->
- <bean id="search_krill" class="de.ids_mannheim.korap.web.SearchKrill">
+ <bean id="search_krill"
+ class="de.ids_mannheim.korap.web.SearchKrill">
<constructor-arg value="${krill.indexDir}" />
</bean>
-
+
<!-- Filters -->
- <!-- <bean id="APIVersionFilter" class="de.ids_mannheim.korap.web.APIVersionFilter"
+ <!-- <bean id="APIVersionFilter" class="de.ids_mannheim.korap.web.APIVersionFilter"
scope="singleton" /> -->
<!-- Authentication -->
@@ -149,37 +160,42 @@
class="de.ids_mannheim.korap.authentication.DummyAuthenticationManager" />
<!-- Response handler -->
- <bean id="kustvaktResponseHandler" class="de.ids_mannheim.korap.web.KustvaktResponseHandler">
+ <bean id="kustvaktResponseHandler"
+ class="de.ids_mannheim.korap.web.KustvaktResponseHandler">
</bean>
<!-- Controllers -->
- <!-- added via component-scan
- <bean id="annotationController"
- class="de.ids_mannheim.korap.web.controller.AnnotationController" />
- <bean id="searchController" class="de.ids_mannheim.korap.web.controller.SearchController" />
- <bean id="statisticController"
- class="de.ids_mannheim.korap.web.controller.StatisticController" />
- -->
+ <!-- added via component-scan <bean id="annotationController" class="de.ids_mannheim.korap.web.controller.AnnotationController"
+ /> <bean id="searchController" class="de.ids_mannheim.korap.web.controller.SearchController"
+ /> <bean id="statisticController" class="de.ids_mannheim.korap.web.controller.StatisticController"
+ /> -->
<!-- Services -->
<bean id="scopeService"
class="de.ids_mannheim.korap.oauth2.service.DummyOAuth2ScopeServiceImpl" />
<!-- DAO -->
- <bean id="adminDao" class="de.ids_mannheim.korap.dao.DummyAdminDaoImpl" />
- <bean id="annotationDao" class="de.ids_mannheim.korap.dao.AnnotationDao" />
+ <bean id="adminDao"
+ class="de.ids_mannheim.korap.dao.DummyAdminDaoImpl" />
+ <bean id="annotationDao"
+ class="de.ids_mannheim.korap.dao.AnnotationDao" />
<!-- DTO Converter -->
- <bean id="annotationConverter" class="de.ids_mannheim.korap.dto.converter.AnnotationConverter" />
+ <bean id="annotationConverter"
+ class="de.ids_mannheim.korap.dto.converter.AnnotationConverter" />
<!-- Rewrite -->
- <bean id="layerMapper" class="de.ids_mannheim.korap.rewrite.LayerMapper" />
- <bean id="foundryInject" class="de.ids_mannheim.korap.rewrite.FoundryInject" />
+ <bean id="layerMapper"
+ class="de.ids_mannheim.korap.rewrite.LayerMapper" />
+ <bean id="foundryInject"
+ class="de.ids_mannheim.korap.rewrite.FoundryInject" />
- <util:list id="rewriteTasks" value-type="de.ids_mannheim.korap.rewrite.RewriteTask">
+ <util:list id="rewriteTasks"
+ value-type="de.ids_mannheim.korap.rewrite.RewriteTask">
<ref bean="foundryInject" />
</util:list>
-
- <bean id="rewriteHandler" class="de.ids_mannheim.korap.rewrite.RewriteHandler">
+
+ <bean id="rewriteHandler"
+ class="de.ids_mannheim.korap.rewrite.RewriteHandler">
<constructor-arg ref="rewriteTasks" />
</bean>
</beans>
\ No newline at end of file
diff --git a/full/src/main/resources/ehcache.xml b/full/src/main/resources/ehcache.xml
index 22f2f55..077e260 100644
--- a/full/src/main/resources/ehcache.xml
+++ b/full/src/main/resources/ehcache.xml
@@ -1,43 +1,29 @@
-<ehcache xsi:noNamespaceSchemaLocation="http://www.ehcache.org/ehcache.xsd"
+<ehcache
+ xsi:noNamespaceSchemaLocation="http://www.ehcache.org/ehcache.xsd"
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
-
- <defaultCache eternal='true' overflowToDisk='false'/>
- <!--maxBytesLocalHeap="200M"-->
- <diskStore path="./cache_store"/>
-
-
- <!-- EM -->
- <cache name='authorization'
- timeToLiveSeconds="1000"
- eternal='false'
- memoryStoreEvictionPolicy="LRU"
- maxEntriesLocalHeap="100"
- overflowToDisk='false'/>
-
- <cache name='access_token'
- timeToIdleSeconds="3600"
- timeToLiveSeconds="15000"
- eternal='false'
- memoryStoreEvictionPolicy="LRU"
- maxEntriesLocalHeap="500"
- overflowToDisk='false'/>
-
- <!-- <cache name="named_vc"
- eternal="true"
- memoryStoreEvictionPolicy="LRU"
- maxBytesLocalHeap="256M"
- maxBytesLocalDisk="2G"
- diskExpiryThreadIntervalSeconds = "120" >
- <persistence strategy="localTempSwap"/>
- <sizeOfPolicy maxDepth="3000" maxDepthExceededBehavior="abort" />
- -->
-
- <cache name="total_results"
- timeToIdleSeconds="3600"
- timeToLiveSeconds="15000"
- eternal='false'
- memoryStoreEvictionPolicy="LRU"
- overflowToDisk='false'
- maxEntriesLocalHeap="500"
- />
+
+ <defaultCache eternal='true' overflowToDisk='false' />
+ <!--maxBytesLocalHeap="200M" -->
+ <diskStore path="./cache_store" />
+
+
+ <!-- EM -->
+ <cache name='authorization' timeToLiveSeconds="1000"
+ eternal='false' memoryStoreEvictionPolicy="LRU"
+ maxEntriesLocalHeap="100" overflowToDisk='false' />
+
+ <cache name='access_token' timeToIdleSeconds="3600"
+ timeToLiveSeconds="15000" eternal='false'
+ memoryStoreEvictionPolicy="LRU" maxEntriesLocalHeap="500"
+ overflowToDisk='false' />
+
+ <!-- <cache name="named_vc" eternal="true" memoryStoreEvictionPolicy="LRU"
+ maxBytesLocalHeap="256M" maxBytesLocalDisk="2G" diskExpiryThreadIntervalSeconds
+ = "120" > <persistence strategy="localTempSwap"/> <sizeOfPolicy maxDepth="3000"
+ maxDepthExceededBehavior="abort" /> -->
+
+ <cache name="total_results" timeToIdleSeconds="3600"
+ timeToLiveSeconds="15000" eternal='false'
+ memoryStoreEvictionPolicy="LRU" overflowToDisk='false'
+ maxEntriesLocalHeap="500" />
</ehcache>