-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into update-docker-compose
- Loading branch information
Showing
25 changed files
with
300 additions
and
104 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
25 changes: 25 additions & 0 deletions
25
docs/src/main/paradox/docs/getting-started/notebooks/file-to-resource-mapping.hjson
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,25 @@ | ||
{ | ||
type: DataDownload | ||
contentSize: | ||
{ | ||
unitCode: f"bytes" | ||
value: x._bytes | ||
} | ||
digest: | ||
{ | ||
algorithm: x._digest._algorithm | ||
value: x._digest._value | ||
} | ||
encodingFormat: x._mediaType | ||
name: x._filename | ||
contentUrl: x._self | ||
atLocation: | ||
{ | ||
type: Location | ||
store: | ||
{ | ||
id: x._storage["@id"] | ||
} | ||
location: x._location if '_location' in x else None | ||
} | ||
} |
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
19 changes: 19 additions & 0 deletions
19
ship/src/main/scala/ch/epfl/bluebrain/nexus/ship/ProjectMapper.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,19 @@ | ||
package ch.epfl.bluebrain.nexus.ship | ||
|
||
import ch.epfl.bluebrain.nexus.delta.sourcing.model.ProjectRef | ||
import ch.epfl.bluebrain.nexus.ship.config.ShipConfig.ProjectMapping | ||
|
||
trait ProjectMapper { | ||
def map(project: ProjectRef): ProjectRef | ||
} | ||
|
||
object ProjectMapper { | ||
|
||
def apply(projectMapping: ProjectMapping): ProjectMapper = | ||
(project: ProjectRef) => | ||
projectMapping match { | ||
case m if m.isEmpty => project | ||
case mapping => mapping.getOrElse(project, project) | ||
} | ||
|
||
} |
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
16 changes: 15 additions & 1 deletion
16
ship/src/main/scala/ch/epfl/bluebrain/nexus/ship/config/ShipConfig.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
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
Oops, something went wrong.