public class JRSTReader extends Object
JRSTLexer
pour
prendre l'element que l'on attend, si la methode retourne null ou un autre
element et bien c que ce n'est pas le bon choix, cela veut dire que l'element
courant est fini d'etre lu (plus de paragraphe dans la section par exemple)
ou qu'il y a une erreur dans le fichier en entre.
On construit un arbre XML representant le RST au fur et a mesure, on peut
ensuite appliquer une feuille de style ou autre chose avec
JRSTGenerator
Tous les elements ont un attribut level qui permet de savoir on il est dans la hierarchie. Le Document a le level -1001, et les sections/titres on pour level les valeurs 1000, -999, -998, ...
de cette facon les methods isUpperLevel et isSameLevel fonctionne pour tous les elements de la meme facon
abbreviation acronym address (done) admonition (done) attention (done) attribution author (done) authors (done) block_quote (done) bullet_list (done) caption caution (done) citation citation_reference classifier (done) colspec (done) comment compound contact (done) container copyright (done) danger (done) date (done) decoration (done) definition (done) definition_list (done) definition_list_item (done) description (done) docinfo (done) doctest_block (done) document (done) emphasis (done) entry (done) enumerated_list (done) error (done) field (done) field_body (done) field_list (done) field_name (done) figure footer (done) footnote (done) footnote_reference (done) generated header (done) hint (done) image (done) important (done) inline label legend line (done) line_block (done) list_item (done) literal (done) literal_block (done) note (done) option (done) option_argument (done) option_group (done) option_list (done) option_list_item (done) option_string (done) organization (done) paragraph (done) pending problematic raw reference (done) revision (done) row (done) rubric section (done) sidebar (done) status (done) strong (done) subscript substitution_definition substitution_reference subtitle (done) superscript system_message table (done) target (done) tbody (done) term (done) tgroup (done) thead (done) tip (done) title (done) title_reference topic (done) transition (done) version (done) warning (done)Created: 27 oct. 06 00:15:34
Modifier and Type | Field and Description |
---|---|
protected static String |
ANONYMOUS |
protected static String |
ATTR_IDS |
protected static String |
ATTR_INLINE |
protected static String |
ATTR_REFID |
protected static String |
AUTO |
protected static String |
AUTONUM |
protected static String |
AUTONUMLABEL |
protected static String |
AUTOSYMBOL |
protected static String |
BACKREFS |
protected static String |
BULLET |
protected static String |
CLASS |
protected static String |
CONTENTS |
protected static Map<String,JRSTDirective> |
defaultDirectives |
protected static String |
DELIMITER |
protected static String |
DELIMITEREXISTE |
protected Map<String,JRSTDirective> |
directives |
protected static String |
ENUMTYPE |
protected boolean |
ERROR_MISSING_ITEM |
protected static String |
FOOTNOTES |
protected static String |
ID |
protected static String |
INCLUDE |
protected static String |
LEVEL |
protected static int |
MAX_SECTION_DEPTH |
protected static String |
NAME |
protected static String |
NAMES |
protected static String |
NUM |
protected static String |
PREFIX |
protected static String |
REFURI |
protected static String |
REMOVE |
protected static String |
SECTNUM |
protected static String |
START |
protected static String |
SUBEXISTE |
protected static String |
SUFFIX |
protected static String |
TARGETANONYMOUS |
protected static String |
TRUE |
protected static String |
TYPE |
protected static String |
VALUE |
Constructor and Description |
---|
JRSTReader() |
Modifier and Type | Method and Description |
---|---|
static void |
addDefaultDirectives(String name,
JRSTDirective directive) |
void |
addDirectives(String name,
JRSTDirective directive) |
static JRSTDirective |
getDefaultDirective(String name) |
JRSTDirective |
getDirective(String name) |
org.dom4j.Document |
read(Reader reader)
On commence par decouper tout le document en Element, puis on construit
l'article a partir de ces elements.
|
void |
setVariable(int idMax,
int symbolMax,
int symbolMaxRef,
LinkedList<Integer> lblFootnotes,
LinkedList<Integer> lblFootnotesRef,
LinkedList<org.dom4j.Element> eFootnotes,
LinkedList<org.dom4j.Element> eTarget,
LinkedList<org.dom4j.Element> eTargetAnonymous,
LinkedList<org.dom4j.Element> eTargetAnonymousCopy)
Initialises les variables d'environements par ex, les hyperlinks peuvent
etre referencer dans tous le document
|
protected static final String ANONYMOUS
protected static final String AUTO
protected static final String AUTONUM
protected static final String AUTONUMLABEL
protected static final String AUTOSYMBOL
protected static final String ATTR_REFID
protected static final String ATTR_INLINE
protected static final String ATTR_IDS
protected static final String BACKREFS
protected static final String BULLET
protected static final String CLASS
protected static final String CONTENTS
protected static final String DELIMITER
protected static final String DELIMITEREXISTE
protected static final String ENUMTYPE
protected static final String FOOTNOTES
protected static final String ID
protected static final String INCLUDE
protected static final String LEVEL
protected static final String NAME
protected static final String NAMES
protected static final String NUM
protected static final String REFURI
protected static final String PREFIX
protected static final String REMOVE
protected static final String START
protected static final String SECTNUM
protected static final String SUBEXISTE
protected static final String SUFFIX
protected static final String TRUE
protected static final String TYPE
protected static final String TARGETANONYMOUS
protected static final String VALUE
protected boolean ERROR_MISSING_ITEM
protected static int MAX_SECTION_DEPTH
protected static Map<String,JRSTDirective> defaultDirectives
protected Map<String,JRSTDirective> directives
public static JRSTDirective getDefaultDirective(String name)
name
- public static void addDefaultDirectives(String name, JRSTDirective directive)
name
- directive
- the defaultDirectives to setpublic JRSTDirective getDirective(String name)
name
- public void addDirectives(String name, JRSTDirective directive)
name
- directive
- the defaultDirectives to setpublic org.dom4j.Document read(Reader reader) throws Exception
reader
- Exception
public void setVariable(int idMax, int symbolMax, int symbolMaxRef, LinkedList<Integer> lblFootnotes, LinkedList<Integer> lblFootnotesRef, LinkedList<org.dom4j.Element> eFootnotes, LinkedList<org.dom4j.Element> eTarget, LinkedList<org.dom4j.Element> eTargetAnonymous, LinkedList<org.dom4j.Element> eTargetAnonymousCopy)
Initialises les variables d'environements par ex, les hyperlinks peuvent etre referencer dans tous le document
idMax
- symbolMax
- symbolMaxRef
- lblFootnotes
- lblFootnotesRef
- eFootnotes
- eTarget
- eTargetAnonymous
- eTargetAnonymousCopy
- Copyright © 2004–2014 CodeLutin. All rights reserved.