org.apache.maven.doxia.sink.Sink.rawText()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中org.apache.maven.doxia.sink.Sink.rawText()方法的一些代码示例,展示了Sink.rawText()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Sink.rawText()方法的具体详情如下:
包路径:org.apache.maven.doxia.sink.Sink
类名称:Sink
方法名:rawText

Sink.rawText介绍

暂无

代码示例

代码示例来源:origin: org.xwiki.rendering/xwiki-rendering-syntax-doxia

@Override
public void onRawText(String text, Syntax syntax)
{
  // TODO: Ensure this is correct. The problem is that Doxia doesn't seem to have a syntax
  // associated with the raw text so I'm not sure how the renderers (sink in Doxia language)
  // can decide whether to print it or not.
  this.sink.rawText(text);
}

代码示例来源:origin: org.apache.maven.doxia/doxia-module-twiki

/** {@inheritDoc}*/
public final void traverse( final Sink sink )
{
  if ( tag.trim().length() == 0 )
  {
    return;
  }
  sink.rawText( tag );
}

代码示例来源:origin: de.smartics.testdoc/testdoc-maven-report-plugin

/**
 * Renders the footer text.
 */
protected void renderFooter()
{
 final String footerText = messages.getLabel("report.footer");
 if (StringUtils.isNotBlank(footerText))
 {
  sink.rawText(footerText);
 }
}

代码示例来源:origin: de.smartics.testdoc/maven-testdoc-report-plugin

/**
 * Renders the footer text.
 */
protected void renderFooter()
{
 final String footerText = messages.getLabel("report.footer");
 if (StringUtils.isNotBlank(footerText))
 {
  sink.rawText(footerText);
 }
}

代码示例来源:origin: net.thucydides.maven.plugins/maven-thucydides-plugin

private void sectionTitle(final Sink sink, final String title) {
    sink.sectionTitle1();
    sink.rawText(title);
    sink.sectionTitle1_();
  }
}

代码示例来源:origin: org.apache.maven.plugins/maven-project-info-reports-plugin

@Override
protected void text( String text )
{
  if ( StringUtils.isEmpty( text ) ) // Take care of spaces
  {
    sink.text( "-" );
  }
  else
  {
    // custombundle text with xml?
    String regex = "(.+?)<(\"[^\"]*\"|'[^']*'|[^'\">])*>(.+?)";
    if ( Pattern.matches( regex, text ) )
    {
      sink.rawText( text );
    }
    else
    {
      sink.text( text );
    }
  }
}

代码示例来源:origin: org.apache.maven.plugins/maven-project-info-reports-plugin

pw.println( "</script>" );
sink.rawText( sw.toString() );

代码示例来源:origin: com.github.sebhoss.doxia/doxia-wikitext-common

@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();
}

代码示例来源:origin: de.smartics.testdoc/maven-testdoc-report-plugin

protected void renderJUnitStatusLink(final ResultType resultType,
  final String link)
{
 if (link != null)
 {
  sink.rawText("<div style='text-align:center;'>");
  sink.figure();
  sink.figureGraphics(link);
  sink.figureCaption();
  sink.text(String.valueOf(resultType));
  sink.figureCaption_();
  sink.figure_();
  sink.rawText("</div>");
 }
 else
 {
  sink.text(String.valueOf(resultType));
 }
}

代码示例来源:origin: de.smartics.testdoc/testdoc-maven-report-plugin

protected void renderJUnitStatusLink(final ResultType resultType,
  final String link)
{
 if (link != null)
 {
  sink.rawText("<div style='text-align:center;'>");
  sink.figure();
  sink.figureGraphics(link);
  sink.figureCaption();
  sink.text(String.valueOf(resultType));
  sink.figureCaption_();
  sink.figure_();
  sink.rawText("</div>");
 }
 else
 {
  sink.text(String.valueOf(resultType));
 }
}

代码示例来源:origin: org.apache.maven.plugins/maven-project-info-reports-plugin

sink.rawText( body );

代码示例来源:origin: revapi/revapi

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_();
}

代码示例来源:origin: revapi/revapi

@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_();
}

代码示例来源:origin: ru.yandex.qatools.allure/allure-maven-plugin

/**
 * Render allure report page in project-reports.html.
 */
protected void render(Sink sink, String title) {
  sink.head();
  sink.title();
  sink.text(title);
  sink.title_();
  sink.head_();
  sink.body();
  sink.lineBreak();
  Path indexHtmlFile = Paths.get(reportDirectory, "index.html");
  String relativePath = Paths.get(reportingOutputDirectory)
      .relativize(indexHtmlFile).toString();
  sink.rawText(format("<meta http-equiv=\"refresh\" content=\"0;url=%s\" />",
      relativePath));
  sink.link(relativePath);
  sink.body_();
  sink.flush();
  sink.close();
}

代码示例来源:origin: allure-framework/allure-maven

/**
 * Render allure report page in project-reports.html.
 */
protected void render(Sink sink, String title) {
  sink.head();
  sink.title();
  sink.text(title);
  sink.title_();
  sink.head_();
  sink.body();
  sink.lineBreak();
  Path indexHtmlFile = Paths.get(getReportDirectory(), "index.html");
  String relativePath = Paths.get(reportingOutputDirectory)
      .relativize(indexHtmlFile).toString();
  sink.rawText(format("<meta http-equiv=\"refresh\" content=\"0;url=%s\" />",
      relativePath));
  sink.link(relativePath);
  sink.body_();
  sink.flush();
  sink.close();
}

代码示例来源:origin: siom79/japicmp

htmlString = htmlString.replaceAll("<META[^>]*>", "");
Sink sink = getSink();
sink.rawText(htmlString);
sink.close();

代码示例来源:origin: org.asciidoctor/asciidoctor-maven-plugin

/**
 * {@inheritDoc}
 */
@Override
public void parse(Reader reader, Sink sink) throws ParseException {
  String source = null;
  try {
    if ((source = IOUtil.toString(reader)) == null) {
      source = "";
    }
  }
  catch (IOException ex) {
    getLog().error("Could not read AsciiDoc source: " + ex.getLocalizedMessage());
    return;
  }
  MavenProject project = mavenProjectProvider.get();
  Xpp3Dom siteConfig = getSiteConfig(project);
  File siteDirectory = resolveSiteDirectory(project, siteConfig);
  OptionsBuilder options = processAsciiDocConfig(
      project,
      siteConfig,
      initOptions(project, siteDirectory),
      initAttributes(project, siteDirectory));
  // QUESTION should we keep OptionsBuilder & AttributesBuilder separate for call to convertAsciiDoc?
  sink.rawText(convertAsciiDoc(source, options));
}

代码示例来源:origin: net.thucydides.maven.plugins/maven-thucydides-plugin

private void generateOverviewSection(Sink sink) {
    sink.section1();
    sectionTitle(sink, "Overview");

    sink.sectionTitle2();
    sink.link("thucydides/index.html");
    sink.rawText("Dashboard");
    sink.link_();
    sink.sectionTitle2_();

//        sink.sectionTitle2();
//        sink.link("thucydides/stories.html");
//        sink.rawText("Stories");
//        sink.link_();
//        sink.sectionTitle2_();

    sink.section1_();
  }
//

代码示例来源:origin: stackoverflow.com

Sink sink = getSink();
   sink.head();
   sink.title();
   sink.text("Hello");
   sink.title_();
   sink.head_();
   sink.body();
   sink.rawText("Hello World");
   sink.body_();
   sink.flush();
   sink.close();

代码示例来源:origin: org.apache.maven.plugins/maven-pmd-plugin

private void processSingleProcessingError( ProcessingError error ) throws IOException
{
  String filename = error.getFile();
  PmdFileInfo fileInfo = determineFileInfo( filename );
  filename = makeFileSectionName( shortenFilename( filename, fileInfo ), fileInfo );
  sink.tableRow();
  sink.tableCell();
  sink.text( filename );
  sink.tableCell_();
  sink.tableCell();
  sink.text( error.getMsg() );
  sink.verbatim( null );
  sink.rawText( error.getDetail() );
  sink.verbatim_();
  sink.tableCell_();
  sink.tableRow_();
}

相关文章