Package org.foray.fotree.fo.obj

Examples of org.foray.fotree.fo.obj.Root


     * @throws FOrayException For errors building the FO Tree.
     */
    public AreaTree buildAreaTree(final String file) throws FOrayException {
        final FoDocumentReader foReader = FoDocumentReader.getInstance();
        final FOTreeBuilder foTree = foReader.buildFoTree(file);
        final Root root = foTree.getRootFo();
        final AreaTree areaTree = this.areaTreeFactory.makeAreaTree(root);
        final PioneerLS layout = this.layoutFactory.makeLayout();
        final Iterator<PageSequence> iterator = root.getPageSequenceIterator();
        while (iterator.hasNext()) {
            final PageSequence pageSequence = iterator.next();
            try {
                final PageCollection collection = areaTree.makePageCollection(
                        pageSequence);
View Full Code Here


     * Returns the first flow item in a given fo tree.
     * @param foTree The fo tree whose first flow is needed.
     * @return The first flow in {@code foTree}.
     */
    protected Flow getFlow(final FOTreeBuilder foTree) {
        final Root root = foTree.getRootFo();
        FObj node = root.getChildAt(1);
        assertTrue(node instanceof PageSequence);
        final PageSequence sequence = (PageSequence) node;
        node = sequence.getChildAt(0);
        assertTrue(node instanceof Flow);
        final Flow flow = (Flow) node;
View Full Code Here

        }
        case INSTREAM_FOREIGN_OBJECT: {
            return new InstreamForeignObject(parent, propertyList);
        }
        case LAYOUT_MASTER_SET: {
            final Root root = parentRoot(enumeration, parent, locator);
            return new LayoutMasterSet(root, propertyList);
        }
        case LEADER: {
            return new Leader(parent, propertyList);
        }
        case LIST_BLOCK: {
            return new ListBlock(parent, propertyList);
        }
        case LIST_ITEM: {
            return new ListItem(parent, propertyList);
        }
        case LIST_ITEM_BODY: {
            return new ListItemBody(parent, propertyList);
        }
        case LIST_ITEM_LABEL: {
            return new ListItemLabel(parent, propertyList);
        }
        case MARKER: {
            return new Marker(parent, propertyList);
        }
        case MULTI_CASE: {
            return new MultiCase(parent, propertyList);
        }
        case MULTI_PROPERTIES: {
            return new MultiProperties(parent, propertyList);
        }
        case MULTI_PROPERTY_SET: {
            return new MultiPropertySet(parent, propertyList);
        }
        case MULTI_SWITCH: {
            return new MultiSwitch(parent, propertyList);
        }
        case MULTI_TOGGLE: {
            return new MultiToggle(parent, propertyList);
        }
        case PAGE_NUMBER: {
            return new PageNumber(parent, propertyList);
        }
        case PAGE_NUMBER_CITATION: {
            return new PageNumberCitation(parent, propertyList);
        }
        case PAGE_NUMBER_CITATION_LAST: {
            return new PageNumberCitationLast(parent, propertyList);
        }
        case PAGE_SEQUENCE: {
            final Root root = parentRoot(enumeration, parent, locator);
            return new PageSequence(root, propertyList);
        }
        case PAGE_SEQUENCE_MASTER: {
            return new PageSequenceMaster(parent, propertyList);
        }
        case PAGE_SEQUENCE_WRAPPER: {
            return new PageSequenceWrapper(parent, propertyList);
        }
        case REGION_AFTER: {
            final SimplePageMaster simplePageMaster = parentSimplePageMaster(
                    enumeration, parent, locator);
            return new RegionAfter(simplePageMaster, propertyList);
        }
        case REGION_BEFORE: {
            final SimplePageMaster simplePageMaster = parentSimplePageMaster(
                    enumeration, parent, locator);
            return new RegionBefore(simplePageMaster, propertyList);
        }
        case REGION_BODY: {
            final SimplePageMaster simplePageMaster = parentSimplePageMaster(
                    enumeration, parent, locator);
            return new RegionBody(simplePageMaster, propertyList);
        }
        case REGION_END: {
            final SimplePageMaster simplePageMaster = parentSimplePageMaster(
                    enumeration, parent, locator);
            return new RegionEnd(simplePageMaster, propertyList);
        }
        case REGION_NAME_SPECIFIER: {
            final FlowTargetList flowTargetList = parentFlowTargetList(
                    enumeration, parent, locator);
            return new RegionNameSpecifier(flowTargetList, propertyList);
        }
        case REGION_START: {
            final SimplePageMaster simplePageMaster = parentSimplePageMaster(
                    enumeration, parent, locator);
            return new RegionStart(simplePageMaster, propertyList);
        }
        case REPEATABLE_PAGE_MASTER_ALTERNATIVES: {
            return new RepeatablePMAlternatives(parent, propertyList);
        }
        case REPEATABLE_PAGE_MASTER_REFERENCE: {
            return new RepeatablePMReference(parent, propertyList);
        }
        case RETRIEVE_MARKER: {
            return new RetrieveMarker(parent, propertyList);
        }
        case RETRIEVE_TABLE_MARKER: {
            return new RetrieveTableMarker(parent, propertyList);
        }
        case ROOT: {
            return new Root(propertyList);
        }
        case SCALING_VALUE_CITATION: {
            return new ScalingValueCitation(parent, propertyList);
        }
        case SIMPLE_PAGE_MASTER: {
View Full Code Here

     * @return The newly-created FObj.
     */
    protected static final FObj makeTestFObj() {
        final FOTreeBuilder foTreeBuilder = new FOTreeBuilder(null, null);
        final PropertyList propertyList = new PropertyList(0);
        final Root root = new Root(propertyList);
        root.setFOTreeBuilder(foTreeBuilder);
        root.setLocation("JUnit", -1, -1);
        return root;
    }
View Full Code Here

TOP

Related Classes of org.foray.fotree.fo.obj.Root

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.