PowerSystemDataModel icon indicating copy to clipboard operation
PowerSystemDataModel copied to clipboard

Make `EntitySource` completely static

Open sebastian-peter opened this issue 1 year ago • 0 comments

After refinements related to #969, the DataSource that is required for instanciating EntitySource is effectively only used in EntitySource#buildEntityData. Since all other methods are static or build upon this method, one can get confused easily here: When invoking one of these methods, does the output result from the input parameters, the field EntitySource.dataSource, or both?

Thus, I'm suggesting to make EntitySource completely static. Where data is needed from DataSource, either this object or a list of field-to-attribute sets can be passed as a parameter.

One can also discuss whether to also apply this transformation to subclasses of EntitySource, although this might be a bit more complex.

sebastian-peter avatar Jan 03 '24 13:01 sebastian-peter