Package org.apache.maven.doxia.sink

Examples of org.apache.maven.doxia.sink.Sink


    protected void executeReport(final Locale locale) throws MavenReportException {
        try {
            this.execute(this.outputDirectory, locale);

            Sink kitchenSink = getSink();
            if (kitchenSink != null) {
                kitchenSink.rawText(indexHtmlContent);
            } else {
                writeIndexHtmlFile(outputDirectory, "index.html", indexHtmlContent);
            }
        } catch (Exception e) {
            final MavenReportException ex = new MavenReportException(e.getMessage());
View Full Code Here


    protected void executeReport(final Locale locale) throws MavenReportException {
        try {
            this.execute(this.outputDirectory, locale);

            Sink kitchenSink = getSink();
            if (kitchenSink != null) {
                kitchenSink.rawText(indexHtmlContent);
            } else {
                writeIndexHtmlFile(outputDirectory, "index.html", indexHtmlContent);
            }
        } catch (Exception e) {
            final MavenReportException ex = new MavenReportException(e.getMessage());
View Full Code Here

    protected void executeReport(final Locale locale) throws MavenReportException {
        try {
            this.execute(this.outputDirectory, locale);

            Sink kitchenSink = getSink();
            if (kitchenSink != null) {
                kitchenSink.rawText(indexHtmlContent);
            } else {
                writeIndexHtmlFile(outputDirectory, "index.html", indexHtmlContent);
            }
        } catch (Exception e) {
            final MavenReportException ex = new MavenReportException(e.getMessage());
View Full Code Here

            refDir.mkdirs();


            List<File> docSearchPath = createDocSearchPath();

            Sink sink = getSink();

            sink.head();
            sink.title();
            sink.text("Component Reference");
            sink.title_();
            sink.head_();

            sink.section1();
            sink.sectionTitle1();
            sink.text("Component Reference");
            sink.sectionTitle1_();
            sink.list();

            String currentSubpackage = null;

            for (String className : InternalUtils.sortedKeys(descriptions))
            {
                String subpackage = extractSubpackage(className);

                if (!SUPPORTED_SUBPACKAGES.contains(subpackage)) continue;

                if (!subpackage.equals(currentSubpackage))
                {
                    if (currentSubpackage != null)
                    {
                        sink.list_();
                        sink.section2_();
                    }

                    sink.section2();
                    sink.sectionTitle2();
                    sink.text(StringUtils.capitalize(subpackage));
                    sink.sectionTitle2_();


                    sink.list();

                    currentSubpackage = subpackage;
                }


                sink.listItem();

                sink.link(toHtml(toPath(className)));

                sink.text(className);
                sink.link_();

                writeClassDescription(descriptions, refDir, docSearchPath, className);


                sink.listItem_();
            }

            if (currentSubpackage != null)
            {
                sink.list_();
                sink.section2_();
            }
        }
        catch (Exception ex)
        {
            throw new MavenReportException(ex.getMessage(), ex);
View Full Code Here

    protected void executeReport(final Locale locale) throws MavenReportException {
        try {
            this.execute(this.outputDirectory, locale);

            Sink kitchenSink = getSink();
            if (kitchenSink != null) {
                kitchenSink.rawText(indexHtmlContent);
            } else {
                writeIndexHtmlFile(outputDirectory, "index.html", indexHtmlContent);
            }
        } catch (Exception e) {
            final MavenReportException ex = new MavenReportException(e.getMessage());
View Full Code Here

    protected void executeReport(final Locale locale) throws MavenReportException {
        try {
            this.execute(this.outputDirectory, locale);

            Sink kitchenSink = getSink();
            if (kitchenSink != null) {
                kitchenSink.rawText(indexHtmlContent);
            } else {
                writeIndexHtmlFile(outputDirectory, "index.html", indexHtmlContent);
            }
        } catch (Exception e) {
            final MavenReportException ex = new MavenReportException(e.getMessage());
View Full Code Here

                        return name.toLowerCase().endsWith(".html");
                    }
                });
                if (files != null && files.length > 0) {
                    boolean showIndex = files.length > 1;
                    Sink sink = getSink();
                    if (sink != null) {
                        StringBuilder buffer = new StringBuilder();
                        sink.head();
                        sink.title();
                        sink.text("Camel Endpoints");
                        sink.title_();
                        sink.rawText("<style>\n"
                                + "th, td {\n"
                                + "  text-align:left;\n\n"
                                + "}\n"
                                + "</style>\n");
                        sink.head_();

                        sink.body();
                        sink.section1();
                        sink.sectionTitle1();
                        sink.text("Camel Endpoints");
                        sink.sectionTitle1_();

                        if (showIndex) {
                            sink.list();
                        }
                        for (File file : files) {
                            getLog().info("found " + file.getAbsolutePath());

                            String linkName = file.getName();
                            if (linkName.endsWith(".html")) {
                                linkName = linkName.substring(0, linkName.length() - 5);
                            }
                            String endpointHtml = IOUtil.toString(new FileInputStream(file));
                            endpointHtml = extractBodyContents(endpointHtml);

                            if (showIndex) {
                                sink.listItem();
                                sink.link("#" + linkName);
                                sink.text(linkName);
                                sink.link_();
                                sink.listItem_();

                                buffer.append("<a name='" + linkName + "'>\n");
                                buffer.append(endpointHtml);
                                buffer.append("</a>\n");
                            } else {
                                sink.section1_();

                                sink.section2();
                                sink.rawText(endpointHtml);
                                sink.section2_();
                            }
                        }
                        if (showIndex) {
                            sink.list_();
                            sink.section1_();

                            sink.section2();
                            sink.rawText(buffer.toString());
                            sink.section2_();
                        }
                        sink.body_();
                        sink.flush();
                        sink.close();
                    }
                }
            }
        } catch (Exception e) {
            final MavenReportException ex = new MavenReportException(e.getMessage());
View Full Code Here

    protected void executeReport(final Locale locale) throws MavenReportException {
        try {
            this.execute(this.outputDirectory, locale);

            Sink kitchenSink = getSink();
            if (kitchenSink != null) {
                kitchenSink.rawText(indexHtmlContent);
            } else {
                writeIndexHtmlFile(outputDirectory, "index.html", indexHtmlContent);
            }
        } catch (Exception e) {
            final MavenReportException ex = new MavenReportException(e.getMessage());
View Full Code Here

    protected void executeReport(final Locale locale) throws MavenReportException {
        try {
            this.execute(this.outputDirectory, locale);

            Sink kitchenSink = getSink();
            if (kitchenSink != null) {
                kitchenSink.rawText(indexHtmlContent);
            } else {
                writeIndexHtmlFile(outputDirectory, "index.html", indexHtmlContent);
            }
        } catch (Exception e) {
            final MavenReportException ex = new MavenReportException(e.getMessage());
View Full Code Here

    protected void executeReport(final Locale locale) throws MavenReportException {
        try {
            this.execute(this.outputDirectory, locale);

            Sink kitchenSink = getSink();
            if (kitchenSink != null) {
                kitchenSink.rawText(indexHtmlContent);
            } else {
                writeIndexHtmlFile(outputDirectory, "index.html", indexHtmlContent);
            }
        } catch (Exception e) {
            final MavenReportException ex = new MavenReportException(e.getMessage());
View Full Code Here

TOP

Related Classes of org.apache.maven.doxia.sink.Sink

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.