nl.flotsam.pecia
Interface ParaContents<T>

Type Parameters:
T - The type of outer context.
All Known Subinterfaces:
Para<T>, ParaBuilder<T>
All Known Implementing Classes:
DefaultParaBuilder, HtmlDocumentBuilder.HtmlParaBuilder

public interface ParaContents<T>

The interface defining all operations for adding content to a Para, without any operations to return to the outer context. Useful in cases in which you want some operation to add contents to a paragraph, without having the ability to write outside of that paragraph.

Author:
Wilfred Springer

Method Summary
 Para<T> code(String text)
          Adds some code to the paragraph.
 Para<T> document(Documenter<ParaContents<?>> target)
          Generates documentation, and returns the current context.
 Para<T> email(String email)
          Inserts an email address.
 Para<T> emphasis(String text)
          Adds an inline emphasized section.
 Footnote<? extends Para<T>> footnote()
          Inserts a footnote.
 Para<T> footnote(String text)
          Inserts a footnote, containing a Para containing the text passed in.
 Para<T> link(Object id, String text)
          Constructs a link to the documet item identified by the specified id.
 Para<T> term(Object id, String text)
          Inserts a term into the content.
 Para<T> text(String text)
          Appends some text to the paragraph.
 Para<T> xref(String id)
          Inserts a cross reference to another document element.
 

Method Detail

link

Para<T> link(Object id,
             String text)
Constructs a link to the documet item identified by the specified id.

Parameters:
id - The identifier of the document element referenced.
text - The text to be included in the link.
Returns:
The parent element of the link.

emphasis

Para<T> emphasis(String text)
Adds an inline emphasized section.

Parameters:
text - The text to be emphasized.
Returns:
The same parent element as the one on which this operation is invoked.

code

Para<T> code(String text)
Adds some code to the paragraph. (Processing expectation: monospaced, 'code'-like rendering.)

Parameters:
text - The text to be produced as code.
Returns:
The same parent element as the one on which this operation is invoked.

text

Para<T> text(String text)
Appends some text to the paragraph.

Parameters:
text - The text to be appended to the paragraph.
Returns:
The same parent element as the one on which this operation is invoked.

footnote

Footnote<? extends Para<T>> footnote()
Inserts a footnote.

Returns:
The footnote inserted.

footnote

Para<T> footnote(String text)
Inserts a footnote, containing a Para containing the text passed in.

Parameters:
text - The text in the paragraph added to the footnote.

email

Para<T> email(String email)
Inserts an email address.

Parameters:
email - The email address.
Returns:
The paragraph in which the email address is inserted.

xref

Para<T> xref(String id)
Inserts a cross reference to another document element.

Parameters:
id - The identifier of the element to which you are referring.
Returns:
The paragraph in which the email address is inserted.

term

Para<T> term(Object id,
             String text)
Inserts a term into the content.

Parameters:
id - The object identifying this term.
text - The term itself.

document

Para<T> document(Documenter<ParaContents<?>> target)
Generates documentation, and returns the current context.

Parameters:
target - The object generating the documentation.


Copyright © 2010. All Rights Reserved.