Commit 322bf2d9 authored by Matija Obreza's avatar Matija Obreza
Browse files

Fix commons-lang3 errors

Using org.genesys-pgr:pgr-ontology-model
parent bcff1971
...@@ -410,18 +410,7 @@ ...@@ -410,18 +410,7 @@
<version>${hazelcast.version}</version> <version>${hazelcast.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>apache-jena-libs</artifactId>
<type>pom</type>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>org.bioversityinternational</groupId>
<artifactId>org.bioversityinternational.ontology</artifactId>
<version>0.6.2</version>
</dependency>
<dependency> <dependency>
<groupId>org.jamel.dbf</groupId> <groupId>org.jamel.dbf</groupId>
...@@ -504,6 +493,11 @@ ...@@ -504,6 +493,11 @@
<artifactId>worldclim-reader</artifactId> <artifactId>worldclim-reader</artifactId>
<version>0.0.3-SNAPSHOT</version> <version>0.0.3-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>org.genesys-pgr</groupId>
<artifactId>pgr-ontology-model</artifactId>
<version>0.7.1-SNAPSHOT</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -29,7 +29,7 @@ import javax.persistence.PrePersist; ...@@ -29,7 +29,7 @@ import javax.persistence.PrePersist;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.UniqueConstraint; import javax.persistence.UniqueConstraint;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang.StringUtils;
import org.genesys2.server.model.GlobalVersionedAuditedModel; import org.genesys2.server.model.GlobalVersionedAuditedModel;
import org.genesys2.server.model.impl.CropTaxonomy; import org.genesys2.server.model.impl.CropTaxonomy;
import org.hibernate.annotations.Type; import org.hibernate.annotations.Type;
......
...@@ -19,7 +19,7 @@ package org.genesys2.server.model.json; ...@@ -19,7 +19,7 @@ package org.genesys2.server.model.json;
import java.util.List; import java.util.List;
import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang.StringUtils;
import org.genesys2.server.model.genesys.Accession; import org.genesys2.server.model.genesys.Accession;
import org.genesys2.server.model.genesys.AccessionBreeding; import org.genesys2.server.model.genesys.AccessionBreeding;
import org.genesys2.server.model.genesys.AccessionCollect; import org.genesys2.server.model.genesys.AccessionCollect;
......
...@@ -22,7 +22,7 @@ import java.util.List; ...@@ -22,7 +22,7 @@ import java.util.List;
import java.util.Set; import java.util.Set;
import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.genesys2.server.model.genesys.Method; import org.genesys2.server.model.genesys.Method;
...@@ -42,6 +42,7 @@ import org.springframework.data.domain.Sort.Order; ...@@ -42,6 +42,7 @@ import org.springframework.data.domain.Sort.Order;
public class DirectMysqlQuery { public class DirectMysqlQuery {
private static final Log LOG = LogFactory.getLog(DirectMysqlQuery.class); private static final Log LOG = LogFactory.getLog(DirectMysqlQuery.class);
private static final String SPACE = " ";
final Set<String> tables = new HashSet<String>(); final Set<String> tables = new HashSet<String>();
final List<Object> params = new ArrayList<Object>(); final List<Object> params = new ArrayList<Object>();
...@@ -49,7 +50,7 @@ public class DirectMysqlQuery { ...@@ -49,7 +50,7 @@ public class DirectMysqlQuery {
public DirectMysqlQuery(String baseTable, String baseAlias) { public DirectMysqlQuery(String baseTable, String baseAlias) {
sb = new StringBuffer(300); sb = new StringBuffer(300);
sb.append(" from ").append(baseTable).append(StringUtils.SPACE).append(baseAlias); sb.append(" from ").append(baseTable).append(SPACE).append(baseAlias);
tables.add(baseTable); tables.add(baseTable);
} }
...@@ -62,13 +63,13 @@ public class DirectMysqlQuery { ...@@ -62,13 +63,13 @@ public class DirectMysqlQuery {
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {
LOG.debug("Inner-joining " + table + " " + alias + " on " + onExpr); LOG.debug("Inner-joining " + table + " " + alias + " on " + onExpr);
} }
sb.append(" inner join ").append(table).append(StringUtils.SPACE); sb.append(" inner join ").append(table).append(SPACE);
tables.add(table); tables.add(table);
if (StringUtils.isNotBlank(alias)) { if (StringUtils.isNotBlank(alias)) {
sb.append(alias).append(StringUtils.SPACE); sb.append(alias).append(SPACE);
} }
sb.append("on ").append(onExpr).append(StringUtils.SPACE); sb.append("on ").append(onExpr).append(SPACE);
return this; return this;
} }
...@@ -80,14 +81,14 @@ public class DirectMysqlQuery { ...@@ -80,14 +81,14 @@ public class DirectMysqlQuery {
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {
LOG.debug("Leftouter-joining " + table + " " + alias + " on " + onExpr); LOG.debug("Leftouter-joining " + table + " " + alias + " on " + onExpr);
} }
sb.append(" left outer join ").append(table).append(StringUtils.SPACE); sb.append(" left outer join ").append(table).append(SPACE);
tables.add(table); tables.add(table);
if (StringUtils.isNotBlank(alias)) { if (StringUtils.isNotBlank(alias)) {
sb.append(alias).append(StringUtils.SPACE); sb.append(alias).append(SPACE);
} }
if (StringUtils.isNotBlank(onExpr)) { if (StringUtils.isNotBlank(onExpr)) {
sb.append("on ").append(onExpr).append(StringUtils.SPACE); sb.append("on ").append(onExpr).append(SPACE);
} }
return this; return this;
} }
......
...@@ -26,7 +26,7 @@ import java.util.List; ...@@ -26,7 +26,7 @@ import java.util.List;
import javax.persistence.EntityManager; import javax.persistence.EntityManager;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Cell;
......
...@@ -27,8 +27,8 @@ import java.util.Set; ...@@ -27,8 +27,8 @@ import java.util.Set;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.Predicate; import org.apache.commons.collections4.Predicate;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.genesys2.server.model.filters.AutocompleteFilter; import org.genesys2.server.model.filters.AutocompleteFilter;
......
...@@ -20,7 +20,7 @@ import java.util.ArrayList; ...@@ -20,7 +20,7 @@ import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang.StringUtils;
import org.genesys2.server.model.genesys.Accession; import org.genesys2.server.model.genesys.Accession;
import org.genesys2.server.model.genesys.AccessionBreeding; import org.genesys2.server.model.genesys.AccessionBreeding;
import org.genesys2.server.model.genesys.AccessionCollect; import org.genesys2.server.model.genesys.AccessionCollect;
......
...@@ -26,7 +26,7 @@ import java.util.Locale; ...@@ -26,7 +26,7 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.genesys2.server.model.genesys.Accession; import org.genesys2.server.model.genesys.Accession;
......
...@@ -21,7 +21,7 @@ import java.util.concurrent.TimeUnit; ...@@ -21,7 +21,7 @@ import java.util.concurrent.TimeUnit;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.text.WordUtils; import org.apache.commons.lang.WordUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.genesys2.server.model.genesys.Taxonomy2; import org.genesys2.server.model.genesys.Taxonomy2;
......
...@@ -29,8 +29,8 @@ import java.util.Map; ...@@ -29,8 +29,8 @@ import java.util.Map;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.genesys2.server.model.elastic.AccessionDetails; import org.genesys2.server.model.elastic.AccessionDetails;
import org.genesys2.server.model.filters.GenesysFilter; import org.genesys2.server.model.filters.GenesysFilter;
import org.genesys2.server.model.genesys.Accession; import org.genesys2.server.model.genesys.Accession;
......
...@@ -19,8 +19,8 @@ package org.genesys2.server.servlet.controller.rdf; ...@@ -19,8 +19,8 @@ package org.genesys2.server.servlet.controller.rdf;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.bioversityinternational.model.germplasm.CCO; import org.genesys2.rdf.model.dwc.DarwinCore;
import org.bioversityinternational.model.rdf.dwc.DarwinCore; import org.genesys2.rdf.model.germplasm.CCO;
import org.genesys2.server.model.impl.Crop; import org.genesys2.server.model.impl.Crop;
import org.genesys2.server.model.impl.CropRule; import org.genesys2.server.model.impl.CropRule;
import org.genesys2.server.service.CropService; import org.genesys2.server.service.CropService;
......
...@@ -21,8 +21,8 @@ import java.util.Map; ...@@ -21,8 +21,8 @@ import java.util.Map;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.bioversityinternational.model.germplasm.CCO; import org.genesys2.rdf.model.germplasm.CCO;
import org.bioversityinternational.model.rdf.skos.SKOS; import org.genesys2.rdf.model.skos.SKOS;
import org.genesys2.server.model.genesys.Method; import org.genesys2.server.model.genesys.Method;
import org.genesys2.server.model.genesys.Parameter; import org.genesys2.server.model.genesys.Parameter;
import org.genesys2.server.model.genesys.ParameterCategory; import org.genesys2.server.model.genesys.ParameterCategory;
......
...@@ -21,10 +21,9 @@ import java.io.PrintStream; ...@@ -21,10 +21,9 @@ import java.io.PrintStream;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.util.Date; import java.util.Date;
import org.bioversityinternational.model.germplasm.CCO; import org.genesys2.rdf.model.dc.DublinCore;
import org.bioversityinternational.model.rdf.dc.DublinCore; import org.genesys2.rdf.model.dwc.DarwinCore;
import org.bioversityinternational.model.rdf.dwc.DarwinCore; import org.genesys2.rdf.model.skos.SKOS;
import org.bioversityinternational.model.rdf.skos.SKOS;
import org.genesys2.server.exception.UserException; import org.genesys2.server.exception.UserException;
import org.genesys2.server.model.VersionedAuditedModel; import org.genesys2.server.model.VersionedAuditedModel;
import org.genesys2.server.model.impl.User; import org.genesys2.server.model.impl.User;
...@@ -86,7 +85,6 @@ public abstract class RdfBaseController extends BaseController { ...@@ -86,7 +85,6 @@ public abstract class RdfBaseController extends BaseController {
model.setNsPrefix("dcterms", DublinCore.getURI()); model.setNsPrefix("dcterms", DublinCore.getURI());
model.setNsPrefix("dwc", DarwinCore.getURI()); model.setNsPrefix("dwc", DarwinCore.getURI());
model.setNsPrefix("skos", SKOS.getURI()); model.setNsPrefix("skos", SKOS.getURI());
model.setNsPrefix("cco", CCO.getURI());
model.setNsPrefix("genesys", getBaseUri() + "/"); model.setNsPrefix("genesys", getBaseUri() + "/");
return model; return model;
} }
......
...@@ -21,7 +21,7 @@ import java.util.Locale; ...@@ -21,7 +21,7 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.TreeMap; import java.util.TreeMap;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang.StringUtils;
import org.genesys2.server.model.impl.Country; import org.genesys2.server.model.impl.Country;
import org.genesys2.server.service.GenesysService; import org.genesys2.server.service.GenesysService;
import org.genesys2.server.service.GeoService; import org.genesys2.server.service.GeoService;
......
...@@ -21,7 +21,7 @@ import static org.junit.Assert.assertTrue; ...@@ -21,7 +21,7 @@ import static org.junit.Assert.assertTrue;
import java.io.IOException; import java.io.IOException;
import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang.RandomStringUtils;
import org.genesys2.server.test.PropertyPlacholderInitializer; import org.genesys2.server.test.PropertyPlacholderInitializer;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment