eu.xenit.apix.workflow.search.Facets Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apix-interface Show documentation
Show all versions of apix-interface Show documentation
Xenit API-X Java interface
package eu.xenit.apix.workflow.search;
import java.util.HashMap;
import java.util.Map;
public class Facets {
public Map facets;
public Facets() {
this.facets = new HashMap<>();
}
public Facets(Map facets) {
this.facets = facets;
}
public void CheckValidity() {
for (String s : facets.keySet()) {
if (s == null) {
throw new Error("Key of facet cannot be null");
}
Facet f = facets.get(s);
for (String v : f.getValues().keySet()) {
if (v == null) {
throw new Error("Value of facet with key " + s + "of facet cannot be null");
}
}
}
}
public Map getFacets() {
return facets;
}
public void setFacets(Map facets) {
this.facets = facets;
}
public void AddValue(String property, String value) {
Facet f = facets.get(property);
if (f == null) {
f = new Facet(property, new HashMap());
facets.put(property, f);
}
f.AddValue(value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy