Package eu.bandm.tools.d2d2.base
Interface PostProcessor
- All Known Implementing Classes:
Calendaric
,Forget
public interface PostProcessor
The class from which all post processing classes must be derived.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
A method with this name must be provided by all post processing classes. -
Method Summary
Modifier and TypeMethodDescriptionprocess
(ResultingStructure input) Process the argument which is the result of a recent d2d text parsing.static Integer
readInt
(ResultingStructure udom, String tag) Auxiliary function to read the given tag content as an integer value.static Long
readLong
(ResultingStructure udom, String tag) Auxiliary function to read the given tag content as a "long" value.readString
(ResultingStructure udom, String tag) Auxiliary function to read the current string content of a sub-udom with the given tag, in the given udom.static void
removeAll
(ResultingStructure udom, Definition tag) Auxiliary function to remove all resulting sub-structures with the given tag.
-
Field Details
-
METHOD_NAME
A method with this name must be provided by all post processing classes. Theprocess(ResultingStructure)
method of a certain postProc-class is called for all elements which are declaredwith ... postproc <pathToPostProcClass>, ...
Post processing is a functional transformation:ResultingStructure
is passed as an argument, and the same (modified) structure or a newly created (with the same or a different tag) is returned as result. The calling code will integrate this result in the overall result structure. Ifnull
is returned, then the pre-processed element is totally dropped from the generated output.- See Also:
-
-
Method Details
-
process
Process the argument which is the result of a recent d2d text parsing. The same (modified) structure or a newly created (with the same or a different tag) is returned as result. The calling code will integrate this result in the overall result structure. Ifnull
is returned, then the pre-processed element is totally dropped from the generated output. -
readString
Auxiliary function to read the current string content of a sub-udom with the given tag, in the given udom. ASSUME a flat structure of ONE hierarchy level and only ONE(1) non-blank char data (possibly preceded by some whitespace) ie.:ResultingStructure udom | +---------+------------+ | | | ResultingStructure | (t1) tag (t3) | | | ResultingChars
-
readInt
Auxiliary function to read the given tag content as an integer value. -
readLong
Auxiliary function to read the given tag content as a "long" value. -
removeAll
Auxiliary function to remove all resulting sub-structures with the given tag.
-