diff --git a/pom.xml b/pom.xml index 16436a840..61f06ef50 100644 --- a/pom.xml +++ b/pom.xml @@ -21,8 +21,13 @@ 0.4.5 3.1.3 - + + + uk.ac.ebi.eva + variation-commons + 0.1 + ch.qos.logback logback-classic diff --git a/src/main/java/uk/ac/ebi/eva/pipeline/io/mappers/GeneLineMapper.java b/src/main/java/uk/ac/ebi/eva/pipeline/io/mappers/GeneLineMapper.java index fed1fb94e..628a82978 100644 --- a/src/main/java/uk/ac/ebi/eva/pipeline/io/mappers/GeneLineMapper.java +++ b/src/main/java/uk/ac/ebi/eva/pipeline/io/mappers/GeneLineMapper.java @@ -17,7 +17,7 @@ import org.springframework.batch.item.file.LineMapper; -import uk.ac.ebi.eva.pipeline.model.FeatureCoordinates; +import uk.ac.ebi.eva.commons.models.data.FeatureCoordinates; import java.util.Map; import java.util.TreeMap; diff --git a/src/main/java/uk/ac/ebi/eva/pipeline/io/readers/GeneReader.java b/src/main/java/uk/ac/ebi/eva/pipeline/io/readers/GeneReader.java index f83e90890..4ee8e2166 100644 --- a/src/main/java/uk/ac/ebi/eva/pipeline/io/readers/GeneReader.java +++ b/src/main/java/uk/ac/ebi/eva/pipeline/io/readers/GeneReader.java @@ -17,9 +17,9 @@ import org.springframework.batch.item.file.FlatFileItemReader; import org.springframework.core.io.Resource; +import uk.ac.ebi.eva.commons.models.data.FeatureCoordinates; import uk.ac.ebi.eva.pipeline.io.GzipLazyResource; import uk.ac.ebi.eva.pipeline.io.mappers.GeneLineMapper; -import uk.ac.ebi.eva.pipeline.model.FeatureCoordinates; import java.io.File; diff --git a/src/main/java/uk/ac/ebi/eva/pipeline/io/writers/GeneWriter.java b/src/main/java/uk/ac/ebi/eva/pipeline/io/writers/GeneWriter.java index 43dddc29c..36a22d5ef 100644 --- a/src/main/java/uk/ac/ebi/eva/pipeline/io/writers/GeneWriter.java +++ b/src/main/java/uk/ac/ebi/eva/pipeline/io/writers/GeneWriter.java @@ -17,7 +17,7 @@ import org.springframework.batch.item.data.MongoItemWriter; import org.springframework.data.mongodb.core.MongoOperations; -import uk.ac.ebi.eva.pipeline.model.FeatureCoordinates; +import uk.ac.ebi.eva.commons.models.data.FeatureCoordinates; /** * @author Jose Miguel Mut Lopez <jmmut@ebi.ac.uk> diff --git a/src/main/java/uk/ac/ebi/eva/pipeline/jobs/steps/GeneLoaderStep.java b/src/main/java/uk/ac/ebi/eva/pipeline/jobs/steps/GeneLoaderStep.java index 999971757..c12774770 100644 --- a/src/main/java/uk/ac/ebi/eva/pipeline/jobs/steps/GeneLoaderStep.java +++ b/src/main/java/uk/ac/ebi/eva/pipeline/jobs/steps/GeneLoaderStep.java @@ -32,7 +32,7 @@ import uk.ac.ebi.eva.pipeline.io.mappers.GeneLineMapper; import uk.ac.ebi.eva.pipeline.jobs.steps.processors.GeneFilterProcessor; import uk.ac.ebi.eva.pipeline.listeners.SkippedItemListener; -import uk.ac.ebi.eva.pipeline.model.FeatureCoordinates; +import uk.ac.ebi.eva.commons.models.data.FeatureCoordinates; import java.io.IOException; diff --git a/src/main/java/uk/ac/ebi/eva/pipeline/jobs/steps/processors/GeneFilterProcessor.java b/src/main/java/uk/ac/ebi/eva/pipeline/jobs/steps/processors/GeneFilterProcessor.java index 28698c38d..dfe98960f 100644 --- a/src/main/java/uk/ac/ebi/eva/pipeline/jobs/steps/processors/GeneFilterProcessor.java +++ b/src/main/java/uk/ac/ebi/eva/pipeline/jobs/steps/processors/GeneFilterProcessor.java @@ -16,8 +16,7 @@ package uk.ac.ebi.eva.pipeline.jobs.steps.processors; import org.springframework.batch.item.ItemProcessor; - -import uk.ac.ebi.eva.pipeline.model.FeatureCoordinates; +import uk.ac.ebi.eva.commons.models.data.FeatureCoordinates; /** * @author Jose Miguel Mut Lopez <jmmut@ebi.ac.uk> diff --git a/src/main/java/uk/ac/ebi/eva/pipeline/model/FeatureCoordinates.java b/src/main/java/uk/ac/ebi/eva/pipeline/model/FeatureCoordinates.java deleted file mode 100644 index 02235a25d..000000000 --- a/src/main/java/uk/ac/ebi/eva/pipeline/model/FeatureCoordinates.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2016 EMBL - European Bioinformatics Institute - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package uk.ac.ebi.eva.pipeline.model; - -/** - * @author Jose Miguel Mut Lopez <jmmut@ebi.ac.uk> - * - * TODO: use the version in variation commons - */ -public class FeatureCoordinates { - - private String id; - private String name; - private String feature; - private String chromosome; - private int start; - private int end; - - public FeatureCoordinates() { - } - - public FeatureCoordinates(String id, String name, String feature, String chromosome, int start, int end) { - this.id = id; - this.name = name; - this.feature = feature; - this.chromosome = chromosome; - this.start = start; - this.end = end; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getChromosome() { - return chromosome; - } - - public void setChromosome(String chromosome) { - this.chromosome = chromosome; - } - - public int getStart() { - return start; - } - - public void setStart(int start) { - this.start = start; - } - - public int getEnd() { - return end; - } - - public void setEnd(int end) { - this.end = end; - } - - public String getFeature() { - return feature; - } - - public void setFeature(String feature) { - this.feature = feature; - } -} diff --git a/src/test/java/uk/ac/ebi/eva/pipeline/io/mappers/GeneLineMapperTest.java b/src/test/java/uk/ac/ebi/eva/pipeline/io/mappers/GeneLineMapperTest.java index 614ff2a97..db08d42fa 100644 --- a/src/test/java/uk/ac/ebi/eva/pipeline/io/mappers/GeneLineMapperTest.java +++ b/src/test/java/uk/ac/ebi/eva/pipeline/io/mappers/GeneLineMapperTest.java @@ -16,7 +16,7 @@ package uk.ac.ebi.eva.pipeline.io.mappers; import org.junit.Test; -import uk.ac.ebi.eva.pipeline.model.FeatureCoordinates; +import uk.ac.ebi.eva.commons.models.data.FeatureCoordinates; import uk.ac.ebi.eva.test.data.GtfStaticTestData; import static org.junit.Assert.assertNotNull; diff --git a/src/test/java/uk/ac/ebi/eva/pipeline/io/readers/GeneReaderTest.java b/src/test/java/uk/ac/ebi/eva/pipeline/io/readers/GeneReaderTest.java index 20579fac0..232978e3f 100644 --- a/src/test/java/uk/ac/ebi/eva/pipeline/io/readers/GeneReaderTest.java +++ b/src/test/java/uk/ac/ebi/eva/pipeline/io/readers/GeneReaderTest.java @@ -18,12 +18,14 @@ import org.junit.Test; import org.springframework.batch.item.ExecutionContext; import org.springframework.batch.test.MetaDataInstanceFactory; -import uk.ac.ebi.eva.pipeline.model.FeatureCoordinates; +import uk.ac.ebi.eva.commons.models.data.FeatureCoordinates; import uk.ac.ebi.eva.test.data.GtfStaticTestData; import uk.ac.ebi.eva.test.utils.JobTestUtils; + import java.io.File; import java.io.FileInputStream; import java.util.zip.GZIPInputStream; + import static junit.framework.TestCase.assertEquals; /** diff --git a/src/test/java/uk/ac/ebi/eva/pipeline/io/writers/GeneWriterTest.java b/src/test/java/uk/ac/ebi/eva/pipeline/io/writers/GeneWriterTest.java index 0a1953663..0819b9da2 100644 --- a/src/test/java/uk/ac/ebi/eva/pipeline/io/writers/GeneWriterTest.java +++ b/src/test/java/uk/ac/ebi/eva/pipeline/io/writers/GeneWriterTest.java @@ -25,10 +25,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import uk.ac.ebi.eva.commons.models.data.FeatureCoordinates; import uk.ac.ebi.eva.pipeline.configuration.DatabaseInitializationConfiguration; import uk.ac.ebi.eva.pipeline.configuration.JobOptions; import uk.ac.ebi.eva.pipeline.io.mappers.GeneLineMapper; -import uk.ac.ebi.eva.pipeline.model.FeatureCoordinates; import uk.ac.ebi.eva.test.data.GtfStaticTestData; import uk.ac.ebi.eva.test.utils.JobTestUtils; diff --git a/src/test/java/uk/ac/ebi/eva/pipeline/jobs/steps/processor/GeneFilterProcessorTest.java b/src/test/java/uk/ac/ebi/eva/pipeline/jobs/steps/processor/GeneFilterProcessorTest.java index 2430350fb..01f28ba4b 100644 --- a/src/test/java/uk/ac/ebi/eva/pipeline/jobs/steps/processor/GeneFilterProcessorTest.java +++ b/src/test/java/uk/ac/ebi/eva/pipeline/jobs/steps/processor/GeneFilterProcessorTest.java @@ -18,9 +18,9 @@ import org.junit.Test; import org.springframework.batch.item.ExecutionContext; import org.springframework.batch.test.MetaDataInstanceFactory; +import uk.ac.ebi.eva.commons.models.data.FeatureCoordinates; import uk.ac.ebi.eva.pipeline.io.readers.GeneReader; import uk.ac.ebi.eva.pipeline.jobs.steps.processors.GeneFilterProcessor; -import uk.ac.ebi.eva.pipeline.model.FeatureCoordinates; import uk.ac.ebi.eva.test.data.GtfStaticTestData; import uk.ac.ebi.eva.test.utils.JobTestUtils;