Skip to content

Commit 9e28d7e

Browse files
committed
Add indirect acquisitions.
1 parent c24d466 commit 9e28d7e

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

org.thepalaceproject.opds2.core/src/main/kotlin/org/thepalaceproject/opds2/core/O2Availability.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,10 @@ data class O2Availability(
77
value = "state",
88
required = true
99
)
10-
val state : String
10+
val state : String,
11+
12+
@JsonProperty(
13+
value = "indirectAcquisition"
14+
)
15+
val indirectAcquisitionTree : O2IndirectAcquisitionTree? = null
1116
) : O2Element()
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package org.thepalaceproject.opds2.core
2+
3+
import com.fasterxml.jackson.annotation.JsonProperty
4+
5+
data class O2IndirectAcquisitionTree(
6+
@JsonProperty(
7+
value = "type",
8+
required = true
9+
)
10+
val type : String,
11+
12+
@JsonProperty(
13+
value = "child"
14+
)
15+
val children: List<O2IndirectAcquisitionTree> = listOf()
16+
) : O2Element()

org.thepalaceproject.opds2.core/src/main/kotlin/org/thepalaceproject/opds2/core/O2Module.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ object O2Module {
2020
.allowClass(O2Availability::class.java)
2121
.allowClass(O2Catalog::class.java)
2222
.allowClass(O2Feed::class.java)
23+
.allowClass(O2IndirectAcquisitionTree::class.java)
2324
.allowClass(O2Link::class.java)
2425
.allowClass(O2LinkDeserializer.O2LinkRaw::class.java)
2526
.allowClass(O2LinkProperties::class.java)
@@ -35,6 +36,7 @@ object O2Module {
3536
.allowClass(URI::class.java)
3637
.allowClassName("java.util.List<java.lang.String>")
3738
.allowClassName("java.util.List<org.thepalaceproject.opds2.core.O2Catalog>")
39+
.allowClassName("java.util.List<org.thepalaceproject.opds2.core.O2IndirectAcquisitionTree>")
3840
.allowClassName("java.util.List<org.thepalaceproject.opds2.core.O2Link>")
3941
.allowClassName("java.util.List<org.thepalaceproject.opds2.core.O2NavigationLink>")
4042
.allowClassName("java.util.List<org.thepalaceproject.opds2.core.O2Publication>")

0 commit comments

Comments
 (0)