Package org.foray.fotree.value

Examples of org.foray.fotree.value.PropertyValue


     * @return The parsed, storable property value.
     * @throws PropertyException For an invalid property value.
     */
    private PropertyValue createPropertyValue(final FObj fobj,
            final String value) throws PropertyException {
        final PropertyValue pv = standardParse(fobj, value);
        if (pv.canEvalKeyword()) {
            return pv;
        }
        if (pv.canEvalInteger()) {
            return pv;
        }
        throw unexpectedValue(value, fobj);
    }
View Full Code Here


     * @return The parsed, storable property value.
     * @throws PropertyException For an invalid property value.
     */
    private PropertyValue createPropertyValue(final FObj fobj,
            final String value) throws PropertyException {
        final PropertyValue pv = checkKeywords(this.getValidKeywords(), value);
        if (pv != null) {
            return pv;
        }
        throw unexpectedValue(value, fobj);
    }
View Full Code Here

     * @return The parsed, storable property value.
     * @throws PropertyException For an invalid property value.
     */
    private PropertyValue createPropertyValue(final FObj fobj,
            final String value) throws PropertyException {
        final PropertyValue pv = standardParse(fobj, value);
        if (pv.canEvalKeyword()) {
            return pv;
        }
        if (pv.canEvalPercentage()) {
            return pv;
        }
        if (pv.canEvalNumeric()) {
            final double number = pv.evalNumeric();
            if (pv.getUnitPower() == Expr.UNIT_POWER_NUMERIC
                    && number >= 0
                    && number <= WKConstants.PERCENT_CONVERSION) {
                return pv;
            }
            throw unexpectedValue(value, fobj);
View Full Code Here

     * @return The parsed, storable property value.
     * @throws PropertyException For an invalid property value.
     */
    private PropertyValue createPropertyValue(final FObj fobj,
            final String value) throws PropertyException {
        final PropertyValue pv = standardParse(fobj, value);
        if (pv.canEvalKeyword()) {
            return pv;
        }
        if (pv.canEvalLength()) {
            return pv;
        }
        throw unexpectedValue(value, fobj);
    }
View Full Code Here

     * @return The parsed, storable property value.
     * @throws PropertyException For an invalid property value.
     */
    private PropertyValue createPropertyValue(final FObj fobj,
            final String value) throws PropertyException {
        final PropertyValue pv = standardParse(fobj, value);
        if (pv.canEvalKeyword()) {
            return pv;
        }
        throw unexpectedValue(value, fobj);
    }
View Full Code Here

     * @throws PropertyException For an invalid property value.
     */
    private PropertyValue createPropertyValue(final FObj fobj,
            final String subPropertyName, final String value)
            throws PropertyException {
        final PropertyValue pv = this.standardParse(fobj, value);
        if (pv.canEvalKeyword()) {
            return pv;
        }
        if (pv.canEvalLength()) {
            /* Wrap it inside the compound data type intended for this
             * purpose.*/
            final DtLengthBPIPDirection bpip = new DtLengthBPIPDirection(
                    DtLength.ZERO_LENGTH, DtLength.ZERO_LENGTH);
            if ("block-progression-direction".equals(subPropertyName)) {
View Full Code Here

        }
        if (value() instanceof DtLengthBPIPDirection) {
            final DtLengthBPIPDirection lengthDir = (DtLengthBPIPDirection)
                    value();
            if (axis == RelativeAxis.BLOCK_PROGRESSION) {
                final PropertyValue length = lengthDir.getBPDLength();
                return this.convertValueToLength(length, fobj, context);
            }
            if (axis == RelativeAxis.INLINE_PROGRESSION) {
                final PropertyValue length = lengthDir.getIPDLength();
                return this.convertValueToLength(length, fobj, context);
            }
        }
        throw this.unexpectedRetrieval();
    }
View Full Code Here

        }
        final DtLengthBPIPDirection lengthDirection =
                (DtLengthBPIPDirection) value();

        /* Parse the attribute. */
        final PropertyValue pv = standardParse(fobj, attributeValue);
        if (pv.canEvalLength()) {
            final String subPropertyName = Property.getSubPropertyName(
                    propertyFullName);
            if ("block-progression-direction".equals(subPropertyName)) {
                lengthDirection.setBPDLength(pv);
                return true;
View Full Code Here

     * @return The parsed, storable property value.
     * @throws PropertyException For an invalid property value.
     */
    private PropertyValue createPropertyValue(final FObj fobj,
            final String value) throws PropertyException {
        PropertyValue pv = DtURI.makeUriDT(value);
        if (pv != null) {
            return pv;
        }
        pv = checkKeywords(this.getValidKeywords(), value);
        if (pv != null) {
View Full Code Here

     * @return The parsed, storable property value.
     * @throws PropertyException For an invalid property value.
     */
    private PropertyValue createPropertyValue(final FObj fobj,
            final String value) throws PropertyException {
        final PropertyValue pv = standardParse(fobj, value);
        if (pv.canEvalKeyword()) {
            return pv;
        }
        if (pv.canEvalPercentage()) {
            return pv;
        }
        if (pv.canEvalLength()) {
            return pv;
        }
        throw unexpectedValue(value, fobj);
    }
View Full Code Here

TOP

Related Classes of org.foray.fotree.value.PropertyValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.