diff --git a/converter/src/main/java/lcsb/mapviewer/converter/ProjectFactory.java b/converter/src/main/java/lcsb/mapviewer/converter/ProjectFactory.java index e73da9a7687e613d79658c674fddc5b1304745c8..11c34bf4ef262a1ceda2b7d412082c57e99aac5c 100644 --- a/converter/src/main/java/lcsb/mapviewer/converter/ProjectFactory.java +++ b/converter/src/main/java/lcsb/mapviewer/converter/ProjectFactory.java @@ -2,10 +2,8 @@ package lcsb.mapviewer.converter; import java.util.ArrayList; import java.util.Enumeration; -import java.util.HashMap; import java.util.HashSet; import java.util.List; -import java.util.Map; import java.util.Set; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; @@ -18,8 +16,14 @@ import lcsb.mapviewer.model.Project; import lcsb.mapviewer.model.map.model.Model; public class ProjectFactory { - Logger logger = Logger.getLogger(ProjectFactory.class); - private ComplexZipConverter converter; + + /** + * Deafult class clogger. + */ + @SuppressWarnings("unused") + private Logger logger = Logger.getLogger(ProjectFactory.class); + + private ComplexZipConverter converter; public ProjectFactory(ComplexZipConverter converter) { this.converter = converter; @@ -31,16 +35,15 @@ public class ProjectFactory { public Project create(ComplexZipConverterParams params, Project project) throws InvalidInputDataExecption { Model model = converter.createModel(params); - + Set<Model> models = new HashSet<>(); models.add(model); models.addAll(model.getSubmodels()); - + project.addModel(model); ZipFile zipFile = params.getZipFile(); Enumeration<? extends ZipEntry> entries; - entries = zipFile.entries(); List<ImageZipEntryFile> imageEntries = new ArrayList<>(); while (entries.hasMoreElements()) { diff --git a/model-command/src/main/java/lcsb/mapviewer/commands/CopyCommand.java b/model-command/src/main/java/lcsb/mapviewer/commands/CopyCommand.java index e9cf25c19222055ce89eb8d154d13725f76362b6..3917a84ce5cc673ab1c41937b2a3b91e8a19b746 100644 --- a/model-command/src/main/java/lcsb/mapviewer/commands/CopyCommand.java +++ b/model-command/src/main/java/lcsb/mapviewer/commands/CopyCommand.java @@ -9,7 +9,6 @@ import lcsb.mapviewer.common.exception.InvalidArgumentException; import lcsb.mapviewer.common.exception.InvalidClassException; import lcsb.mapviewer.common.exception.InvalidStateException; import lcsb.mapviewer.model.graphics.PolylineData; -import lcsb.mapviewer.model.map.OverviewImage; import lcsb.mapviewer.model.map.compartment.Compartment; import lcsb.mapviewer.model.map.graph.DataMiningSet; import lcsb.mapviewer.model.map.layout.Layout; @@ -23,8 +22,8 @@ import lcsb.mapviewer.model.map.reaction.AbstractNode; import lcsb.mapviewer.model.map.reaction.NodeOperator; import lcsb.mapviewer.model.map.reaction.Reaction; import lcsb.mapviewer.model.map.reaction.ReactionNode; -import lcsb.mapviewer.model.map.species.Element; import lcsb.mapviewer.model.map.species.Complex; +import lcsb.mapviewer.model.map.species.Element; import lcsb.mapviewer.model.map.species.Species; /** @@ -194,9 +193,9 @@ public class CopyCommand extends NewModelCommand { parentCompartment = result.getElementByElementId(parentCompartment.getElementId()); copy.setCompartment(parentCompartment); } - + } else if (alias instanceof Compartment) { - + Compartment parentCompartment = alias.getCompartment(); if (parentCompartment != null) { diff --git a/model-command/src/test/java/lcsb/mapviewer/commands/CopyCommandTest.java b/model-command/src/test/java/lcsb/mapviewer/commands/CopyCommandTest.java index 6519c2bcd95dca3a335b81db11de75d9fad45a13..9421f1661d7e59624d1463fedc2e3765dc8285f6 100644 --- a/model-command/src/test/java/lcsb/mapviewer/commands/CopyCommandTest.java +++ b/model-command/src/test/java/lcsb/mapviewer/commands/CopyCommandTest.java @@ -19,8 +19,6 @@ import lcsb.mapviewer.common.exception.InvalidArgumentException; import lcsb.mapviewer.converter.ConverterParams; import lcsb.mapviewer.converter.model.celldesigner.CellDesignerXmlParser; import lcsb.mapviewer.model.graphics.PolylineData; -import lcsb.mapviewer.model.map.OverviewImage; -import lcsb.mapviewer.model.map.OverviewModelLink; import lcsb.mapviewer.model.map.compartment.Compartment; import lcsb.mapviewer.model.map.compartment.SquareCompartment; import lcsb.mapviewer.model.map.layout.graphics.Layer; diff --git a/model/src/main/java/lcsb/mapviewer/model/map/model/ModelComparator.java b/model/src/main/java/lcsb/mapviewer/model/map/model/ModelComparator.java index 89b885d430c2d0af22ae480171f3a9724ec9c1c0..58cfdbf3e5bc1c565288bc9d57aed499c16d58d2 100644 --- a/model/src/main/java/lcsb/mapviewer/model/map/model/ModelComparator.java +++ b/model/src/main/java/lcsb/mapviewer/model/map/model/ModelComparator.java @@ -13,8 +13,6 @@ import lcsb.mapviewer.common.Configuration; import lcsb.mapviewer.common.comparator.DoubleComparator; import lcsb.mapviewer.common.comparator.IntegerComparator; import lcsb.mapviewer.common.comparator.StringComparator; -import lcsb.mapviewer.model.map.OverviewImage; -import lcsb.mapviewer.model.map.OverviewImageComparator; import lcsb.mapviewer.model.map.graph.DataMiningSetComparator; import lcsb.mapviewer.model.map.layout.Layout; import lcsb.mapviewer.model.map.layout.LayoutComparator; diff --git a/model/src/main/java/lcsb/mapviewer/model/map/model/ModelData.java b/model/src/main/java/lcsb/mapviewer/model/map/model/ModelData.java index b8e548c4d2c9134b5885517030d2b76330a8a911..549517cd27004183f486f195fe0649cdd1d947ee 100644 --- a/model/src/main/java/lcsb/mapviewer/model/map/model/ModelData.java +++ b/model/src/main/java/lcsb/mapviewer/model/map/model/ModelData.java @@ -27,7 +27,6 @@ import org.hibernate.annotations.CascadeType; import lcsb.mapviewer.common.exception.InvalidArgumentException; import lcsb.mapviewer.model.Project; -import lcsb.mapviewer.model.map.OverviewImage; import lcsb.mapviewer.model.map.graph.DataMiningSet; import lcsb.mapviewer.model.map.layout.BlockDiagram; import lcsb.mapviewer.model.map.layout.ElementGroup; @@ -138,7 +137,6 @@ public class ModelData implements Serializable { */ private String notifyEmail; - /** * How many hierarchical levels are in this map. */ diff --git a/model/src/main/java/lcsb/mapviewer/model/map/model/ModelFullIndexed.java b/model/src/main/java/lcsb/mapviewer/model/map/model/ModelFullIndexed.java index a1c335748b8f773f792ffb802c46c4c960ffed01..6f30507ce9a27579b2f02495539427570a3ab0f9 100644 --- a/model/src/main/java/lcsb/mapviewer/model/map/model/ModelFullIndexed.java +++ b/model/src/main/java/lcsb/mapviewer/model/map/model/ModelFullIndexed.java @@ -16,9 +16,6 @@ import lcsb.mapviewer.common.exception.InvalidArgumentException; import lcsb.mapviewer.model.Project; import lcsb.mapviewer.model.map.BioEntity; import lcsb.mapviewer.model.map.MiriamData; -import lcsb.mapviewer.model.map.OverviewImage; -import lcsb.mapviewer.model.map.OverviewImageLink; -import lcsb.mapviewer.model.map.OverviewLink; import lcsb.mapviewer.model.map.compartment.Compartment; import lcsb.mapviewer.model.map.graph.DataMiningSet; import lcsb.mapviewer.model.map.layout.BlockDiagram; @@ -43,6 +40,7 @@ public class ModelFullIndexed implements Model { /** * Default class logger. */ + @SuppressWarnings("unused") private static Logger logger = Logger.getLogger(ModelFullIndexed.class); /** @@ -571,7 +569,6 @@ public class ModelFullIndexed implements Model { return null; } - @Override public void addLayout(int index, Layout layout) { this.modelData.getLayouts().add(index, layout); diff --git a/model/src/test/java/lcsb/mapviewer/model/map/model/ModelComparatorTest.java b/model/src/test/java/lcsb/mapviewer/model/map/model/ModelComparatorTest.java index 839e29e072f2af7e03642d9c9bdeca6972951054..24e0478755c7c472ff69dd42c7317ab5bdee89a4 100644 --- a/model/src/test/java/lcsb/mapviewer/model/map/model/ModelComparatorTest.java +++ b/model/src/test/java/lcsb/mapviewer/model/map/model/ModelComparatorTest.java @@ -15,7 +15,6 @@ import lcsb.mapviewer.common.exception.NotImplementedException; import lcsb.mapviewer.model.map.MiriamData; import lcsb.mapviewer.model.map.MiriamRelationType; import lcsb.mapviewer.model.map.MiriamType; -import lcsb.mapviewer.model.map.OverviewImage; import lcsb.mapviewer.model.map.compartment.Compartment; import lcsb.mapviewer.model.map.compartment.PathwayCompartment; import lcsb.mapviewer.model.map.graph.DataMiningSet; diff --git a/model/src/test/java/lcsb/mapviewer/model/map/model/ModelDataTest.java b/model/src/test/java/lcsb/mapviewer/model/map/model/ModelDataTest.java index cd9c2d92d35f5da166c46a21b0f918c45bff8184..83a31526baa3eea98be9d5e85f826bce2d1b936d 100644 --- a/model/src/test/java/lcsb/mapviewer/model/map/model/ModelDataTest.java +++ b/model/src/test/java/lcsb/mapviewer/model/map/model/ModelDataTest.java @@ -239,7 +239,6 @@ public class ModelDataTest { int tileSize = 512; String modelId = "modId"; String email = "a@b.cc"; - String mapVersion = "1.2.6"; String notes = "nOT"; String name = "n_ma"; Double heightDouble = 29.0; diff --git a/model/src/test/java/lcsb/mapviewer/model/map/model/ModelFullIndexedTest.java b/model/src/test/java/lcsb/mapviewer/model/map/model/ModelFullIndexedTest.java index 9a6b0c0ed0a23ecda95fb4a3c4f309de718eb7e8..7cd152ac576f46b70667979648cf09ab2c63244b 100644 --- a/model/src/test/java/lcsb/mapviewer/model/map/model/ModelFullIndexedTest.java +++ b/model/src/test/java/lcsb/mapviewer/model/map/model/ModelFullIndexedTest.java @@ -25,8 +25,6 @@ import lcsb.mapviewer.model.Project; import lcsb.mapviewer.model.map.BioEntity; import lcsb.mapviewer.model.map.MiriamData; import lcsb.mapviewer.model.map.MiriamType; -import lcsb.mapviewer.model.map.OverviewImage; -import lcsb.mapviewer.model.map.OverviewImageLink; import lcsb.mapviewer.model.map.compartment.Compartment; import lcsb.mapviewer.model.map.compartment.PathwayCompartment; import lcsb.mapviewer.model.map.graph.DataMiningSet; @@ -739,8 +737,6 @@ public class ModelFullIndexedTest { try { Model model = new ModelFullIndexed(null); - String mapVersion = "v12"; - Double width = 12.0; int widthInt = 12; String widthStr = "12.0"; diff --git a/persist/src/test/java/lcsb/mapviewer/persist/dao/ProjectDaoTest.java b/persist/src/test/java/lcsb/mapviewer/persist/dao/ProjectDaoTest.java index 39b526739e865711edead551cd28ab9ee4290260..61cbb42233bc4eb1f2be6218dd5b5cfd0ded9722 100644 --- a/persist/src/test/java/lcsb/mapviewer/persist/dao/ProjectDaoTest.java +++ b/persist/src/test/java/lcsb/mapviewer/persist/dao/ProjectDaoTest.java @@ -245,7 +245,6 @@ public class ProjectDaoTest extends PersistTestFunctions { Project project2 = projectDao.getProjectByProjectId(projectId); assertNotNull(project2); - Model model2 = new ModelFullIndexed(project2.getModels().iterator().next()); OverviewImage oi2 = project2.getOverviewImages().get(0); OverviewModelLink oml2 = (OverviewModelLink) oi2.getLinks().get(0);