Pattern Suggestion for Extractor Classes
I currently have several "extractor" type classes and I am curious if there is a more efficient way of doing what I am doing now.
Let me explain with examples:
I have several Extractor classes called
SnowExtractor
WindExtractor
MetaExtractor
DepthExtractor
etc.
each extractor looks very similar but is different in the sense that it extracts different things that relate to it.
SnowExtractor will have methods like
getSnowDepth(Bufr)
getSnowTemp(Bufr)
WindExtractor will have methods like
getAverageWindSpeed(Bufr)
get15MinWindSpeed(Bufr)
etc
MetaExtractor
getDay(Bufr)
getHour(Bufr)
getMonth(Bufr)
etc.
this same sort of thing follows through out each extractor where a "Bufr" object is given to each extractors method and it is manipulated to extract the information it needs.
I have a few of these extractors
I think the way I have it currently setup is kind of inefficient and I found out just now how much of a pain it is. I have changed the definition of the Bufr object recently and am now faced with updating all those extractors so that they reference the Bufr correctly.
I looked through most of the GOF pattern and couldn't relate any pattern to my case. Is there a pattern or a better way of doing what I'm doing?
The Bufr object seems like it can be some how differently passed around so that it minimizes future code changes.

