-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make ingest model compliant with RFC (#2942)
* [skip ci] use sourceLocation instead of uploadUrl in DisplayIngest * [skip ci] Callback has a status object. Type of DisplayStatus is Status * [skip ci] Modify resources to be bag * [skip ci] Update RFC * Fixing compile/test errors due to change in the progress model * Change one more reference to sourceCallback * Provider has no label * Apply auto-formatting rules * Apply auto-formatting rules * Remove some more provider labels * Apply auto-formatting rules
- Loading branch information
1 parent
e921abd
commit 8fb418f
Showing
42 changed files
with
283 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
...gistrar/http/models/DisplayLocation.scala → ...chive/common/models/DisplayLocation.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...common/src/main/scala/uk/ac/wellcome/platform/archive/common/models/DisplayProvider.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package uk.ac.wellcome.platform.archive.common.models | ||
|
||
import io.circe.generic.extras.JsonKey | ||
import uk.ac.wellcome.platform.archive.common.progress.models.StorageProvider | ||
|
||
case class DisplayProvider(id: String, | ||
@JsonKey("type") ontologyType: String = "Provider") | ||
object DisplayProvider { | ||
def apply(provider: StorageProvider): DisplayProvider = | ||
DisplayProvider(id = provider.id) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...c/main/scala/uk/ac/wellcome/platform/archive/common/progress/models/StorageLocation.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package uk.ac.wellcome.platform.archive.common.progress.models | ||
import uk.ac.wellcome.platform.archive.common.models.{ | ||
DisplayLocation, | ||
DisplayProvider | ||
} | ||
import uk.ac.wellcome.storage.ObjectLocation | ||
|
||
case class StorageLocation(provider: StorageProvider, location: ObjectLocation) | ||
object StorageLocation { | ||
def apply(displayLocation: DisplayLocation): StorageLocation = | ||
StorageLocation( | ||
StorageProvider(displayLocation.provider), | ||
ObjectLocation(displayLocation.bucket, displayLocation.path)) | ||
} | ||
|
||
case class StorageProvider(id: String) | ||
object StorageProvider { | ||
def apply(displayProvider: DisplayProvider): StorageProvider = | ||
StorageProvider(displayProvider.id) | ||
} |
Oops, something went wrong.