|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object eu.bandm.tscore.tdom.Visitor eu.bandm.tscore.base.Reducer.MergeSymbols<E>
protected class Reducer.MergeSymbols<E extends TypedChoice>
Creates a new list of elements, where all adjacent idents, numerics and nonAlfanumeric(E/P)s are concatenated in one Element_ident. Other elements are included in this process (constructor param all=true) or preserved in the resulting sequence.
Field Summary | |
---|---|
protected boolean |
all
|
protected eu.bandm.tscore.tdom.Element_ident |
last
|
protected List<eu.bandm.tscore.tdom.Element> |
result
|
Constructor Summary | |
---|---|
Reducer.MergeSymbols(boolean all)
|
Method Summary | |
---|---|
protected void |
flushLast()
|
protected eu.bandm.tscore.tdom.Element_ident |
make_Element_ident(String text,
Location<XMLDocumentIdentifier> loc)
Wrap collected text into new, synthetic TDom element. |
List<eu.bandm.tscore.tdom.Element> |
merge(List<E> elements)
main function. |
protected void |
testMerge(String txt,
eu.bandm.tscore.tdom.Element el)
|
protected void |
testMerge(String txt,
Location<XMLDocumentIdentifier> loc)
Flush "last" to "result" and memoize el als new "last", iff NOT adjacent. |
void |
visit(eu.bandm.tscore.tdom.Element_application el)
|
void |
visit(eu.bandm.tscore.tdom.Element_division el)
|
void |
visit(eu.bandm.tscore.tdom.Element_ident el)
|
void |
visit(eu.bandm.tscore.tdom.Element_nonAlfanumericP el)
|
void |
visit(eu.bandm.tscore.tdom.Element_nonAlfanumericV el)
|
void |
visit(eu.bandm.tscore.tdom.Element_numeric el)
|
void |
visit(eu.bandm.tscore.tdom.Element_stringconst el)
|
void |
visitEl(eu.bandm.tscore.tdom.Element el)
Always flush "last" to "result" and memoize el als new "last". |
Methods inherited from class eu.bandm.tscore.tdom.Visitor |
---|
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final List<eu.bandm.tscore.tdom.Element> result
protected final boolean all
protected eu.bandm.tscore.tdom.Element_ident last
Constructor Detail |
---|
public Reducer.MergeSymbols(boolean all)
Method Detail |
---|
public List<eu.bandm.tscore.tdom.Element> merge(List<E> elements)
protected void flushLast()
protected eu.bandm.tscore.tdom.Element_ident make_Element_ident(String text, Location<XMLDocumentIdentifier> loc)
protected void testMerge(String txt, Location<XMLDocumentIdentifier> loc)
protected void testMerge(String txt, eu.bandm.tscore.tdom.Element el)
public void visit(eu.bandm.tscore.tdom.Element_ident el)
visit
in class eu.bandm.tscore.tdom.Visitor
public void visit(eu.bandm.tscore.tdom.Element_nonAlfanumericV el)
visit
in class eu.bandm.tscore.tdom.Visitor
public void visit(eu.bandm.tscore.tdom.Element_nonAlfanumericP el)
visit
in class eu.bandm.tscore.tdom.Visitor
public void visit(eu.bandm.tscore.tdom.Element_numeric el)
visit
in class eu.bandm.tscore.tdom.Visitor
public void visitEl(eu.bandm.tscore.tdom.Element el)
public void visit(eu.bandm.tscore.tdom.Element_stringconst el)
visit
in class eu.bandm.tscore.tdom.Visitor
public void visit(eu.bandm.tscore.tdom.Element_division el)
visit
in class eu.bandm.tscore.tdom.Visitor
public void visit(eu.bandm.tscore.tdom.Element_application el)
visit
in class eu.bandm.tscore.tdom.Visitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |