Search in sources :

Example 1 with LongArrayPropertyParser

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

the class StructrLongArrayProperty method deserialize.

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

Example 2 with LongArrayPropertyParser

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

the class SchemaProperty method getLongArrayPropertyParser.

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

Aggregations

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