Design a config (json?) structure, similar to those for list harvesting, specifying the criteria needed for inclusion in a dataset as well as which values/properties to harvest.
Build an interpreter for these settings files which converts them to a sparql query.