![JAR search and dependency download from the Maven repository](/logo.png)
com.reprezen.genflow.common.jsonschema.builder.PropertyRealizationNode Maven / Gradle / Ivy
package com.reprezen.genflow.common.jsonschema.builder;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.reprezen.genflow.common.jsonschema.builder.JsonSchemaNodeFactory;
import com.reprezen.genflow.common.jsonschema.builder.PropertyNode;
import com.reprezen.rapidml.Feature;
import com.reprezen.rapidml.PrimitiveProperty;
import com.reprezen.rapidml.PropertyRealization;
@SuppressWarnings("all")
public class PropertyRealizationNode extends PropertyNode {
public PropertyRealizationNode(final JsonSchemaNodeFactory director, final PropertyRealization element) {
super(director, element);
}
@Override
public void writeType(final ObjectNode body) {
final Feature baseProperty = this.element.getBaseProperty();
if ((baseProperty instanceof PrimitiveProperty)) {
this.writeConstrainableType(body, this.element, ((PrimitiveProperty)baseProperty).getType());
}
}
@Override
public String getName() {
return this.element.getBaseProperty().getName();
}
@Override
public int getMinOccurs() {
return this.element.getMinOccurs();
}
@Override
public int getMaxOccurs() {
return this.element.getMaxOccurs();
}
@Override
public Feature getBaseFeature() {
return this.element.getBaseProperty();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy