Search in sources :

Example 1 with LongPropertyParser

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

the class StructrLongProperty method deserialize.

@Override
void deserialize(final SchemaProperty property) {
    super.deserialize(property);
    final LongPropertyParser longPropertyParser = property.getLongPropertyParser();
    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 : LongPropertyParser(org.structr.schema.parser.LongPropertyParser)

Example 2 with LongPropertyParser

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

the class SchemaProperty method getLongPropertyParser.

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

Aggregations

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