org.sweble.wikitext.parser.nodes.WtSection.getLevel()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(123)

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

WtSection.getLevel介绍

暂无

代码示例

代码示例来源:origin: org.sweble.wikitext/swc-parser-lazy

@Override
protected Object getValue(int index)
{
  switch (index - getSuperPropertyCount())
  {
    case 0:
      return WtSection.this.getLevel();
    default:
      return super.getValue(index);
  }
}

代码示例来源:origin: sweble/sweble-wikitext

@Override
protected Object getValue(int index)
{
  switch (index - getSuperPropertyCount())
  {
    case 0:
      return WtSection.this.getLevel();
    default:
      return super.getValue(index);
  }
}

代码示例来源:origin: org.sweble.wikitext/swc-parser-lazy

while (!stack.isEmpty() && s.getLevel() <= stack.peek().getLevel())
stack.pop();

代码示例来源:origin: kermitt2/entity-fishing

if (s.getLevel() >= 1) {
  while (sections.size() > s.getLevel())
    sections.removeLast();
  while (sections.size() < s.getLevel())
    sections.add(1);
while (sections.size() > s.getLevel())
  sections.removeLast();
sections.add(sections.removeLast() + 1);

代码示例来源:origin: dkpro/dkpro-jwpl

if (s.getLevel() >= 1)
  while (sections.size() > s.getLevel()) {
    sections.removeLast();
  while (sections.size() < s.getLevel()) {
    sections.add(1);
while (sections.size() > s.getLevel()) {
  sections.removeLast();

代码示例来源:origin: org.sweble.wikitext/swc-parser-lazy

public void visit(WtHeading n)
{
  int level = ((WtSection) scope.peek()).getLevel();
  String equals = StringTools.strrep('=', level);
  p.print(equals);
  iterate(n);
  p.println(equals);
}

代码示例来源:origin: sweble/sweble-wikitext

while (!stack.isEmpty() && s.getLevel() <= stack.peek().getLevel())
stack.pop();

代码示例来源:origin: sweble/sweble-wikitext

public void visit(WtHeading n)
{
  int level = ((WtSection) scope.peek()).getLevel();
  String equals = StringTools.strrep('=', level);
  p.print(equals);
  iterate(n);
  p.println(equals);
}

代码示例来源:origin: sweble/sweble-wikitext

if (s.getLevel() >= 1)
  while (sections.size() > s.getLevel())
    sections.removeLast();
  while (sections.size() < s.getLevel())
    sections.add(1);
while (sections.size() > s.getLevel())
  sections.removeLast();
sections.add(sections.removeLast() + 1);

代码示例来源:origin: org.sweble.wikitext/swc-parser-lazy

@Override
  protected Object setValue(int index, Object value)
  {
    switch (index - getSuperPropertyCount())
    {
      case 0:
      {
        int old = WtSection.this.getLevel();
        WtSection.this.setLevel((Integer) value);
        return old;
      }
      default:
        return super.setValue(index, value);
    }
  }
};

代码示例来源:origin: sweble/sweble-wikitext

@Override
  protected Object setValue(int index, Object value)
  {
    switch (index - getSuperPropertyCount())
    {
      case 0:
      {
        int old = WtSection.this.getLevel();
        WtSection.this.setLevel((Integer) value);
        return old;
      }
      default:
        return super.setValue(index, value);
    }
  }
};

代码示例来源:origin: org.sweble.wikitext/swc-engine

public void visit(WtSection n)
{
  p.indent();
  pt("<h%d><span class=\"mw-headline\" id=\"%s\">%!</span></h%d>",
      n.getLevel(),
      makeSectionTitle(n.getHeading()),
      n.getHeading(),
      n.getLevel());
  p.println();
  dispatch(n.getBody());
}

代码示例来源:origin: sweble/sweble-wikitext

public void visit(WtSection n)
{
  p.indent();
  pt("<h%d><span class=\"mw-headline\" id=\"%s\">%!</span></h%d>",
      n.getLevel(),
      makeSectionTitle(n.getHeading()),
      n.getHeading(),
      n.getLevel());
  p.println();
  dispatch(n.getBody());
}

代码示例来源:origin: org.sweble.wikitext/swc-parser-lazy

private WtNode createSection(WtSection template, boolean suppressRtd)
{
  WtBody body = createBody(
      template.hasBody() ? template.getBody() : null, suppressRtd);
  WtHeading heading = nf.heading(nf.list());
  if (!suppressRtd)
    heading.setRtd(template.getHeading().getRtd());
  else
    heading.suppressRtd();
  return nf.section(template.getLevel(), heading, body);
}

代码示例来源:origin: sweble/sweble-wikitext

private WtNode createSection(WtSection template, boolean suppressRtd)
{
  WtBody body = createBody(
      template.hasBody() ? template.getBody() : null, suppressRtd);
  WtHeading heading = nf.heading(nf.list());
  if (!suppressRtd)
    heading.setRtd(template.getHeading().getRtd());
  else
    heading.suppressRtd();
  return nf.section(template.getLevel(), heading, body);
}

代码示例来源:origin: org.sweble.wom3/sweble-wom3-swc-adapter

public Wom3ElementNode visit(WtSection n)
{
  Wom3Section section = (Wom3Section) genPushWom("section");
  {
    section.setLevel(n.getLevel());
    appendRtd(section, n, 0);
    dispatchAppend(section, n.getHeading());
    appendRtd(section, n, 1);
    dispatchAppend(section, n.getBody());
    appendRtd(section, n, 2);
  }
  return pop(section);
}

代码示例来源:origin: sweble/sweble-wikitext

public Wom3ElementNode visit(WtSection n)
{
  Wom3Section section = (Wom3Section) genPushWom("section");
  {
    section.setLevel(n.getLevel());
    appendRtd(section, n, 0);
    dispatchAppend(section, n.getHeading());
    appendRtd(section, n, 1);
    dispatchAppend(section, n.getBody());
    appendRtd(section, n, 2);
  }
  return pop(section);
}

相关文章