-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor processQualityRequest
method in Controller
class to remove system metadata related arguments
#458
Comments
processQualityRequest
method in Controller
class to remove system metadata related arguments
Flow chart below to assist with removing
In the
flowchart TD
Start(["processQualityRequest(...)"]) --> LogRequest[Log request details]
LogRequest --> InitializeVars[Initialize variables: qEntry, sysmeta, message, runXML]
InitializeVars --> ReadMetadata[Read metadata InputStream to UTF-8 string]
ReadMetadata --> TrySysMeta{Attempt to unmarshal system metadata to tmpSysmeta}
TrySysMeta -- Success --> SysMetaType{Is system metadata v1?}
SysMetaType -- Yes --> ConvertSysMeta[Convert v1 metadata to v2 format]
SysMetaType -- No --> AssignSysMeta[Assign v2 system metadata directly]
TrySysMeta -- Failure --> LogError[Log error and continue]
ConvertSysMeta --> CreateQueueEntry
AssignSysMeta --> CreateQueueEntry
LogError --> CreateQueueEntry
CreateQueueEntry[Create QueueEntry object with metadata and system metadata] --> SerializeQueueEntry[Serialize QueueEntry to byte array]
SerializeQueueEntry --> WriteToQueue[Write message to InProcess queue]
WriteToQueue --> LogCompletion[Log completion message]
LogCompletion --> End([End])
|
The metadata doc provided is an EML document. // A resourceMap contains RDF triples
The processes in which this document is used for and parsed in Additionally, |
closing, as this is not necessary. we need the sysmeta in this method and the only change needed is to change how it is originally retrieved (covered in #457) |
processQualityRequest
is called by both themetadig-webapp
and theController
itself when running quality checks. It's signature looks like such:The system metadata for a given pid should be available directly through a quality check through
hashstore
moving forward. This means thatprocessQualityRequest
should not require data objects or system metadata and its related arguments in the signature, and access to it should be delegated to the checks itself (which are to be updated)Refactor this method by removing the following arguments and ensuring that the RabbitMQ message that gets sent via a
QueueEntry
still contains what is required to proceed with a check.InputStream metadata
InputStream systemMetadata
The text was updated successfully, but these errors were encountered: