All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sweble.wikitext.lazy.parser.Heading Maven / Gradle / Ivy

There is a newer version: 3.1.9
Show newest version
/* 
 * This file is auto-generated.
 * DO NOT MODIFY MANUALLY!
 * 
 * Generated by AstNodeGenerator.
 * Last generated: 2014-09-12 00:37:37.
 */

package org.sweble.wikitext.lazy.parser;

import de.fau.cs.osr.ptk.common.ast.*;




/**
 * 

Section Heading

*

Grammar

*
    *
  • '='+ Title '='+ Space* EolOrEof

    *
  • *
*

The title can contain

*
    *
  • ExternalLink

    *
  • *
  • InternalLink

    *
  • *
  • MagicWord

    *
  • *
  • ParserEntity

    *
  • *
  • PlainExternalLink

    *
  • *
  • Signature

    *
  • *
  • Ticks

    *
  • *
  • XmlElement

    *
  • *
  • XmlReference

    *
  • *
*

The title cannot contain

*
    *
  • Newline

    *
      *
    • Tables

      *
    • *
    • Headings

      *
    • *
    • Horizontal lines

      *
    • *
    • Block level elements

      *
    • *
    *
  • *
*

The title can not contain (syntactically)

*
    *
  • Newlines

    *
  • *
*/ public class Heading extends ContentNode { private static final long serialVersionUID = 1L; // ========================================================================= public Heading() { super(); } public Heading(NodeList content, int level) { super(content); setLevel(level); } @Override public int getNodeType() { return org.sweble.wikitext.lazy.AstNodeTypes.NT_HEADING; } // ========================================================================= // Properties private int level; public final int getLevel() { return this.level; } public final int setLevel(int level) { int old = this.level; this.level = level; return old; } @Override public final int getPropertyCount() { return 1; } @Override public final AstNodePropertyIterator propertyIterator() { return new AstNodePropertyIterator() { @Override protected int getPropertyCount() { return 1; } @Override protected String getName(int index) { switch (index) { case 0: return "level"; default: throw new IndexOutOfBoundsException(); } } @Override protected Object getValue(int index) { switch (index) { case 0: return Heading.this.getLevel(); default: throw new IndexOutOfBoundsException(); } } @Override protected Object setValue(int index, Object value) { switch (index) { case 0: return Heading.this.setLevel((Integer) value); default: throw new IndexOutOfBoundsException(); } } }; } // ========================================================================= // Children // ========================================================================= }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy