当前位置: 首页>>代码示例>>Java>>正文


Java Sink.rawText方法代码示例

本文整理汇总了Java中org.apache.maven.doxia.sink.Sink.rawText方法的典型用法代码示例。如果您正苦于以下问题:Java Sink.rawText方法的具体用法?Java Sink.rawText怎么用?Java Sink.rawText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.maven.doxia.sink.Sink的用法示例。


在下文中一共展示了Sink.rawText方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: reportBody

import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
@Override
protected void reportBody(ReportTimeReporter reporterWithResults, API oldAPI, API newAPI, Sink sink,
        ResourceBundle messages) {
    if (oldAPI == null || newAPI == null) {
        return;
    }

    sink.section2();
    sink.sectionTitle2();
    String title = messages.getString("report.revapi.aggregate.subTitle");
    sink.rawText(MessageFormat.format(title, niceList(oldAPI.getArchives()), niceList(newAPI.getArchives())));
    sink.sectionTitle2_();

    super.reportBody(reporterWithResults, oldAPI, newAPI, sink, messages);

    sink.section2_();
}
 
开发者ID:revapi,项目名称:revapi,代码行数:18,代码来源:ReportAggregateMojo.java

示例2: createReport

import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
private void createReport(String reportName, Locale locale, Document document) throws IOException {
       SinkFactory factory = getSinkFactory(); 
       Sink sink = factory.createSink(getReportOutputDirectory(), reportName);
       sinkBeginReport(sink, getBundle( locale ));
       sink.rawText(document.html());
       //addElements(sink, document.head().getElementsByTag("link"));
	//addElements(sink, document.head().getElementsByTag("script"));
	//addElements(sink, document.body().children());
       sinkEndReport(sink);
       sink.close();
}
 
开发者ID:ZsZs,项目名称:FitNesseLauncher,代码行数:12,代码来源:FitNesseHtmlReport.java

示例3: startReport

import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
protected void startReport(Sink sink, ResourceBundle messages) {
    sink.head();
    sink.title();
    sink.text(messages.getString("report.revapi.title"));
    sink.title_();
    sink.head_();

    sink.body();

    sink.section1();
    sink.sectionTitle1();
    sink.rawText(messages.getString("report.revapi.title"));
    sink.sectionTitle1_();
}
 
开发者ID:revapi,项目名称:revapi,代码行数:15,代码来源:ReportMojo.java

示例4: processJavadoc

import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
private void processJavadoc(Sink sink, final String javadoc) {

    if (javadoc == null) {
      return;
    }

    // TODO(drewc) split javadoc on lines and put in <p></p> bits for blank (or whitespace only)
    // lines.
    sink.rawText(javadoc);
  }
 
开发者ID:spotify,项目名称:docgenerator,代码行数:11,代码来源:DocgeneratorMojo.java

示例5: parse

import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
@Override
public void parse(final @Nullable Reader reader, final @Nullable Sink sink) throws ParseException {
    final String markupContent = readMarkupContent(Nullsafe.nullsafe(reader));
    final String htmlContent = parseToHtml(markupContent);

    final Sink nullsafeSink = Nullsafe.nullsafe(sink);
    nullsafeSink.rawText(htmlContent);
    nullsafeSink.flush();
    nullsafeSink.close();
}
 
开发者ID:sebhoss,项目名称:doxia-module-wikitext,代码行数:11,代码来源:AbstractWikitextParser.java

示例6: executeReport

import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
/**
 * Be aware of http://maven.apache.org/plugin-developers/common-bugs.html#Determining_the_Output_Directory_for_a_Site_Report
 */
@Override
protected void executeReport(Locale locale) throws MavenReportException {
       try {
		String[] reports = this.reportsDir.list(HtmlFilter.INSTANCE);
		//boolean styleDone = false;
			
		ResourceBundle bundle = getBundle( locale );
		Sink sink = this.getSink();
           sinkBeginReport(sink, bundle);
           sink.sectionTitle1();
       	sink.text( bundle.getString( "report.fitnesse.name" ) );
       	sink.sectionTitle1_();
		for(String report : reports) {
               //String html = html(report);
               Document document = Jsoup.parse(new File(this.reportsDir, report), null);
               Elements tables = document.getElementsByTag("table");
               // Is it a top-level index page?
               if(tables.size() == 1 &&
                   testTdElements(tables.get(0).getElementsByTag("td"), "name", "right", "wrong", "exceptions")) {
                   	
               	Elements hrefs = document.getElementsByTag("a");
               	for(Element href : hrefs) {
               		String extant = href.attr("href");
               		href.attr("href", OUTPUT_NAME + "." + extant);
               	}
                   sink.rawText(document.html());
				/*
               	if(!styleDone) {
                       addElements(sink, document.head().getElementsByTag("link"));
                       addElements(sink, document.head().getElementsByTag("script"));
                       styleDone = true;
               	}
                   addElements(sink, document.body().children());
                   */
               	
               } else {
		    	String mavenName = OUTPUT_NAME + "." + report;
		    	createReport(mavenName, locale, document);
               }
		}
           sinkEndReport(sink);
		
		copyResources("css", "images", "javascript");
	} catch (IOException e) {
		getLog().error(e);
		throw new MavenReportException("Exception generating " + getBundle( locale ).getString( "report.fitnesse.name" ), e);
	}
}
 
开发者ID:ZsZs,项目名称:FitNesseLauncher,代码行数:52,代码来源:FitNesseHtmlReport.java

示例7: addElements

import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
@SuppressWarnings("unused")
private void addElements(Sink sink, List<Element> elements) {
	for(Element element : elements) {
           sink.rawText(element.html());
	}
}
 
开发者ID:ZsZs,项目名称:FitNesseLauncher,代码行数:7,代码来源:FitNesseHtmlReport.java


注:本文中的org.apache.maven.doxia.sink.Sink.rawText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。