Commit c98b8154 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

unused imports removed

parent 6a3f1223
Pipeline #10264 passed with stage
in 13 minutes and 55 seconds
......@@ -2,9 +2,7 @@ package lcsb.mapviewer.cdplugin;
import java.util.List;
import org.apache.logging.log4j.*;
import org.apache.logging.log4j.core.LogEvent;
import org.junit.After;
import org.junit.Before;
import org.mockito.Mockito;
......@@ -13,7 +11,6 @@ import jp.sbi.celldesigner.plugin.PluginListOf;
import jp.sbi.celldesigner.plugin.PluginReaction;
import jp.sbi.celldesigner.plugin.PluginSpecies;
import jp.sbi.celldesigner.plugin.PluginSpeciesAlias;
import lcsb.mapviewer.common.MinervaLoggerAppender;
public class CdPluginFunctions {
......
......@@ -8,22 +8,18 @@ import javax.xml.bind.JAXBException;
import org.apache.commons.io.IOUtils;
import org.apache.commons.text.StringEscapeUtils;
import org.apache.logging.log4j.*;
import org.apache.logging.log4j.core.LogEvent;
import org.sbgn.SbgnUtil;
import org.sbgn.bindings.Sbgn;
import lcsb.mapviewer.common.MimeType;
import lcsb.mapviewer.common.MinervaLoggerAppender;
import lcsb.mapviewer.converter.Converter;
import lcsb.mapviewer.converter.ConverterException;
import lcsb.mapviewer.converter.ConverterParams;
import lcsb.mapviewer.converter.Converter;
import lcsb.mapviewer.converter.InvalidInputDataExecption;
import lcsb.mapviewer.model.map.model.Model;
public class SbgnmlXmlConverter extends Converter {
@Override
......@@ -77,6 +73,7 @@ public class SbgnmlXmlConverter extends Converter {
throw new ConverterException(e);
}
}
@Override
public String getCommonName() {
return "SBGN-ML";
......
......@@ -7,7 +7,6 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import java.awt.Color;
import java.awt.Desktop;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.geom.GeneralPath;
......@@ -17,8 +16,6 @@ import java.awt.image.ImageObserver;
import java.io.File;
import java.nio.file.Files;
import javax.imageio.ImageIO;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
......@@ -38,7 +35,7 @@ import lcsb.mapviewer.model.map.reaction.Reactant;
import lcsb.mapviewer.model.map.reaction.Reaction;
import lcsb.mapviewer.model.map.species.GenericProtein;
public class BioEntityConverterImplTest extends GraphicsTestFunctions{
public class BioEntityConverterImplTest extends GraphicsTestFunctions {
ColorExtractor colorExtractor = new ColorExtractor(Color.RED, Color.GREEN, Color.BLUE);
......@@ -107,12 +104,9 @@ public class BioEntityConverterImplTest extends GraphicsTestFunctions{
BioEntityConverterImpl converter = new BioEntityConverterImpl(alias, false, colorExtractor);
converter.draw(alias, graphics, new ConverterParams());
verify(graphics, times(1)).drawImage(any(Image.class), anyInt(), anyInt(), anyInt(), anyInt(), anyInt(), anyInt(),
anyInt(), anyInt(), nullable(ImageObserver.class));
} catch (Exception e) {
throw e;
}
......
......@@ -12,7 +12,6 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import java.awt.Color;
import java.awt.Desktop;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.geom.Point2D;
......@@ -23,9 +22,8 @@ import java.nio.file.Files;
import java.util.ArrayList;
import java.util.List;
import javax.imageio.ImageIO;
import org.apache.logging.log4j.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
......@@ -50,7 +48,7 @@ import lcsb.mapviewer.model.map.species.field.RegulatoryRegion;
import lcsb.mapviewer.model.map.species.field.Residue;
import lcsb.mapviewer.model.map.species.field.TranscriptionSite;
public class SpeciesConverterTest extends GraphicsTestFunctions{
public class SpeciesConverterTest extends GraphicsTestFunctions {
Logger logger = LogManager.getLogger(SpeciesConverterTest.class);
ColorExtractor colorExtractor = new ColorExtractor(Color.RED, Color.GREEN, Color.BLUE);
......
......@@ -7,13 +7,11 @@ import static org.junit.Assert.fail;
import java.util.Set;
import org.apache.logging.log4j.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.w3c.dom.Node;
import lcsb.mapviewer.common.exception.InvalidXmlSchemaException;
import lcsb.mapviewer.converter.ConverterTestFunctions;
import lcsb.mapviewer.model.map.MiriamData;
......
......@@ -2,32 +2,29 @@ package lcsb.mapviewer;
import java.util.List;
import org.apache.logging.log4j.*;
import org.apache.logging.log4j.core.LogEvent;
import org.junit.After;
import org.junit.Before;
import lcsb.mapviewer.common.MinervaLoggerAppender;
public class ModelTestFunctions {
private MinervaLoggerAppender appender;
@Before
public final void _setUp() throws Exception {
MinervaLoggerAppender.unregisterLogEventStorage(appender);
appender = MinervaLoggerAppender.createAppender();
}
@Before
public final void _setUp() throws Exception {
MinervaLoggerAppender.unregisterLogEventStorage(appender);
appender = MinervaLoggerAppender.createAppender();
}
@After
public final void _tearDown() throws Exception {
MinervaLoggerAppender.unregisterLogEventStorage(appender);
}
@After
public final void _tearDown() throws Exception {
MinervaLoggerAppender.unregisterLogEventStorage(appender);
}
protected List<LogEvent> getWarnings() {
return appender.getWarnings();
}
protected List<LogEvent> getWarnings() {
return appender.getWarnings();
}
}
......@@ -11,15 +11,13 @@ import java.util.List;
import java.util.Set;
import org.apache.commons.lang3.SerializationUtils;
import org.apache.logging.log4j.*;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import lcsb.mapviewer.common.Configuration;
import lcsb.mapviewer.common.MinervaLoggerAppender;
import lcsb.mapviewer.common.exception.InvalidArgumentException;
import lcsb.mapviewer.model.cache.UploadedFileEntry;
......
......@@ -5,21 +5,19 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import org.apache.logging.log4j.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import lcsb.mapviewer.common.exception.InvalidArgumentException;
import lcsb.mapviewer.common.exception.NotImplementedException;
import lcsb.mapviewer.model.map.BioEntity;
import lcsb.mapviewer.model.map.reaction.Reaction;
import lcsb.mapviewer.model.map.reaction.type.UnknownNegativeInfluenceReaction;
import lcsb.mapviewer.model.map.species.Element;
......
......@@ -2,15 +2,14 @@ package lcsb.mapviewer.wikipathway;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.PrintWriter;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import org.apache.logging.log4j.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.LoggerContext;
import org.pathvisio.core.model.ConverterException;
......@@ -20,7 +19,6 @@ import org.pathvisio.core.model.PathwayImporter;
import org.pathvisio.desktop.PvDesktop;
import org.pathvisio.desktop.plugin.Plugin;
import lcsb.mapviewer.common.MinervaLoggerAppender;
import lcsb.mapviewer.converter.ConverterParams;
import lcsb.mapviewer.converter.model.celldesigner.CellDesignerXmlParser;
......
......@@ -10,14 +10,15 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.io.IOUtils;
import org.apache.logging.log4j.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -33,9 +34,8 @@ import lcsb.mapviewer.commands.CopyCommand;
import lcsb.mapviewer.commands.SetFixedHierarchyLevelCommand;
import lcsb.mapviewer.commands.SubModelCommand;
import lcsb.mapviewer.common.Configuration;
import lcsb.mapviewer.common.exception.InvalidArgumentException;
import lcsb.mapviewer.converter.ConverterException;
import lcsb.mapviewer.converter.Converter;
import lcsb.mapviewer.converter.ConverterException;
import lcsb.mapviewer.converter.graphics.AbstractImageGenerator.Params;
import lcsb.mapviewer.converter.graphics.DrawingException;
import lcsb.mapviewer.converter.graphics.ImageGenerators;
......@@ -224,7 +224,8 @@ public class ModelRestImpl extends BaseRestImpl {
Layout overlay = layoutService.getLayoutById(Integer.parseInt(overlayId.trim()), token);
ColorSchemaReader reader = new ColorSchemaReader();
Collection<ColorSchema> schemas = reader.readColorSchema(overlay.getInputData().getFileContent(), overlay.getColorSchemaType());
Collection<ColorSchema> schemas = reader.readColorSchema(overlay.getInputData().getFileContent(),
overlay.getColorSchemaType());
new ColorModelCommand(part, schemas, getUserService().getColorExtractorForUser(user)).execute();
}
......@@ -314,7 +315,8 @@ public class ModelRestImpl extends BaseRestImpl {
if (overlay != null) {
if (overlay.getInputData() != null) {
ColorSchemaReader reader = new ColorSchemaReader();
Collection<ColorSchema> schemas = reader.readColorSchema(overlay.getInputData().getFileContent(), overlay.getColorSchemaType());
Collection<ColorSchema> schemas = reader.readColorSchema(overlay.getInputData().getFileContent(),
overlay.getColorSchemaType());
new ColorModelCommand(colorModel, schemas, getUserService().getColorExtractorForUser(user)).execute();
} else if (overlay.getTitle().equals(BuildInLayout.CLEAN.getTitle())) {
......@@ -364,17 +366,9 @@ public class ModelRestImpl extends BaseRestImpl {
ColorExtractor colorExtractor = getUserService().getColorExtractorForUser(user);
Params params = new Params().
x(minX).
y(minY).
height((maxY - minY) / scale).
width((maxX - minX) / scale).
level(level - Configuration.MIN_ZOOM_LEVEL).
nested(false).// automatically set nested view as invalid
scale(scale).
colorExtractor(colorExtractor).
sbgn(topModel.getProject().isSbgnFormat()).
model(colorModel);
Params params = new Params().x(minX).y(minY).height((maxY - minY) / scale).width((maxX - minX) / scale)
.level(level - Configuration.MIN_ZOOM_LEVEL).nested(false).// automatically set nested view as invalid
scale(scale).colorExtractor(colorExtractor).sbgn(topModel.getProject().isSbgnFormat()).model(colorModel);
if (overlay != null) {
params.nested(overlay.isHierarchicalView());
}
......
......@@ -10,7 +10,8 @@ import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import org.apache.logging.log4j.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -21,7 +22,6 @@ import lcsb.mapviewer.api.ObjectNotFoundException;
import lcsb.mapviewer.api.QueryException;
import lcsb.mapviewer.common.Configuration;
import lcsb.mapviewer.common.Pair;
import lcsb.mapviewer.common.exception.InvalidArgumentException;
import lcsb.mapviewer.common.geometry.ColorParser;
import lcsb.mapviewer.model.Project;
import lcsb.mapviewer.model.cache.FileEntry;
......
package lcsb.mapviewer.api.projects.drugs;
import static org.junit.Assert.assertNotNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import java.util.List;
import java.util.Map;
import org.apache.logging.log4j.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
import lcsb.mapviewer.api.RestTestFunctions;
import lcsb.mapviewer.common.exception.InvalidStateException;
import lcsb.mapviewer.model.map.model.Model;
import lcsb.mapviewer.services.SecurityException;
import lcsb.mapviewer.services.interfaces.IModelService;
import lcsb.mapviewer.services.interfaces.IProjectService;
public class DrugRestImplTest extends RestTestFunctions {
Logger logger = LogManager.getLogger(DrugRestImplTest.class);
......
package lcsb.mapviewer.web.bean.utils;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import javax.annotation.PostConstruct;
import javax.faces.context.FacesContext;
import javax.servlet.ServletContext;
import org.apache.logging.log4j.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.LoggerContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......
package lcsb.mapviewer.web.config;
import java.io.InputStream;
import java.net.URL;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Properties;
import javax.servlet.FilterRegistration;
import javax.servlet.ServletContext;
......@@ -12,7 +10,8 @@ import javax.servlet.ServletRegistration;
import javax.servlet.SessionCookieConfig;
import javax.servlet.SessionTrackingMode;
import org.apache.logging.log4j.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.LoggerContext;
import org.primefaces.webapp.filter.FileUploadFilter;
import org.springframework.security.web.session.HttpSessionEventPublisher;
......@@ -72,8 +71,8 @@ public class WebAppInitializer implements WebApplicationInitializer {
dispatcherContext.setParent(rootContext);
dispatcherContext.register(SpringWebConfig.class);
ServletRegistration.Dynamic dispatcher =
container.addServlet("dispatcher", new DispatcherServlet(dispatcherContext));
ServletRegistration.Dynamic dispatcher = container.addServlet("dispatcher",
new DispatcherServlet(dispatcherContext));
dispatcher.setLoadOnStartup(1);
dispatcher.addMapping("/api/*");
......@@ -100,7 +99,6 @@ public class WebAppInitializer implements WebApplicationInitializer {
FilterRegistration.Dynamic apiFilterReg = container.addFilter("apiFilter", apiFilter);
apiFilterReg.addMappingForUrlPatterns(null, true, "/api/*");
/*
* =============== COOKIE SETTINGS ===============
*/
......
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