net.anwiba.commons.json.schema.v1_0.ObjectProperty Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of anwiba-commons-advanced Show documentation
Show all versions of anwiba-commons-advanced Show documentation
anwiba commons advanced library project
//Copyright (c) 2016 by Andreas W. Bartels ([email protected])
package net.anwiba.commons.json.schema.v1_0;
import java.util.LinkedHashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;
import net.anwiba.commons.ensure.Conditions;
import net.anwiba.commons.ensure.Ensure;
public class ObjectProperty
extends net.anwiba.commons.json.schema.v1_0.Property
{
private final String type = "object";
private String format = null;
private net.anwiba.commons.json.schema.v1_0.Property required = null;
private final Map properties = new LinkedHashMap();
@JsonProperty("type")
public void setType(final String type) {
}
@JsonProperty("type")
public String getType() {
return this.type;
}
@JsonProperty("format")
public void setFormat(final String format) {
this.format = format;
}
@JsonProperty("format")
public String getFormat() {
return this.format;
}
@JsonProperty("required")
public void setRequired(final net.anwiba.commons.json.schema.v1_0.Property required) {
this.required = required;
}
@JsonProperty("required")
public net.anwiba.commons.json.schema.v1_0.Property getRequired() {
return this.required;
}
public void setProperties(final String name, final net.anwiba.commons.json.schema.v1_0.Property value) {
Ensure.ensureThatArgument(name, Conditions.notNull());
this.properties.put(name, value);
}
@JsonProperty("properties")
public void setProperties(final Map properties) {
if (properties == null) {
this.properties.clear();
return ;
}
this.properties.clear();
this.properties.putAll(properties);
}
public net.anwiba.commons.json.schema.v1_0.Property getProperties(final String name) {
if (name == null) {
return null;
}
return this.properties.get(name);
}
@JsonProperty("properties")
public Map getProperties() {
if (this.properties.isEmpty()) {
return null;
}
return this.properties;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy