![JAR search and dependency download from the Maven repository](/logo.png)
no.ssb.jsonstat.JsonStat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of json-stat-java Show documentation
Show all versions of json-stat-java Show documentation
Json stat implementation in Java
The newest version!
package no.ssb.jsonstat;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Created by hadrien on 07/06/16.
*
* @see json-stat.org/format/#version
*/
public class JsonStat {
private final Version version;
private final Class clazz;
public JsonStat(Version version, Class clazz) {
this.version = version;
this.clazz = clazz;
}
public String getVersion() {
return version.getTag();
}
@JsonProperty("class")
public String getClazz() {
return clazz.toString().toLowerCase();
}
public enum Version {
ONE("1.0"), TWO("2.0");
private final String tag;
Version(final String tag) {
this.tag = tag;
}
String getTag() {
return this.tag;
}
}
public enum Class {
DATASET,
DIMENSION,
COLLECTION
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy