Package org.foray.core

Examples of org.foray.core.FOrayDocument


        // Setup FOraySession
        final FOraySession session = FOraySpecific.makeFOraySession(null);

        // Setup FOrayDocument
        final InputSource inputSource = new InputSource(fo.openStream());
        final FOrayDocument document = new FOrayDocument(session, inputSource,
                null);

        //Setup Renderer
        final OutputStream out = new FileOutputStream(pdf);
        final OutputTarget renderer = OutputTargetFactory.makeOutputTarget(
View Full Code Here


            }

            final FOraySession session = FOraySpecific.makeFOraySession(
                    configuration);

            FOrayDocument document = null;
            if (xsl == null) {
                InputSource inputSource = null;
                inputSource = new InputSource(xmlFile.toURI().toURL().openStream());
                document = new FOrayDocument(session, inputSource, null);
            } else {
                document = new FOrayDocument(session, xmlFile.toURI().toURL(),
                        URLFactory.createURL(this.baseDir + "/" + xsl));
            }


            String outname = xmlFile.getName();
View Full Code Here

        final Source source = new StreamSource(xml);
        /*
         * Create the FOrayDocument using the JAXP constructor. Resulting SAX
         * events (the generated FO) will be piped through to FOray.
         */
        final FOrayDocument document = new FOrayDocument(session, transformer,
                source);

        //Setup Renderer
        OutputStream out;
        try {
View Full Code Here

        final Source source = team.getSourceForProjectTeam();
        /*
         * Create the FOrayDocument using the JAXP constructor. Resulting SAX
         * events (the generated FO) will be piped through to FOray.
         */
        final FOrayDocument document = new FOrayDocument(session, transformer,
                source);

        //Setup Renderer
        OutputStream out;
        try {
View Full Code Here

        //Setup FOraySession
        final FOraySession session = FOraySpecific.makeFOraySession(null);

        //Setup FOrayDocument
        final InputSource inputSource = new InputSource(fo.openStream());
        final FOrayDocument document = new FOrayDocument(session, inputSource,
                null);

        //Setup renderer
        final AWTRenderer renderer = new AWTRenderer(getLogger(), null);
View Full Code Here

     * @return A FOrayDocument to be used in processing.
     * @throws FOrayException For errors creating the document.
     */
    protected FOrayDocument setupSAXDocument(final FOraySession session,
            final InputSource inputSource) throws FOrayException {
        return new FOrayDocument(session, inputSource, null);
    }
View Full Code Here

            throws TransformerConfigurationException, FOrayException {
        final TransformerFactory factory = TransformerFactory.newInstance();
        final Transformer transformer = factory.newTransformer(
                new StreamSource(xslFile));
        final Source source = new StreamSource(xmlFile);
        final FOrayDocument document = new FOrayDocument(session, transformer,
                source);
        return document;
    }
View Full Code Here

     */
    public void renderFO(final InputSource inputHandler,
            final HttpServletResponse response) throws ServletException {
        try {
            final FOraySession session = setupSession(response);
            final FOrayDocument document = setupSAXDocument(session,
                    inputHandler);

            // Setup the Renderer
            final ByteArrayOutputStream output = new ByteArrayOutputStream();
            final OutputTarget renderer = OutputTargetFactory.makeOutputTarget(
View Full Code Here

            // Setup FOrayDocument
            final TransformerFactory factory = TransformerFactory.newInstance();
            final Transformer transformer = factory.newTransformer(
                    new StreamSource(xslFile));
            final Source source = new StreamSource(xmlFile);
            final FOrayDocument document = new FOrayDocument(session,
                    transformer, source);

            // Setup the Renderer
            final ByteArrayOutputStream output = new ByteArrayOutputStream();
            final OutputTarget renderer = OutputTargetFactory.makeOutputTarget(
View Full Code Here

        final SessionConfig configuration = getOptions().getSessionConfig();
        final FOraySession session = FOraySpecific.makeFOraySession(
                configuration);

        this.document = new FOrayDocument(session, getInputSource(), null);

        final OutputConfig renderOptions =
                getCommandLineOptions().getRendererOptions();
        this.renderer = new AWTRenderer(this.getLogger(), renderOptions);
        try {
View Full Code Here

TOP

Related Classes of org.foray.core.FOrayDocument

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.