-The project uses Maven2 and AspectJ.\r
+The project uses Maven3 and AspectJ.\r
\r
-Please see http://dev.e-taxonomy.eu/trac/wiki/CdmLibrary for details on installation and usage\r
+Please see https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmLibrary for details on installation and usage\r
The project uses Maven3.
-Please see http://dev.e-taxonomy.eu/trac/wiki/CdmLibrary for details on installation and usage
+Please see https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmLibrary for details on installation and usage
-The project uses Maven2 and AspectJ.\r
+The project uses Maven3 and AspectJ.\r
\r
-Please see http://dev.e-taxonomy.eu/trac/wiki/CdmLibrary for details on installation and usage\r
+Please see https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmLibrary for details on installation and usage\r
* For reference see:
* <ul>
* <li>{@link http://ww2.bgbm.org/EuroPlusMed/explanations.asp}</li>
- * <li>{@link http://dev.e-taxonomy.eu/trac/ticket/3907}</li>
+ * <li>{@link https://dev.e-taxonomy.eu/redmine/issues/3907}</li>
* </ul>
*/
EuroPlusMed("EuroPlusMed", "Euro + Med"),
-The project uses Maven2 and AspectJ.\r
+The project uses Maven3 and AspectJ.\r
\r
-Please see http://dev.e-taxonomy.eu/trac/wiki/CdmLibrary for details on installation and usage\r
+Please see https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmLibrary for details on installation and usage\r
The project uses Maven2 and AspectJ.\r
\r
-Please see http://dev.e-taxonomy.eu/trac/wiki/CdmLibrary for details on installation and usage\r
+Please see https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmLibrary for details on installation and usage\r
<h2>Related Documentation</h2>\r
\r
<ul>\r
- <li><a href="http://dev.e-taxonomy.eu/trac/wiki/CommonDataModel">EDIT Developer Wiki</a></li>\r
+ <li><a href="https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CommonDataModel">EDIT Developer Wiki</a></li>\r
</ul>\r
\r
<a name="uml_diagrams"/>\r
\r
TODO use TDWG Vocabulary instead: http://rs.tdwg.org/ontology/voc/Collection.rdf#SpecimenPreservationMethodTypeTerm\r
\r
-https://dev.e-taxonomy.eu/trac/ticket/3715\r
+https://dev.e-taxonomy.eu/redmine/issues/3715\r
\r
-The project uses Maven2 and AspectJ.\r
+The project uses Maven3 and AspectJ.\r
\r
-Please see http://dev.e-taxonomy.eu/trac/wiki/CdmLibrary for details on installation and usage\r
+Please see https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmLibrary for details on installation and usage\r
*\r
* The contents of this file are subject to the Mozilla Public License Version 1.1\r
* See LICENSE.TXT at the top of this package for the full license terms.\r
-*/ \r
+*/\r
\r
package eu.etaxonomy.cdm.database;\r
\r
\r
/**\r
* A simple RoutingDataSource.\r
- * Bean definitions must set the key of the default datasource to "default" \r
+ * Bean definitions must set the key of the default datasource to "default"\r
* This String is defined in the contant <code>DEFAULT_DATASOURCE_KEY</code> and will\r
- * be used when the RoutingDataSource is beeing updated with a new <code>Map</code> \r
+ * be used when the RoutingDataSource is beeing updated with a new <code>Map</code>\r
* of data sources.\r
* <p>\r
* <b>Example of bean definition:</b>\r
<property name="defaultTargetDataSource" ref="defaultDataSource"/>\r
</bean>\r
</pre>\r
- * \r
+ *\r
* @author a.kohlbecker\r
- * @deprecated<b>NOTICE:</b> \r
- * <em>This class is related to the switchable database infrastructure which allows to serve \r
- * multiple databases with only a single instance of the cdm-remote-webapp. \r
+ * @deprecated<b>NOTICE:</b>\r
+ * <em>This class is related to the switchable database infrastructure which allows to serve\r
+ * multiple databases with only a single instance of the cdm-remote-webapp.\r
* This concept however is deprecated due to several problems of which the most severe is the term loading issue.\r
- * This class should however not deleted since we once might wish to switch back to this concept when we are \r
- * able to deal with the implicated issues. \r
- * \r
- * See http://dev.e-taxonomy.eu/trac/wiki/CdmServerSwitchableDataSources for more information.</em>\r
+ * This class should however not deleted since we once might wish to switch back to this concept when we are\r
+ * able to deal with the implicated issues.\r
+ *\r
+ * See https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmServerSwitchableDataSources for more information.</em>\r
*/\r
@Deprecated\r
public class UpdatableRoutingDataSource extends AbstractRoutingDataSource {\r
- \r
+\r
\r
private String defaultDatasourceName = "default";\r
\r
protected Object determineCurrentLookupKey() {\r
return NamedContextHolder.getContextKey();\r
}\r
- \r
+\r
@Override\r
public void afterPropertiesSet() {\r
updateDataSources();\r
// super.afterPropertiesSet() is called by updateRoutingDataSource()\r
}\r
- \r
+\r
public void setDefaultDatasourceName(String name){\r
this.defaultDatasourceName = name;\r
}\r
- \r
- \r
\r
- \r
+\r
+\r
+\r
public Map<String, DataSourceInfo> updateDataSources() {\r
- \r
+\r
logger.info("loading & testing datasources .. ");\r
Map<String,SimpleDriverDataSource> dataSources = loadDataSources();\r
Map<String, DataSourceInfo> dataSourceInfos = testDataSources(dataSources);\r
- \r
+\r
setTargetDataSources((Map)dataSources);\r
DataSource defaultDatasource = dataSources.get(defaultDatasourceName);\r
if(defaultDatasource == null) {\r
}\r
setDefaultTargetDataSource(defaultDatasource);\r
super.afterPropertiesSet();\r
- \r
+\r
return dataSourceInfos;\r
}\r
- \r
+\r
protected Map<String, SimpleDriverDataSource> loadDataSources(){\r
return DataSourceBeanLoader.loadDataSources(SimpleDriverDataSource.class);\r
}\r
* @return\r
*/\r
protected Map<String, DataSourceInfo> testDataSources(Map<String, SimpleDriverDataSource> dataSources) {\r
- \r
+\r
Map<String, DataSourceInfo> dataSourceInfos = new HashMap<String, DataSourceInfo>();\r
\r
for(String key : dataSources.keySet()){\r
logger.info(" /" + key + " => "+ datasource.getUrl() + "[ "+(sqlerror == null ? "OK" : "ERROR: " + sqlerror) + " ]");\r
dataSourceInfos.put(key, dsi);\r
}\r
- \r
+\r
return dataSourceInfos;\r
}\r
\r
// added for compatibility with Java 7\r
- public Logger getParentLogger() /* throws SQLFeatureNotSupportedException (is not compatibel with parent class in Java 6)*/ {\r
+ @Override\r
+ public Logger getParentLogger() /* throws SQLFeatureNotSupportedException (is not compatibel with parent class in Java 6)*/ {\r
// TODO Auto-generated method stub\r
return null;\r
}\r
}\r
\r
/**\r
- * See <a href="http://dev.e-taxonomy.eu/trac/wiki/CdmClassificationRankSpecificRootnodes">\r
- * http://dev.e-taxonomy.eu/trac/wiki/CdmClassificationRankSpecificRootnodes</a>\r
+ * See <a href="https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmClassificationRankSpecificRootnodes">\r
+ * https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmClassificationRankSpecificRootnodes</a>\r
*\r
* @param classification\r
* @param rank\r
* associated with the next lower Rank is taken as root node. If the\r
* <code>rank</code> is null the absolute root nodes will be returned.\r
* <p>\r
- * See <a href="http://dev.e-taxonomy.eu/trac/wiki/CdmClassificationRankSpecificRootnodes">http://dev.e-taxonomy.eu/trac/wiki/CdmClassificationRankSpecificRootnodes</a>\r
+ * See <a href="https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmClassificationRankSpecificRootnodes">https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmClassificationRankSpecificRootnodes</a>\r
* <p>\r
* Since this method is using two queries which need to be run sequentially\r
* the handling of limit and start is more complex and requires the total\r
This property causes problems in tests as the table\r
is not found in the test database. Maybe we can fix \r
this one day.\r
- see also http://dev.e-taxonomy.eu/trac/ticket/3344\r
+ see also https://dev.e-taxonomy.eu/redmine/issues/3344\r
-->\r
\r
<!--\r
<artifactId>cdmlib-remote</artifactId>
<exclusions>
<!-- exclude all jdbc drivers from the war. Jdbc drivers must only
- be added to {APPLICATION_CONTAINER}/lib see http://dev.e-taxonomy.eu/trac/ticket/4955
+ be added to {APPLICATION_CONTAINER}/lib see https://dev.e-taxonomy.eu/redmine/issues/4955
and http://stackoverflow.com/questions/6981564/why-must-the-jdbc-driver-be-put-in-tomcat-home-lib-folder -->
<exclusion>
<groupId>eu.etaxonomy</groupId>
* <h3>NOTE:</h3>
* For a detailed overview on the spring MVC and application context configuration and
* bootstrapping of this web application see:
- * {@link http://dev.e-taxonomy.eu/trac/wiki/cdmlib-remote-webappConfigurationAndBootstrapping}
+ * {@link https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/cdmlib-remote-webappConfigurationAndBootstrapping}
*
*
* @author a.kohlbecker
* <p>
* The static api doc files are created by the integration test class <code>SwaggerStaticIT</code>.
* <p>
- * For more details see {@link http://dev.e-taxonomy.eu/trac/wiki/cdmlib-remote-webappConfigurationAndBootstrapping}
+ * For more details see {@link https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/cdmlib-remote-webappConfigurationAndBootstrapping}
*
* @author a.kohlbecker
* @since Feb 22, 2016
- *
*/
-
@Controller
public class StaticSwaggerApiDoc {
-
public static final Logger logger = Logger.getLogger(StaticSwaggerApiDoc.class);
-
public static final String SWAGGER_STATIC = "swagger-static";
public static final String JSON = ".json";
public static final String HOST = "{HOST}";
}
}
}
-
-}
+}
\ No newline at end of file
NOTE:
For a detailed overview on the spring MVC and application context configuration and
bootstrapping of this web application see:
- http://dev.e-taxonomy.eu/trac/wiki/cdmlib-remote-webappConfigurationAndBootstrapping
+ https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/cdmlib-remote-webappConfigurationAndBootstrapping
-->
<context:annotation-config />
NOTE:
For a detailed overview on the spring MVC and application context configuration and
bootstrapping of this web application see:
- http://dev.e-taxonomy.eu/trac/wiki/cdmlib-remote-webappConfigurationAndBootstrapping
+ https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/cdmlib-remote-webappConfigurationAndBootstrapping
-->
<!--
Initialize SpringMVCConfig and its dependency SpringSwaggerConfig.
<!--
NOTE: For a detailed overview on the spring MVC and application context
configuration and bootstrapping of this web application
- see: http://dev.e-taxonomy.eu/trac/wiki/cdmlib-remote-webappConfigurationAndBootstrapping
+ see: https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/cdmlib-remote-webappConfigurationAndBootstrapping
-->
<description>cdmlib-remote web-application instance</description>
import org.springframework.context.annotation.Profile;
import org.springframework.core.type.filter.AnnotationTypeFilter;
+import eu.etaxonomy.cdm.model.CdmAssignableTypeFilter;
+import eu.etaxonomy.cdm.model.CdmTypeScanner;
+import eu.etaxonomy.cdm.model.common.CdmBase;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
-import eu.etaxonomy.cdm.model.CdmAssignableTypeFilter;
-import eu.etaxonomy.cdm.model.CdmTypeScanner;
-import eu.etaxonomy.cdm.model.common.CdmBase;
/**
* <h3>NOTE:</h3>
* For a detailed overview on the spring MVC and application context configuration and
* bootstrapping of this web application see:
- * {@link http://dev.e-taxonomy.eu/trac/wiki/cdmlib-remote-webappConfigurationAndBootstrapping}
+ * {@link https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/cdmlib-remote-webappConfigurationAndBootstrapping}
*
*
*/
-The project uses Maven2 and AspectJ.\r
+The project uses Maven3 and AspectJ.\r
\r
-Please see http://dev.e-taxonomy.eu/trac/wiki/CdmLibrary for details on installation and usage\r
+Please see https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmLibrary for details on installation and usage\r
\r
***Deploying to Application Server***\r
The POM contains deployment plugins for TOMCAT and also JETTY.\r
/**\r
* Copyright (C) 2007 EDIT\r
-* European Distributed Institute of Taxonomy \r
+* European Distributed Institute of Taxonomy\r
* http://www.e-taxonomy.eu\r
-* \r
+*\r
* The contents of this file are subject to the Mozilla Public License Version 1.1\r
* See LICENSE.TXT at the top of this package for the full license terms.\r
*/\r
\r
/**\r
* @author a.kohlbecker\r
- * @deprecated<b>NOTICE:</b> \r
- * <em>This class is related to the switchable database infrastructure which allows to serve \r
- * multiple databases with only a single instance of the cdm-remote-webapp. \r
+ * @deprecated<b>NOTICE:</b>\r
+ * <em>This class is related to the switchable database infrastructure which allows to serve\r
+ * multiple databases with only a single instance of the cdm-remote-webapp.\r
* This concept however is deprecated due to several problems of which the most severe is the term loading issue.\r
- * This class should however not deleted since we once might wish to switch back to this concept when we are \r
- * able to deal with the implicated issues. \r
- * \r
- * See http://dev.e-taxonomy.eu/trac/wiki/CdmServerSwitchableDataSources for more information.</em>\r
+ * This class should however not deleted since we once might wish to switch back to this concept when we are\r
+ * able to deal with the implicated issues.\r
+ *\r
+ * See https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmServerSwitchableDataSources for more information.</em>\r
*/\r
@Deprecated\r
public class DatasourceContextHandlerInterceptor extends HandlerInterceptorAdapter {\r
private static final Logger logger = Logger.getLogger(DatasourceContextHandlerInterceptor.class);\r
- \r
+\r
private final static Pattern basepathPattern = Pattern.compile("^/([^/]+)/.*");\r
- \r
+\r
@Override\r
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {\r
Matcher matcher = basepathPattern.matcher(request.getServletPath());\r
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {\r
NamedContextHolder.clearContextKey();\r
logger.info("datasource context cleared");\r
- \r
+\r
}\r
}\r
import org.apache.log4j.Logger;\r
import org.springframework.beans.factory.FactoryBean;\r
\r
+import eu.etaxonomy.cdm.remote.json.processor.bean.AbstractCdmBeanProcessor;\r
import net.sf.json.JsonConfig;\r
import net.sf.json.processors.DefaultValueProcessor;\r
import net.sf.json.processors.DefaultValueProcessorMatcher;\r
* retrieve the object graph in question with an appropriate\r
* initialization strategy.</li>\r
* </ol>\r
- * <strong>please see also http://dev.e-taxonomy.eu/trac/wiki/CdmEntityInitalization</strong>\r
+ * <strong>please see also https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmEntityInitalization</strong>\r
*\r
* @param ignoreJPATransient\r
*/\r
-The project uses Maven2 and AspectJ.\r
+The project uses Maven3 and AspectJ.\r
\r
-Please see http://dev.e-taxonomy.eu/trac/wiki/CdmLibrary for details on installation and usage\r
+Please see https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmLibrary for details on installation and usage\r
* Uses org.apache.lucene.search.join.JoinUtil for query time joining, alternatively
* the BlockJoinQuery could be used. The latter might be more memory save but has the
* drawback of requiring to do the join an indexing time.
- * see http://dev.e-taxonomy.eu/trac/wiki/LuceneNotes#JoinsinLucene for more information on this.
+ * see https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/LuceneNotes#JoinsinLucene for more information on this.
*
* Joins TaxonRelationShip with Taxon depending on the direction of the given edge:
* <ul>
The project uses Maven3.
-Please see http://dev.e-taxonomy.eu/trac/wiki/CdmLibrary for details on installation and usage
+Please see https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmLibrary for details on installation and usage
This property causes problems in tests as the table
is not found in the test database. Maybe we can fix
this one day.
- see also http://dev.e-taxonomy.eu/trac/ticket/3344
+ see also https://dev.e-taxonomy.eu/redmine/issues/3344
-->
<!--