-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add metadata to make burrito export valid
Changed Derived to Source: I incorrectly assumed that Source referred to a Source text, however this is meant as the mutable original (not software modified) burrito. Derived requires a list of operations performed which modified it. Added a name to Language Added a currentScope to the AudioFlavor Added values to Identification Added an object to Primary for auth
- Loading branch information
Showing
4 changed files
with
49 additions
and
11 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
10 changes: 9 additions & 1 deletion
10
...ainer/burrito/auth/IdAuthorityProvider.kt → ...rcecontainer/burrito/auth/AuthProvider.kt
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 |
---|---|---|
@@ -1,7 +1,15 @@ | ||
package org.wycliffeassociates.otter.common.domain.resourcecontainer.burrito.auth | ||
|
||
import org.bibletranslationtools.scriptureburrito.IdAuthoritiesSchema | ||
import org.bibletranslationtools.scriptureburrito.IdentificationSchema | ||
|
||
interface IdAuthorityProvider { | ||
fun createIdAuthority(): IdAuthoritiesSchema | ||
} | ||
|
||
} | ||
|
||
interface IdentificationProvider { | ||
fun createIdentification(): IdentificationSchema | ||
} | ||
|
||
interface AuthProvider: IdAuthorityProvider, IdentificationProvider |
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
21 changes: 18 additions & 3 deletions
21
...associates/otter/jvm/workbookapp/domain/resourcecontainer/burrito/auth/WacsIdAuthority.kt
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 |
---|---|---|
@@ -1,17 +1,32 @@ | ||
package org.wycliffeassociates.otter.jvm.workbookapp.domain.resourcecontainer.burrito.auth | ||
|
||
import com.fasterxml.jackson.databind.node.JsonNodeFactory | ||
import com.fasterxml.jackson.databind.node.ObjectNode | ||
import org.bibletranslationtools.scriptureburrito.IdAuthoritiesSchema | ||
import org.bibletranslationtools.scriptureburrito.IdAuthority | ||
import org.wycliffeassociates.otter.common.domain.resourcecontainer.burrito.auth.IdAuthorityProvider | ||
import org.bibletranslationtools.scriptureburrito.IdentificationSchema | ||
import org.bibletranslationtools.scriptureburrito.PrimaryIdentification | ||
import org.wycliffeassociates.otter.common.domain.resourcecontainer.burrito.auth.AuthProvider | ||
import javax.inject.Inject | ||
|
||
class WacsIdAuthority @Inject constructor(): IdAuthorityProvider { | ||
class WacsIdAuthority @Inject constructor(): | ||
AuthProvider | ||
{ | ||
override fun createIdAuthority(): IdAuthoritiesSchema { | ||
val authority = IdAuthoritiesSchema() | ||
val wacs = IdAuthority() | ||
wacs.name = hashMapOf("en" to "Wycliffe Associates Content Service ") | ||
wacs.name = hashMapOf("en" to "Wycliffe Associates Content Service") | ||
wacs.id = "https://content.bibletranslationtools.org/" | ||
authority["wacs"] = wacs | ||
return authority | ||
} | ||
|
||
override fun createIdentification(): IdentificationSchema { | ||
return IdentificationSchema().apply { | ||
primary = PrimaryIdentification().apply { | ||
this["id"] = ObjectNode(JsonNodeFactory.instance) | ||
} | ||
name = hashMapOf("en" to "Wycliffe Associates Content Service") | ||
} | ||
} | ||
} |