org.jomc.util
Class Section

Package class diagram package Section
java.lang.Object
  extended by org.jomc.util.Section

public class Section
extends Object

Section of text.

Version:
$Id: Section.java 641 2009-10-02 16:35:24Z schulte2005 $
Author:
Christian Schulte

Field Summary
private  String endingLine
          Line marking the end of this section.
private  StringBuilder headContent
          The parsed head content of this section.
private  int mode
          The current parsing mode.
(package private) static int MODE_HEAD
          Constant for the mode during parsing the head content of a section.
(package private) static int MODE_TAIL
          Constant for the mode during parsing the tail content of a section.
private  String name
          The name of this section.
private  List<Section> sections
          The child sections of this section.
private  String startingLine
          Line marking the start of this section.
private  StringBuilder tailContent
          The parsed tail content of this section.
 
Constructor Summary
Section()
          Creates a new Section instance.
 
Method Summary
 String getEndingLine()
          Gets the line marking the end of this section.
 StringBuilder getHeadContent()
          Gets the content of this section preceding any child section content.
(package private)  int getMode()
          Gets the parsing mode of the instance.
 String getName()
          Gets the name of this section.
 List<Section> getSections()
          Gets the child sections of this section.
 String getStartingLine()
          Gets the line marking the start of this section.
 StringBuilder getTailContent()
          Gets the content of this section succeeding any child section content.
 void setEndingLine(String value)
          Sets the line marking the end of this section.
(package private)  void setMode(int value)
          Sets the parsing mode of the instance.
 void setName(String value)
          Sets the name of this section.
 void setStartingLine(String value)
          Sets the line marking the start of this section.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_HEAD

static final int MODE_HEAD
Constant for the mode during parsing the head content of a section.

See Also:
Constant Field Values

MODE_TAIL

static final int MODE_TAIL
Constant for the mode during parsing the tail content of a section.

See Also:
Constant Field Values

mode

private int mode
The current parsing mode.


name

private String name
The name of this section.


headContent

private StringBuilder headContent
The parsed head content of this section.


tailContent

private StringBuilder tailContent
The parsed tail content of this section.


startingLine

private String startingLine
Line marking the start of this section.


endingLine

private String endingLine
Line marking the end of this section.


sections

private List<Section> sections
The child sections of this section.

Constructor Detail

Section

public Section()
Creates a new Section instance.

Method Detail

getName

public String getName()
Gets the name of this section.

Returns:
The name of this section or null.

setName

public void setName(String value)
Sets the name of this section.

Parameters:
value - The new name of this section or null.

getStartingLine

public String getStartingLine()
Gets the line marking the start of this section.

Returns:
The line marking the start of this section.

setStartingLine

public void setStartingLine(String value)
Sets the line marking the start of this section.

Parameters:
value - The new line marking the start of this section.

getEndingLine

public String getEndingLine()
Gets the line marking the end of this section.

Returns:
The line marking the end of this section.

setEndingLine

public void setEndingLine(String value)
Sets the line marking the end of this section.

Parameters:
value - The new line marking the end of this section.

getHeadContent

public StringBuilder getHeadContent()
Gets the content of this section preceding any child section content.

Returns:
The content of this section preceding any child section content.

getTailContent

public StringBuilder getTailContent()
Gets the content of this section succeeding any child section content.

Returns:
The content of this section succeeding any child section content.

getSections

public List<Section> getSections()
Gets the child sections of this section.

Returns:
A list of child sections of this section.

getMode

int getMode()
Gets the parsing mode of the instance.

Returns:
The parsing mode of the instance.
See Also:
MODE_HEAD, MODE_TAIL

setMode

void setMode(int value)
Sets the parsing mode of the instance.

Parameters:
value - The new parsing mode of the instance.
See Also:
MODE_HEAD, MODE_TAIL


Copyright © 2005-2009 The JOMC Project. All Rights Reserved.