Search in sources :

Example 1 with IntegerArrayPropertyParser

use of org.structr.schema.parser.IntegerArrayPropertyParser in project structr by structr.

the class StructrIntegerArrayProperty method deserialize.

@Override
void deserialize(final SchemaProperty property) {
    super.deserialize(property);
    final IntegerArrayPropertyParser intPropertyParser = property.getIntArrayPropertyParser();
    if (intPropertyParser != null) {
        this.exclusiveMinimum = intPropertyParser.isLowerExclusive();
        this.exclusiveMaximum = intPropertyParser.isUpperExclusive();
        final Number min = intPropertyParser.getLowerBound();
        if (min != null) {
            this.minimum = min.intValue();
        }
        final Number max = intPropertyParser.getUpperBound();
        if (max != null) {
            this.maximum = max.intValue();
        }
    }
}
Also used : IntegerArrayPropertyParser(org.structr.schema.parser.IntegerArrayPropertyParser)

Example 2 with IntegerArrayPropertyParser

use of org.structr.schema.parser.IntegerArrayPropertyParser in project structr by structr.

the class SchemaProperty method getIntArrayPropertyParser.

public IntegerArrayPropertyParser getIntArrayPropertyParser() {
    if (intArrayPropertyParser == null) {
        try {
            intArrayPropertyParser = new IntegerArrayPropertyParser(new ErrorBuffer(), getName(), this);
            intArrayPropertyParser.getPropertySource(new StringBuilder(), getProperty(SchemaProperty.schemaNode));
        } catch (FrameworkException fex) {
            logger.warn("", fex);
        }
    }
    return intArrayPropertyParser;
}
Also used : ErrorBuffer(org.structr.common.error.ErrorBuffer) IntegerArrayPropertyParser(org.structr.schema.parser.IntegerArrayPropertyParser) FrameworkException(org.structr.common.error.FrameworkException)

Aggregations

IntegerArrayPropertyParser (org.structr.schema.parser.IntegerArrayPropertyParser)2 ErrorBuffer (org.structr.common.error.ErrorBuffer)1 FrameworkException (org.structr.common.error.FrameworkException)1