Closed carbontwelve closed 6 years ago
Originally adding files to a "registry" was done via the addFile
method on the Project
. However that was deprecated by bb45e66 (here) with the addSource
method replacing it.
Looking at the docbloc for addSource
I have written that "all source being added to Project must implement Node interface." All source objects extend AbstractSource
which implements the Node
interface.
This should mean that each item found within the table property of the Graph
should be able to be an AsbtractSource
.
This should therefore mean that line 32 of RunContentCollectors
should be removed and the act of adding a file to the source graph be done by the ContentType
upon bucketing - which is done on line 99 of ContentTypeCollection
.
They should be stored in the source graph and were in some tests, but some Steps
were still using the deprecated method of source storage.
While writing the test for
TaxonomyArchiveGenerator
I stumbled upon a big error in the refactoring so far in that nowhere currently seems to store the actual source object itself.ContentTypes
reference them byuid
but do not store an actual reference to the object iself.I was assuming that they would be stored in the graph itself, but again that looks to only be a reference to the
uid
. Investigate the best place for them to be put, and if they are actually put anywhere at all.