Closed jlblcc closed 6 years ago
Looks like this is already covered in the mdJson reader. Contacts are always (I think) referenced through responsibleParty
in mdJson. Currently, the reader tests each party (contactId) specified by the responsible party as well as contact IDs specified as organization membership to verify they are actually in the contact array. If you are seeing something different please let me know.
FGDC and sbJson readers do not draw from the contacts array. For these readers contacts are added as they are encountered in the input file.
Writers are also different. They always check for valid contactId
since they draw from the contacts array to write information to the selected standard.
I have some reports of this happening where a contact has a memberOfOrganization array and the id within that array is not found anywhere within the contacts array. We can't check for this in the mdJSON schema, so we might want to issue a warning during the translation. Maybe when reading mdJSON?
Now I see through the confusion. responsibleParty
has party
which has organizationMembers
. These are checked in every use of responsible party in mdJson. contact
has memberOfOrganization
. These are not checked; the problem being that all contacts would need to be loaded before the check could be valid. So, memberOfOrganization
is not check when a contact is added.
To test memberOfOrganization
for valid contactId
(s) I will need to add a post-contact-processing module into the workflow. Which I will do. :smiley:
Done.
Currently we generally ignore instances when contacts are not found in the contacts array(getContact methods). It would be useful to issue a WARNING when this occurs, especially when #183 is implemented.