Package eu.bandm.tools.d2d2.base
Class PostProcessor
java.lang.Object
eu.bandm.tools.d2d2.base.PostProcessor
- Direct Known Subclasses:
Calendaric
,Forget
The class from which all post processing classes must be derived.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
A method with this name must be provided by all post processing classes. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract @Opt ResultingStructure
process
(ResultingStructure input) static Integer
read_int
(ResultingStructure udom, String tag) Auxiliary function to read the given tag content as an integer value.static Long
read_long
(ResultingStructure udom, String tag) Auxiliary function to read the given tag content as a "long" value.read_string
(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
remove_all
(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 declared *with ... postproc <pathToPostProcClass>, ...
Post processing is a functional transformation:ResultingStructure
is passed as an argument, and the same or a newly created different, (or the same, but modified) is returned as result. The calling code then integrates this result in the overall result structure. Ifnull
is returned, then the pre-processed element is totally dropped from the output.- See Also:
-
-
Constructor Details
-
PostProcessor
public PostProcessor()
-
-
Method Details
-
process
-
read_string
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
-
read_int
Auxiliary function to read the given tag content as an integer value. -
read_long
Auxiliary function to read the given tag content as a "long" value. -
remove_all
Auxiliary function to remove all resulting sub-structures with the given tag.
-