Solar grand fix.
This commit is contained in:
@@ -30,6 +30,7 @@ public class Corpus {
|
||||
private ArrayList<Taxonomy> taxonomy; // if gigafida or gos
|
||||
private Taxonomy taxonomyTotal;
|
||||
private HashMap<String, ObservableList<String>> solarFilters; // if solar
|
||||
public HashMap<String, ObservableList<String>> solarSelectedFilters; // if solar selected
|
||||
private HashMap<String, HashSet<String>> solarFiltersForXML; // if solar - used while parsing xml
|
||||
private boolean gosOrthMode;
|
||||
boolean hasMsdData;
|
||||
@@ -98,8 +99,10 @@ public class Corpus {
|
||||
|
||||
public ObservableList<String> getObservableListTaxonomy() {
|
||||
ArrayList<String> al = new ArrayList<>();
|
||||
for (Taxonomy t : this.taxonomy){
|
||||
al.add(t.toLongNameString());
|
||||
if(taxonomy != null) {
|
||||
for (Taxonomy t : this.taxonomy) {
|
||||
al.add(t.toLongNameString());
|
||||
}
|
||||
}
|
||||
return FXCollections.observableArrayList(al);
|
||||
}
|
||||
@@ -126,6 +129,15 @@ public class Corpus {
|
||||
logger.info("Corpus.set: ", solarFilters);
|
||||
}
|
||||
|
||||
public HashMap<String, ObservableList<String>> getSolarSelectedFilters() {
|
||||
return solarSelectedFilters;
|
||||
}
|
||||
|
||||
public void setSolarSelectedFilters(HashMap<String, ObservableList<String>> solarFilters) {
|
||||
this.solarSelectedFilters = solarFilters;
|
||||
logger.info("Corpus.set: ", solarFilters);
|
||||
}
|
||||
|
||||
public HashMap<String, HashSet<String>> getSolarFiltersForXML() {
|
||||
return solarFiltersForXML;
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@ import javafx.collections.ObservableList;
|
||||
|
||||
public class SolarFilters {
|
||||
private static HashMap<String, ObservableList<String>> SOLAR_FILTERS;
|
||||
public static final String SOLA = "sola";
|
||||
public static final String PREDMET = "predmet";
|
||||
public static final String RAZRED = "razred";
|
||||
public static final String REGIJA = "regija";
|
||||
public static final String TIP = "tip";
|
||||
public static final String LETO = "leto";
|
||||
public static final String SOLA = "filter.solarSola";
|
||||
public static final String PREDMET = "filter.solarPredmet";
|
||||
public static final String RAZRED = "filter.solarRazred";
|
||||
public static final String REGIJA = "filter.solarRegija";
|
||||
public static final String TIP = "filter.solarVrstaBesedila";
|
||||
public static final String LETO = "filter.solarLeto";
|
||||
|
||||
static {
|
||||
SOLAR_FILTERS = new HashMap<>();
|
||||
|
||||
@@ -636,13 +636,13 @@ public class StatisticsNew {
|
||||
info.put(I18N.get("exportHeader.minTaxonomies"), String.valueOf(filter.getMinimalTaxonomy()));
|
||||
|
||||
if (corpus.getCorpusType() == CorpusType.SOLAR) {
|
||||
HashMap<String, ObservableList<String>> filters = corpus.getSolarFilters();
|
||||
HashMap<String, ObservableList<String>> filters = corpus.getSolarSelectedFilters();
|
||||
|
||||
if (!isEmpty(filters)) {
|
||||
info.put(I18N.get("exportHeader.additionalFilters"), "");
|
||||
|
||||
for (Map.Entry<String, ObservableList<String>> f : filters.entrySet()) {
|
||||
info.put(f.getKey(), StringUtils.join(f.getValue(), ", "));
|
||||
info.put(I18N.get(f.getKey() + "L"), StringUtils.join(f.getValue(), ", "));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user