ModelCataloguePlugin-102 return only finalized published elements from the queries

refactored for better generalization