|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--net.larsan.urd.ant.website.DocBody
A document body is an document that gets iserted into a template. The base class is a straight substitution for the "##DOC-BODY##". Subclasses of this class may take XML documents and apply transformations.
This class follows the rule of a substitution and can optionally be labeled differently than the default "##DOC-BODY##"
Compiler| Field Summary | |
static java.lang.String |
DEFAULT_LABEL
Default body label for template substitutions |
protected java.io.File |
document
|
protected java.lang.String |
label
|
| Constructor Summary | |
DocBody(java.io.File document)
|
|
| Method Summary | |
java.lang.String |
getBody()
Get the document as a string |
protected java.lang.String |
readDocument()
Read document, xml documents should override this method to perform a transformation before returning |
protected void |
setLabel(java.lang.String label)
Set sunstitution label |
java.lang.String |
substitute(java.lang.String source)
Subsitute into source according to the current label |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String DEFAULT_LABEL
protected java.io.File document
protected java.lang.String label
| Constructor Detail |
public DocBody(java.io.File document)
document - Document to insert| Method Detail |
public java.lang.String substitute(java.lang.String source)
throws CompilerException
substitute in interface SubstitutionCompilerException
public java.lang.String getBody()
throws CompilerException
CompilerException
protected java.lang.String readDocument()
throws CompilerException
CompilerExceptionprotected void setLabel(java.lang.String label)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||