Package org.foray.fotree

Examples of org.foray.fotree.Property


        if (enumeration == null) {
            return null;
        }
        switch (enumeration) {
        case BLOCK_PROGRESSION_DIMENSION: {
            final Property property = getProperty(fobj,
                    FoProperty.BLOCK_PROGRESSION_DIMENSION);
            if (property == null) {
                return null;
            }
            ((PdBlockProgressionDimension) property).addComponent(fobj,
                    propertyFullName, attributeValue);
            return property;
        }
        case INLINE_PROGRESSION_DIMENSION: {
            final Property property = getProperty(fobj,
                    FoProperty.INLINE_PROGRESSION_DIMENSION);
            if (property == null) {
                return null;
            }
            ((PdInlineProgressionDimension) property).addComponent(fobj,
                    propertyFullName, attributeValue);
            return property;
        }
        case SPACE_AFTER: {
            final Property property = getProperty(fobj,
                    FoProperty.SPACE_AFTER);
            if (property == null) {
                return null;
            }
            if (property instanceof PdSpaceAfter) {
                final PdSpaceAfter spaceAfter = (PdSpaceAfter) property;
                spaceAfter.addComponent(fobj, propertyFullName,
                        attributeValue);
                return property;
            } else {
                throw new IllegalStateException("space-after instance "
                        + "is of an unexpected type.");
            }
        }
        case SPACE_BEFORE: {
            final Property property = getProperty(fobj,
                    FoProperty.SPACE_BEFORE);
            if (property == null) {
                return null;
            }
            if (property instanceof PdSpaceBefore) {
                final PdSpaceBefore spaceBefore = (PdSpaceBefore) property;
                spaceBefore.addComponent(fobj, propertyFullName,
                        attributeValue);
                return property;
            } else {
                throw new IllegalStateException("space-before instance "
                        + "is of an unexpected type.");
            }
        }
        case SPACE_END: {
            final Property property = getProperty(fobj,
                    FoProperty.SPACE_END);
            if (property == null) {
                return null;
            }
            if (property instanceof PdSpaceEnd) {
                final PdSpaceEnd spaceEnd = (PdSpaceEnd) property;
                spaceEnd.addComponent(fobj, propertyFullName,
                        attributeValue);
                return property;
            } else {
                throw new IllegalStateException("space-end instance "
                        + "is of an unexpected type.");
            }
        }
        case SPACE_START: {
            final Property property = getProperty(fobj,
                    FoProperty.SPACE_START);
            if (property == null) {
                return null;
            }
            if (property instanceof PdSpaceStart) {
                final PdSpaceStart spaceStart = (PdSpaceStart) property;
                spaceStart.addComponent(fobj, propertyFullName,
                        attributeValue);
                return property;
            } else {
                throw new IllegalStateException("space-start instance "
                        + "is of an unexpected type.");
            }
        }
        case BORDER_SEPARATION: {
            final Property property = getProperty(fobj,
                    FoProperty.BORDER_SEPARATION);
            if (property == null) {
                return null;
            }
            assert property instanceof PdBorderSeparation : "border-separation "
                    + "must be a BorderSeparation";
            ((PdBorderSeparation) property).addComponent(fobj,
                    propertyFullName, attributeValue);
            return property;
        }
        case LETTER_SPACING: {
            final Property property = getProperty(fobj,
                    FoProperty.LETTER_SPACING);
            if (property == null) {
                return null;
            }
            assert property instanceof PdLetterSpacing : "letter-spacing "
                    + "must be a LetterSpacing";
            ((PdLetterSpacing) property).addComponent(fobj,
                    propertyFullName, attributeValue);
            return property;
        }
        case WORD_SPACING: {
            final Property property = getProperty(fobj,
                    FoProperty.WORD_SPACING);
            if (property == null) {
                return null;
            }
            assert property instanceof PdWordSpacing : "word-spacing "
                    + "must be a WordSpacing";
            ((PdWordSpacing) property).addComponent(fobj,
                    propertyFullName, attributeValue);
            return property;
        }
        case KEEP_TOGETHER: {
            final Property property = getProperty(fobj,
                    FoProperty.KEEP_TOGETHER);
            if (property == null) {
                return null;
            }
            assert property instanceof AbstractKeep : "keep-together "
                    + "must be a Keep";
            ((AbstractKeep) property).addComponent(fobj,
                    propertyFullName, attributeValue);
            return property;
        }
        case KEEP_WITH_NEXT: {
            final Property property = getProperty(fobj,
                    FoProperty.KEEP_WITH_NEXT);
            if (property == null) {
                return null;
            }
            assert property instanceof AbstractKeep : "keep-with-next "
                    + "must be a Keep";
            ((AbstractKeep) property).addComponent(fobj,
                    propertyFullName, attributeValue);
            return property;
        }
        case KEEP_WITH_PREVIOUS: {
            final Property property = getProperty(fobj,
                    FoProperty.KEEP_WITH_PREVIOUS);
            if (property == null) {
                return null;
            }
            assert property instanceof AbstractKeep : "keep-with-previous "
                    + "must be a Keep";
            ((AbstractKeep) property).addComponent(fobj,
                    propertyFullName, attributeValue);
            return property;
        }
        case LINE_HEIGHT: {
            final Property property = getProperty(fobj,
                    FoProperty.LINE_HEIGHT);
            if (property == null) {
                return null;
            }
            assert property instanceof PdLineHeight : "line-height "
                    + "must be a LineHeight";
            ((PdLineHeight) property).addComponent(fobj,
                    propertyFullName, attributeValue);
            return property;
        }
        case LEADER_LENGTH: {
            final Property property = getProperty(fobj,
                    FoProperty.LEADER_LENGTH);
            if (property == null) {
                return null;
            }
            assert property instanceof PdLeaderLength : "leader-length "
View Full Code Here


        PropertyList propertyList = new PropertyList(1);
        final FlowNameSpecifier flowNameSpecifier = new FlowNameSpecifier(
                sourceList, propertyList);
        sourceList.addChild(flowNameSpecifier);
        Property property = new PdFlowNameReference(flowNameSpecifier,
                    FoProperty.FLOW_NAME_REFERENCE.toXslFo(), impliedName);
        propertyList.addProperty(flowNameSpecifier, property);

        /* The target part. */
        final FlowTargetList targetList = new FlowTargetList(assignment,
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public String getMetadataName() {
        final Property rawProperty = this.getPropertyList().getProperty(
                AxslProperty.METADATA_KEY);
        final AxslEnumerated property = (AxslEnumerated) rawProperty;
        if (property == null) {
            return "";
        }
View Full Code Here

            throws PropertyException {
        final String basePropertyName = Property.getBasePropertyName(
                propertyFullName);
        final AxslProperty enumeration = enumeratePropertyName(
                basePropertyName);
        final Property property = checkCompoundProperty(fobj,
                enumeration, propertyFullName, attributeValue);
        if (property != null) {
            return property;
        }
        if (enumeration == null) {
View Full Code Here

        final FoProperty propertyType = this.getPropertyType();
        /*
         * TODO: This is not right. It needs to return the inherited value
         * regardless of whether the Property was explicitly set or not.
         */
        final Property ps = parent.getPropertyList().getProperty(propertyType);
        if (ps == null) {
            throw new PropertyException("Invalid operand: "
                    + "'inherited-property-value' function");
        }
        return ps.value();
    }
View Full Code Here

        final FoProperty propertyType = this.getPropertyType();
        /*
         * TODO: This is not right. It needs to return the PropertyValue
         * regardless of whether the Property was explicitly set or not.
         */
        final Property ps = parent.getPropertyList().getProperty(propertyType);
        if (ps == null) {
            throw new PropertyException("Invalid operand: 'from-parent' "
                    + "function");
        }
        return ps.value();
    }
View Full Code Here

     */
    public Property parseAttributeForNS(final Attributes attributes,
            final String attributeName, final String attributeValue,
            final FObj fobj, final Locator locator)
            throws PropertyException {
        final Property property = PropertyMakerFO.makeProperty(attributeName,
                attributeValue, fobj);
        return property;
    }
View Full Code Here

TOP

Related Classes of org.foray.fotree.Property

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.