|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.jrst.JRSTGenerator
public class JRSTGenerator
Cette classe contient plusieurs methodes pour générer, soit en utilisant une
feuille de style generate(Document, URL, Writer), soit un
ContentHandler avec generate(Document, ContentHandler), soit
DocumentHandler avec generate(Document, ContentHandler) ou
bien regénérer du RST avec generate(Document) dans les deux derniers
cas il faut passer un Writer en parametre du constructeur.
On peut aussi transformer le Document en un autre Document
avec transform(Document, URL, String...)
Created: 30 oct. 06 00:14:18
| Nested Class Summary | |
|---|---|
static class |
JRSTGenerator.DocumentResolver
|
| Field Summary | |
|---|---|
protected int |
enumStart
|
protected int |
indent
|
protected String |
listType
|
protected Writer |
out
|
protected int |
sectionLevel
|
protected URIResolver |
uriResolver
|
| Constructor Summary | |
|---|---|
JRSTGenerator()
|
|
JRSTGenerator(Writer out)
|
|
| Method Summary | |
|---|---|
void |
endDocument(org.dom4j.Document doc)
|
void |
endElement(org.dom4j.Element e)
|
protected String |
enumtype(int i,
String type)
|
void |
generate(org.dom4j.Document doc)
Generate using this class as handler, this generate RST text to out passed in constructor |
void |
generate(org.dom4j.Document doc,
ContentHandler handler)
Generate using handler passed in argument |
void |
generate(org.dom4j.Document doc,
DocumentHandler handler)
|
void |
generate(org.dom4j.Document doc,
URL stylesheet)
Used writer passed in construction class |
void |
generate(org.dom4j.Document doc,
URL stylesheet,
Writer out)
Generate out from document using stylesheet |
URIResolver |
getUriResolver()
|
protected int |
inlineLength(org.dom4j.Element e)
Determine la longueur du text dans l'element <emphasis<>toto</emphasis<> qui donne *toto* retournera 6 |
protected void |
newLine()
|
void |
setUriResolver(URIResolver uriResolver)
|
void |
startDocument(org.dom4j.Document doc)
|
void |
startElement(org.dom4j.Element e)
|
protected String |
string(String s,
int number)
|
void |
text(org.dom4j.Text t)
|
org.dom4j.Document |
transform(org.dom4j.Document doc,
URL stylesheet,
String... args)
Transform doc in another XML document |
protected void |
write(String text)
|
protected void |
write(String text,
boolean doIndent)
Ecrit le text, si indent est vrai, alors chaque ligne est indentée |
protected void |
writeIndent()
|
protected void |
writeIndent(String text)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Writer out
protected int sectionLevel
protected int indent
protected String listType
protected int enumStart
protected URIResolver uriResolver
| Constructor Detail |
|---|
public JRSTGenerator()
public JRSTGenerator(Writer out)
| Method Detail |
|---|
public URIResolver getUriResolver()
public void setUriResolver(URIResolver uriResolver)
uriResolver - the uriResolver to set
public void generate(org.dom4j.Document doc)
throws IOException
doc -
IOException
public void generate(org.dom4j.Document doc,
DocumentHandler handler)
public void generate(org.dom4j.Document doc,
ContentHandler handler)
throws IOException,
TransformerException
doc - handler -
IOException
TransformerException
public void generate(org.dom4j.Document doc,
URL stylesheet)
throws IOException,
TransformerException
doc - stylesheet -
IOException
TransformerException
public void generate(org.dom4j.Document doc,
URL stylesheet,
Writer out)
throws IOException,
TransformerException
doc - stylesheet - out -
IOException
TransformerException
public org.dom4j.Document transform(org.dom4j.Document doc,
URL stylesheet,
String... args)
throws TransformerException,
IOException
doc - stylesheet - args -
TransformerException
IOException
protected String string(String s,
int number)
protected String enumtype(int i,
String type)
protected int inlineLength(org.dom4j.Element e)
e -
public void startDocument(org.dom4j.Document doc)
startDocument in interface DocumentHandlerpublic void endDocument(org.dom4j.Document doc)
endDocument in interface DocumentHandlerpublic void endElement(org.dom4j.Element e)
endElement in interface DocumentHandlerpublic void startElement(org.dom4j.Element e)
startElement in interface DocumentHandlerpublic void text(org.dom4j.Text t)
text in interface DocumentHandlerprotected void newLine()
protected void write(String text)
protected void writeIndent()
protected void writeIndent(String text)
protected void write(String text,
boolean doIndent)
text - text to writedoIndent - do indent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||