
org.efaps.wikiutil.wom.element.Section Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wikiutil Show documentation
Show all versions of wikiutil Show documentation
eFaps Wikiutil is used to render for a file containing wiki formated information a webpage or pdf.
/*
* Copyright 2003 - 2010 The eFaps Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Revision: $Rev: 3601 $
* Last Changed: $Date: 2010-01-05 15:53:16 -0500 (Tue, 05 Jan 2010) $
* Last Changed By: $Author: tim.moxter $
*/
package org.efaps.wikiutil.wom.element;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.builder.ToStringBuilder;
/**
* Defines the text for a heading of level 1.
*
* @author The eFaps Team
* @version $Id: Section.java 3601 2010-01-05 20:53:16Z tim.moxter $
*/
public class Section
extends AbstractSection
{
/**
* All elements of a Wiki page.
*/
private final List headings = new ArrayList();
/**
* Returns all assigned {@link #headings} of a Wiki page.
*
* @return all elements
* @see #headings
*/
public List getHeadings()
{
return this.headings;
}
/**
* Adds new _element
to the list of {@link #headings}. The new
* element is not a text element and so {@link #lastText} is set to
* null
.
*
* @param _element element for one line to add
* @return this wiki page instance
*/
public Section addHeading(final AbstractLineElement _element)
{
this.headings.add(_element);
return this;
}
/**
* Returns the string representation of this text string including the
* {@link #headings}.
*
* @return string representation
*/
@Override()
public String toString()
{
return new ToStringBuilder(this)
.append("headings", this.headings)
.appendSuper(super.toString())
.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy