commit a953e2c0c977e48fe877f9615dbcb72157440e62
Author: Patrick Plitzner
Date: Mon Feb 5 09:14:01 2018 +0100
ref #7095 remove unused class
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/workingSet/matrix/DataSource.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/workingSet/matrix/DataSource.java
deleted file mode 100644
index 7686a04f3..000000000
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/workingSet/matrix/DataSource.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
-* Copyright (C) 2017 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.editor.workingSet.matrix;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.CategoricalData;
-import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.cdm.model.description.FeatureTree;
-import eu.etaxonomy.cdm.model.description.QuantitativeData;
-import eu.etaxonomy.cdm.model.description.SpecimenDescription;
-import eu.etaxonomy.cdm.model.description.State;
-import eu.etaxonomy.cdm.model.description.WorkingSet;
-import eu.etaxonomy.cdm.model.name.Rank;
-import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
-import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
-
-/**
- * @author pplitzner
- * @since Nov 26, 2017
- *
- */
-public class DataSource {
-
- private static final Feature LEAF_COLOR_FEATURE = Feature.NewInstance("color of the leaf", "leaf color", "leaf color");
- private static final Feature LEAF_LENGTH_FEATURE = Feature.NewInstance("length of the leaf", "Leaf length", "leaf length");
-
- public static WorkingSet getWorkingSet(){
- FeatureTree tree = FeatureTree.NewInstance(getFeatures());
-
- WorkingSet workingSet = WorkingSet.NewInstance();
- workingSet.setDescriptiveSystem(tree);
- workingSet.setMaxRank(Rank.GENUS());
- workingSet.setMinRank(Rank.SUBSPECIES());
- getDescriptions().forEach(description -> workingSet.addDescription(description));
- workingSet.setLabel("PP-Wset");
- return workingSet;
-
- }
-
- public static List getDescriptions(){
- List descriptions = new ArrayList<>();
-
- SpecimenDescription description = createDescription(0.3f, 2.4f, "blue");
- DerivedUnit derivedUnit = DerivedUnit.NewInstance(SpecimenOrObservationType.PreservedSpecimen);
- derivedUnit.setAccessionNumber("B 10 35489");
- description.setDescribedSpecimenOrObservation(derivedUnit);
-
- SpecimenDescription description2 = createDescription(1.6f, 6.4f, "red");
- DerivedUnit derivedUnit2 = DerivedUnit.NewInstance(SpecimenOrObservationType.PreservedSpecimen);
- derivedUnit2.setAccessionNumber("B 10 44556");
- description2.setDescribedSpecimenOrObservation(derivedUnit2);
-
- descriptions.add(description);
- descriptions.add(description2);
- return descriptions;
- }
-
- private static List getFeatures(){
- List features = new ArrayList<>();
- features.add(LEAF_LENGTH_FEATURE);
- features.add(LEAF_COLOR_FEATURE);
-
- return features;
- }
-
- private static SpecimenDescription createDescription(Float min, Float max, String colorLabel) {
- SpecimenDescription desc = SpecimenDescription.NewInstance();
-
- QuantitativeData length = QuantitativeData.NewInstance(LEAF_LENGTH_FEATURE);
- length.setMinimum(min, Collections.emptySet());
- length.setMaximum(max, Collections.emptySet());
- desc.addElement(length);
-
- CategoricalData color = CategoricalData.NewInstance(LEAF_COLOR_FEATURE);
- color.addStateData(State.NewInstance(colorLabel, colorLabel, colorLabel));
- desc.addElement(color);
-
-
- return desc;
- }
-
-}