本文整理汇总了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_();
}
示例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();
}
示例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_();
}
示例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);
}
示例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();
}
示例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);
}
}
示例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());
}
}