The SubmissionBuilder and StreamingSubmissionBuilder are interfaces responsible for building the Deposit Services model of a PASS Submission: a DepositSubmission.
Two concrete implementations exist:
FcrepoModelBuilder: given a SubmissionURL, it will retrieve the Submission resource and its linked resources (i.e. the "submission graph") and build a DepositSubmission. All URIs present in the DepositSubmission point to Fedora resources.
FilesystemModelBuilder: given a Submission URI, it resolves the URI to a resource on the test class path that contains the submission graph, and builds the DepositSubmission. All URIs present in the DepositSubmission are local URIs suitable for linking the resources in the graph, but are not resolvable as HTTP resources.
Changes
This PR updates the FilesystemModelBuilder to optionally deposit the test resources in the submission graph to Fedora, and build the DepositSubmission from the Fedora resources. The URIs in the DepositSubmission would therefore point to Fedora resources.
Rationale
The DASH Package Provider includes funding information in the package. It obtains this information from the Grant and Funder resources linked to by the Submission. The Deposit Services model (e.g. DepositSubmission) doesn't contain this information, so the DASH provider must resolve the Submission resource and navigate and retrieve Grant and Funder resources. In order for the DASH provider to resolve these resources without providing special handling for test resources, the FilesystemModelBuilder must present a DepositSubmission with resolvable URIs instead of local test resources.
In other words, a DepositSubmission using local URIs doesn't really behave like linked data, because the local URIs aren't resolvable. The DepositSubmission must be built from Fedora resources in order for linking to work as expected.
About
The
SubmissionBuilder
andStreamingSubmissionBuilder
are interfaces responsible for building the Deposit Services model of a PASSSubmission
: aDepositSubmission
.Two concrete implementations exist:
FcrepoModelBuilder
: given aSubmission
URL, it will retrieve theSubmission
resource and its linked resources (i.e. the "submission graph") and build aDepositSubmission
. All URIs present in theDepositSubmission
point to Fedora resources.FilesystemModelBuilder
: given aSubmission
URI, it resolves the URI to a resource on the test class path that contains the submission graph, and builds theDepositSubmission
. All URIs present in theDepositSubmission
are local URIs suitable for linking the resources in the graph, but are not resolvable as HTTP resources.Changes
This PR updates the
FilesystemModelBuilder
to optionally deposit the test resources in the submission graph to Fedora, and build theDepositSubmission
from the Fedora resources. The URIs in theDepositSubmission
would therefore point to Fedora resources.Rationale
The DASH Package Provider includes funding information in the package. It obtains this information from the
Grant
andFunder
resources linked to by theSubmission
. The Deposit Services model (e.g.DepositSubmission
) doesn't contain this information, so the DASH provider must resolve theSubmission
resource and navigate and retrieveGrant
andFunder
resources. In order for the DASH provider to resolve these resources without providing special handling for test resources, theFilesystemModelBuilder
must present aDepositSubmission
with resolvable URIs instead of local test resources.In other words, a
DepositSubmission
using local URIs doesn't really behave like linked data, because the local URIs aren't resolvable. TheDepositSubmission
must be built from Fedora resources in order for linking to work as expected.