Added read taxonomy for vert
This commit is contained in:
@@ -5,7 +5,8 @@ public enum CorpusType {
|
||||
CCKRES("ccKres ", "cckres"),
|
||||
SOLAR("Šolar", "šolar"),
|
||||
GOS("GOS", "gos"),
|
||||
SSJ500K("ssj500k", "ssj500k");
|
||||
SSJ500K("ssj500k", "ssj500k"),
|
||||
VERT("vert", "vert");
|
||||
|
||||
|
||||
private final String name;
|
||||
|
||||
@@ -10,7 +10,7 @@ import javafx.collections.ObservableList;
|
||||
public class Tax {
|
||||
private static LinkedHashMap<String, String> GIGAFIDA_TAXONOMY;
|
||||
private static LinkedHashMap<String, String> GOS_TAXONOMY;
|
||||
private static final HashSet<CorpusType> corpusTypesWithTaxonomy = new HashSet<>(Arrays.asList(CorpusType.GIGAFIDA, CorpusType.GOS, CorpusType.CCKRES, CorpusType.SSJ500K));
|
||||
private static final HashSet<CorpusType> corpusTypesWithTaxonomy = new HashSet<>(Arrays.asList(CorpusType.GIGAFIDA, CorpusType.GOS, CorpusType.CCKRES, CorpusType.SSJ500K, CorpusType.VERT));
|
||||
|
||||
static {
|
||||
// GIGAFIDA ----------------------------
|
||||
@@ -108,6 +108,11 @@ public class Tax {
|
||||
tax = GIGAFIDA_TAXONOMY;
|
||||
} else if (corpusType == CorpusType.GOS) {
|
||||
tax = GOS_TAXONOMY;
|
||||
} else if (corpusType == CorpusType.VERT){
|
||||
// if VERT only order taxonomy by alphabet
|
||||
ArrayList<String> sortedFoundTaxonomy = new ArrayList<>(foundTax);
|
||||
Collections.sort(sortedFoundTaxonomy);
|
||||
return FXCollections.observableArrayList(sortedFoundTaxonomy);
|
||||
}
|
||||
|
||||
ArrayList<String> taxForCombo = new ArrayList<>();
|
||||
|
||||
@@ -696,6 +696,7 @@ public enum Taxonomy {
|
||||
}
|
||||
|
||||
public static ArrayList<Taxonomy> convertStringListToTaxonomyList(ObservableList<String> stringList){
|
||||
System.out.println(stringList);
|
||||
ArrayList<Taxonomy> taxonomyList = new ArrayList<>();
|
||||
|
||||
// System.out.println("INTERESTING STUFF");
|
||||
@@ -710,6 +711,9 @@ public enum Taxonomy {
|
||||
|
||||
public static void modifyingTaxonomy(ArrayList<Taxonomy> taxonomy, ArrayList<Taxonomy> checkedItemsTaxonomy, Corpus corpus){
|
||||
// get taxonomies that were selected/deselected by user
|
||||
// System.out.println(taxonomy);
|
||||
// System.out.println(checkedItemsTaxonomy);
|
||||
|
||||
Set<Taxonomy> disjointTaxonomies = new HashSet<>(checkedItemsTaxonomy);
|
||||
if (taxonomy != null) {
|
||||
disjointTaxonomies.addAll(taxonomy);
|
||||
|
||||
Reference in New Issue
Block a user