feat: ActivityPubのプロパティを追加
This commit is contained in:
parent
e8b48fab9a
commit
ed26581655
|
@ -1,3 +0,0 @@
|
||||||
package dev.usbharu.activitystreams
|
|
||||||
|
|
||||||
interface CollectionOrLink : OrLink
|
|
|
@ -1,3 +0,0 @@
|
||||||
package dev.usbharu.activitystreams
|
|
||||||
|
|
||||||
interface ImageOrLink : OrLink
|
|
|
@ -1,8 +0,0 @@
|
||||||
package dev.usbharu.activitystreams
|
|
||||||
|
|
||||||
import java.net.URI
|
|
||||||
|
|
||||||
interface JsonLd {
|
|
||||||
var type: List<String>
|
|
||||||
var id: URI
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
package dev.usbharu.activitystreams
|
|
||||||
|
|
||||||
interface ObjectOrLink : OrLink {
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
package dev.usbharu.activitystreams
|
|
||||||
|
|
||||||
interface OrLink
|
|
|
@ -1,3 +0,0 @@
|
||||||
package dev.usbharu.activitystreams
|
|
||||||
|
|
||||||
interface UriOrLink : OrLink
|
|
|
@ -1,3 +0,0 @@
|
||||||
package dev.usbharu.activitystreams
|
|
||||||
|
|
||||||
interface UriOrUnits
|
|
|
@ -1,5 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Accept : Activity
|
|
|
@ -1,5 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Add : Activity
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Announce : Activity {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.IntransitiveActivity
|
|
||||||
|
|
||||||
interface Arrive : IntransitiveActivity {
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
interface Block : Ignore {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Create : Activity {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Delete : Activity {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Dislike : Activity {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Flag : Activity {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Follow : Activity {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Ignore : Activity {
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
interface Invite : Offer
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Join : Activity {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Leave : Activity {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Like : Activity {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Listen : Activity {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Move : Activity {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Offer : Activity {
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.IntransitiveActivity
|
|
||||||
|
|
||||||
interface Question : IntransitiveActivity
|
|
|
@ -1,5 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Read : Activity
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Reject : Activity {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Remove : Activity {
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
interface TentativeAccept : Accept
|
|
|
@ -1,3 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
interface TentativeReject : Reject
|
|
|
@ -1,5 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.IntransitiveActivity
|
|
||||||
|
|
||||||
interface Travel : IntransitiveActivity
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Undo : Activity {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface Update : Activity {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.activity
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Activity
|
|
||||||
|
|
||||||
interface View : Activity {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.actor
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Object
|
|
||||||
|
|
||||||
interface Application : Object {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.actor
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Object
|
|
||||||
|
|
||||||
interface Group : Object {
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.actor
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Object
|
|
||||||
|
|
||||||
interface Organization : Object {
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.actor
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Object
|
|
||||||
|
|
||||||
interface Person : Object {}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.actor
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Object
|
|
||||||
|
|
||||||
interface Service : Object {
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.core
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.ObjectOrLink
|
|
||||||
|
|
||||||
sealed interface InternalActivity : Object {
|
|
||||||
var actor: ObjectOrLink?
|
|
||||||
var target: ObjectOrLink?
|
|
||||||
var result: ObjectOrLink?
|
|
||||||
var origin: ObjectOrLink?
|
|
||||||
var instrument: ObjectOrLink?
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Activity : InternalActivity {
|
|
||||||
var `object`: ObjectOrLink?
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IntransitiveActivity : InternalActivity
|
|
|
@ -1,13 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.core
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.CollectionOrLink
|
|
||||||
import dev.usbharu.activitystreams.CollectionPageOrLink
|
|
||||||
import dev.usbharu.activitystreams.ObjectOrLink
|
|
||||||
|
|
||||||
interface Collection : Object, CollectionOrLink {
|
|
||||||
var totalItems: UInt?
|
|
||||||
var current: CollectionPageOrLink?
|
|
||||||
var first: CollectionPageOrLink?
|
|
||||||
var last: CollectionPageOrLink?
|
|
||||||
var items: List<ObjectOrLink>
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.core
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.CollectionOrLink
|
|
||||||
import dev.usbharu.activitystreams.CollectionPageOrLink
|
|
||||||
|
|
||||||
interface CollectionPage : CollectionPageOrLink, Collection {
|
|
||||||
var partOf: CollectionOrLink?
|
|
||||||
var next: CollectionPageOrLink?
|
|
||||||
var prev: CollectionPageOrLink?
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.core
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.*
|
|
||||||
import dev.usbharu.activitystreams.other.LangString
|
|
||||||
import dev.usbharu.activitystreams.other.MimeMediaType
|
|
||||||
import java.time.Duration
|
|
||||||
import java.time.OffsetDateTime
|
|
||||||
|
|
||||||
interface Object : ObjectOrLink,JsonLd {
|
|
||||||
var attachment: ObjectOrLink?
|
|
||||||
var attributedTo: ObjectOrLink?
|
|
||||||
var audience: ObjectOrLink?
|
|
||||||
var content: LangString?
|
|
||||||
var context: ObjectOrLink?
|
|
||||||
var name: LangString?
|
|
||||||
var endTime: OffsetDateTime?
|
|
||||||
var generator: ObjectOrLink?
|
|
||||||
var icon: ImageOrLink?
|
|
||||||
var image: ImageOrLink?
|
|
||||||
var inReplyTo: ObjectOrLink?
|
|
||||||
var location: ObjectOrLink?
|
|
||||||
var preview: ObjectOrLink?
|
|
||||||
var published: OffsetDateTime?
|
|
||||||
var replies: Collection?
|
|
||||||
var startTime: OffsetDateTime?
|
|
||||||
var summary: LangString?
|
|
||||||
var tag: ObjectOrLink?
|
|
||||||
var updated: OffsetDateTime?
|
|
||||||
var url: UriOrLink?
|
|
||||||
var to: ObjectOrLink?
|
|
||||||
var bto: ObjectOrLink?
|
|
||||||
var cc: ObjectOrLink?
|
|
||||||
var bcc: ObjectOrLink?
|
|
||||||
var mediaType: MimeMediaType?
|
|
||||||
var duration: Duration?
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.core
|
|
||||||
|
|
||||||
interface OrderedCollection : Collection {
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.core
|
|
||||||
|
|
||||||
interface OrderedCollectionPage : OrderedCollection, CollectionPage {
|
|
||||||
var startIndex: UInt?
|
|
||||||
}
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
package dev.usbharu.activitystreams.impl.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.ImageOrLink
|
||||||
|
import dev.usbharu.activitystreams.model.ObjectOrLink
|
||||||
|
import dev.usbharu.activitystreams.model.UriOrLink
|
||||||
|
import dev.usbharu.activitystreams.model.activity.Create
|
||||||
|
import dev.usbharu.activitystreams.model.core.Collection
|
||||||
|
import dev.usbharu.activitystreams.model.other.LangString
|
||||||
|
import dev.usbharu.activitystreams.model.other.MimeMediaType
|
||||||
|
import java.net.URI
|
||||||
|
import java.time.Duration
|
||||||
|
import java.time.OffsetDateTime
|
||||||
|
|
||||||
|
class CreateImpl(
|
||||||
|
override var type: List<URI>,
|
||||||
|
override var `object`: ObjectOrLink?,
|
||||||
|
override var actor: List<ObjectOrLink>,
|
||||||
|
override var target: List<ObjectOrLink>,
|
||||||
|
override var result: ObjectOrLink?,
|
||||||
|
override var origin: ObjectOrLink?,
|
||||||
|
override var instrument: ObjectOrLink?,
|
||||||
|
override var attachment: List<ObjectOrLink>,
|
||||||
|
override var attributedTo: List<ObjectOrLink>,
|
||||||
|
override var audience: List<ObjectOrLink>,
|
||||||
|
override var content: LangString?,
|
||||||
|
override var context: List<ObjectOrLink>,
|
||||||
|
override var name: LangString?,
|
||||||
|
override var endTime: OffsetDateTime?,
|
||||||
|
override var generator: List<ObjectOrLink>,
|
||||||
|
override var icon: List<ImageOrLink>,
|
||||||
|
override var image: List<ImageOrLink>,
|
||||||
|
override var inReplyTo: List<ObjectOrLink>,
|
||||||
|
override var location: ObjectOrLink?,
|
||||||
|
override var preview: ObjectOrLink?,
|
||||||
|
override var published: OffsetDateTime?,
|
||||||
|
override var replies: Collection?,
|
||||||
|
override var startTime: OffsetDateTime?,
|
||||||
|
override var summary: LangString?,
|
||||||
|
override var tag: List<ObjectOrLink>,
|
||||||
|
override var updated: OffsetDateTime?,
|
||||||
|
override var url: List<UriOrLink>,
|
||||||
|
override var to: List<ObjectOrLink>,
|
||||||
|
override var bto: List<ObjectOrLink>,
|
||||||
|
override var cc: List<ObjectOrLink>,
|
||||||
|
override var bcc: List<ObjectOrLink>,
|
||||||
|
override var mediaType: MimeMediaType?,
|
||||||
|
override var duration: Duration?,
|
||||||
|
override var id: URI?,
|
||||||
|
override var source: ObjectOrLink?
|
||||||
|
) : Create
|
|
@ -0,0 +1,61 @@
|
||||||
|
package dev.usbharu.activitystreams.impl.model.actor
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.ImageOrLink
|
||||||
|
import dev.usbharu.activitystreams.model.ObjectOrLink
|
||||||
|
import dev.usbharu.activitystreams.model.UriOrLink
|
||||||
|
import dev.usbharu.activitystreams.model.actor.Person
|
||||||
|
import dev.usbharu.activitystreams.model.core.Collection
|
||||||
|
import dev.usbharu.activitystreams.model.other.LangString
|
||||||
|
import dev.usbharu.activitystreams.model.other.MimeMediaType
|
||||||
|
import java.net.URI
|
||||||
|
import java.time.Duration
|
||||||
|
import java.time.OffsetDateTime
|
||||||
|
|
||||||
|
class PersonImpl(
|
||||||
|
override var type: List<URI>,
|
||||||
|
override var attachment: List<ObjectOrLink>,
|
||||||
|
override var attributedTo: List<ObjectOrLink>,
|
||||||
|
override var audience: List<ObjectOrLink>,
|
||||||
|
override var content: LangString?,
|
||||||
|
override var context: List<ObjectOrLink>,
|
||||||
|
override var name: LangString?,
|
||||||
|
override var endTime: OffsetDateTime?,
|
||||||
|
override var generator: List<ObjectOrLink>,
|
||||||
|
override var icon: List<ImageOrLink>,
|
||||||
|
override var image: List<ImageOrLink>,
|
||||||
|
override var inReplyTo: List<ObjectOrLink>,
|
||||||
|
override var location: ObjectOrLink?,
|
||||||
|
override var preview: ObjectOrLink?,
|
||||||
|
override var published: OffsetDateTime?,
|
||||||
|
override var replies: Collection?,
|
||||||
|
override var startTime: OffsetDateTime?,
|
||||||
|
override var summary: LangString?,
|
||||||
|
override var tag: List<ObjectOrLink>,
|
||||||
|
override var updated: OffsetDateTime?,
|
||||||
|
override var url: List<UriOrLink>,
|
||||||
|
override var to: List<ObjectOrLink>,
|
||||||
|
override var bto: List<ObjectOrLink>,
|
||||||
|
override var cc: List<ObjectOrLink>,
|
||||||
|
override var bcc: List<ObjectOrLink>,
|
||||||
|
override var mediaType: MimeMediaType?,
|
||||||
|
override var duration: Duration?,
|
||||||
|
override var id: URI?,
|
||||||
|
override var source: ObjectOrLink?,
|
||||||
|
override var endpoints: List<URI>,
|
||||||
|
override var following: URI?,
|
||||||
|
override var followers: URI?,
|
||||||
|
override var inbox: URI?,
|
||||||
|
override var outbox: URI?,
|
||||||
|
override var liked: URI?,
|
||||||
|
override var shared: URI?,
|
||||||
|
override var likes: URI?,
|
||||||
|
override var oauthAuthorizationEndpoint: URI?,
|
||||||
|
override var oauthTokenEndpoint: URI?,
|
||||||
|
override var preferredUsername: String?,
|
||||||
|
override var provideClientKey: URI?,
|
||||||
|
override var proxyUrl: URI?,
|
||||||
|
override var sharedInbox: URI?,
|
||||||
|
override var signClientKey: URI?,
|
||||||
|
override var streams: URI?,
|
||||||
|
override var alsoKnownAs: List<URI>
|
||||||
|
) : Person
|
|
@ -0,0 +1,45 @@
|
||||||
|
package dev.usbharu.activitystreams.impl.model.`object`
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.ImageOrLink
|
||||||
|
import dev.usbharu.activitystreams.model.ObjectOrLink
|
||||||
|
import dev.usbharu.activitystreams.model.UriOrLink
|
||||||
|
import dev.usbharu.activitystreams.model.core.Collection
|
||||||
|
import dev.usbharu.activitystreams.model.`object`.Note
|
||||||
|
import dev.usbharu.activitystreams.model.other.LangString
|
||||||
|
import dev.usbharu.activitystreams.model.other.MimeMediaType
|
||||||
|
import java.net.URI
|
||||||
|
import java.time.Duration
|
||||||
|
import java.time.OffsetDateTime
|
||||||
|
|
||||||
|
class NoteImpl(
|
||||||
|
override var type: List<URI>,
|
||||||
|
override var attachment: List<ObjectOrLink>,
|
||||||
|
override var attributedTo: List<ObjectOrLink>,
|
||||||
|
override var audience: List<ObjectOrLink>,
|
||||||
|
override var content: LangString?,
|
||||||
|
override var context: List<ObjectOrLink>,
|
||||||
|
override var name: LangString?,
|
||||||
|
override var endTime: OffsetDateTime?,
|
||||||
|
override var generator: List<ObjectOrLink>,
|
||||||
|
override var icon: List<ImageOrLink>,
|
||||||
|
override var image: List<ImageOrLink>,
|
||||||
|
override var inReplyTo: List<ObjectOrLink>,
|
||||||
|
override var location: ObjectOrLink?,
|
||||||
|
override var preview: ObjectOrLink?,
|
||||||
|
override var published: OffsetDateTime?,
|
||||||
|
override var replies: Collection?,
|
||||||
|
override var startTime: OffsetDateTime?,
|
||||||
|
override var summary: LangString?,
|
||||||
|
override var tag: List<ObjectOrLink>,
|
||||||
|
override var updated: OffsetDateTime?,
|
||||||
|
override var url: List<UriOrLink>,
|
||||||
|
override var to: List<ObjectOrLink>,
|
||||||
|
override var bto: List<ObjectOrLink>,
|
||||||
|
override var cc: List<ObjectOrLink>,
|
||||||
|
override var bcc: List<ObjectOrLink>,
|
||||||
|
override var mediaType: MimeMediaType?,
|
||||||
|
override var duration: Duration?,
|
||||||
|
override var id: URI?,
|
||||||
|
override var source: ObjectOrLink?
|
||||||
|
) : Note {
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package dev.usbharu.activitystreams.impl.model.other
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.other.LangString
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
class LangStringImpl(private val value: String?, private val map: Map<String, String>) : LangString {
|
||||||
|
override fun getValue(): String? = value
|
||||||
|
|
||||||
|
override fun getValueByLanguageTag(locale: Locale): String? = map[locale.toLanguageTag()]
|
||||||
|
|
||||||
|
override val entries: Set<Map.Entry<String, String>>
|
||||||
|
get() = map.entries
|
||||||
|
override val keys: Set<String>
|
||||||
|
get() = map.keys
|
||||||
|
override val size: Int
|
||||||
|
get() = map.size
|
||||||
|
override val values: Collection<String>
|
||||||
|
get() = map.values
|
||||||
|
|
||||||
|
override fun containsKey(key: String): Boolean = map.containsKey(key)
|
||||||
|
|
||||||
|
override fun containsValue(value: String): Boolean = map.containsValue(value)
|
||||||
|
|
||||||
|
override fun get(key: String): String? = map[key]
|
||||||
|
|
||||||
|
override fun isEmpty(): Boolean = map.isEmpty()
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
package dev.usbharu.activitystreams.impl.type
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.JsonLd
|
||||||
|
import java.net.URI
|
||||||
|
|
||||||
|
class TypeFactory {
|
||||||
|
fun factory(uri: String): List<JsonLd> {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +0,0 @@
|
||||||
package dev.usbharu.activitystreams.link
|
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.core.Link
|
|
||||||
|
|
||||||
interface Mention : Link {
|
|
||||||
}
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
package dev.usbharu.activitystreams.model
|
||||||
|
|
||||||
|
interface CollectionOrLink : OrLink
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.activitystreams
|
package dev.usbharu.activitystreams.model
|
||||||
|
|
||||||
interface CollectionPageOrLink : OrLink {
|
interface CollectionPageOrLink : OrLink {
|
||||||
}
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
package dev.usbharu.activitystreams.model
|
||||||
|
|
||||||
|
interface ImageOrLink : OrLink
|
|
@ -0,0 +1,9 @@
|
||||||
|
package dev.usbharu.activitystreams.model
|
||||||
|
|
||||||
|
import java.net.URI
|
||||||
|
|
||||||
|
interface JsonLd {
|
||||||
|
var type: List<URI>
|
||||||
|
var id: URI?
|
||||||
|
var value: Any
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
package dev.usbharu.activitystreams.model
|
||||||
|
|
||||||
|
interface ObjectOrLink : OrLink {
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
package dev.usbharu.activitystreams.model
|
||||||
|
|
||||||
|
interface OrLink
|
|
@ -0,0 +1,3 @@
|
||||||
|
package dev.usbharu.activitystreams.model
|
||||||
|
|
||||||
|
interface UriOrLink : OrLink
|
|
@ -0,0 +1,3 @@
|
||||||
|
package dev.usbharu.activitystreams.model
|
||||||
|
|
||||||
|
interface UriOrUnits
|
|
@ -0,0 +1,5 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Accept : dev.usbharu.activitystreams.model.core.Activity
|
|
@ -0,0 +1,5 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Add : dev.usbharu.activitystreams.model.core.Activity
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Announce : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.IntransitiveActivity
|
||||||
|
|
||||||
|
interface Arrive : dev.usbharu.activitystreams.model.core.IntransitiveActivity {
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
interface Block : dev.usbharu.activitystreams.model.activity.Ignore {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Create : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Delete : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Dislike : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Flag : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Follow : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Ignore : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
interface Invite : dev.usbharu.activitystreams.model.activity.Offer
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Join : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Leave : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Like : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Listen : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Move : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Offer : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.IntransitiveActivity
|
||||||
|
|
||||||
|
interface Question : dev.usbharu.activitystreams.model.core.IntransitiveActivity
|
|
@ -0,0 +1,5 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Read : dev.usbharu.activitystreams.model.core.Activity
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Reject : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Remove : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
interface TentativeAccept : dev.usbharu.activitystreams.model.activity.Accept
|
|
@ -0,0 +1,3 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
interface TentativeReject : dev.usbharu.activitystreams.model.activity.Reject
|
|
@ -0,0 +1,5 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.IntransitiveActivity
|
||||||
|
|
||||||
|
interface Travel : dev.usbharu.activitystreams.model.core.IntransitiveActivity
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Undo : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface Update : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.activity
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Activity
|
||||||
|
|
||||||
|
interface View : dev.usbharu.activitystreams.model.core.Activity {
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package dev.usbharu.activitystreams.model.actor
|
||||||
|
|
||||||
|
import java.net.URI
|
||||||
|
|
||||||
|
interface Actor {
|
||||||
|
var endpoints: List<URI>
|
||||||
|
var following: URI?
|
||||||
|
var followers: URI?
|
||||||
|
var inbox: URI?
|
||||||
|
var outbox: URI?
|
||||||
|
var liked: URI?
|
||||||
|
var shared: URI?
|
||||||
|
var likes: URI?
|
||||||
|
var oauthAuthorizationEndpoint: URI?
|
||||||
|
var oauthTokenEndpoint: URI?
|
||||||
|
var preferredUsername: String?
|
||||||
|
var provideClientKey: URI?
|
||||||
|
var proxyUrl:URI?
|
||||||
|
var sharedInbox:URI?
|
||||||
|
var signClientKey:URI?
|
||||||
|
var streams:URI?
|
||||||
|
var alsoKnownAs:List<URI>
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.actor
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Object
|
||||||
|
|
||||||
|
interface Application : dev.usbharu.activitystreams.model.core.Object {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.actor
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Object
|
||||||
|
|
||||||
|
interface Group : dev.usbharu.activitystreams.model.core.Object {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.actor
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Object
|
||||||
|
|
||||||
|
interface Organization : dev.usbharu.activitystreams.model.core.Object {
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package dev.usbharu.activitystreams.model.actor
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Object
|
||||||
|
|
||||||
|
interface Person : Object,Actor
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.activitystreams.model.actor
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.core.Object
|
||||||
|
|
||||||
|
interface Service : dev.usbharu.activitystreams.model.core.Object {
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package dev.usbharu.activitystreams.model.core
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.ObjectOrLink
|
||||||
|
|
||||||
|
sealed interface InternalActivity : dev.usbharu.activitystreams.model.core.Object {
|
||||||
|
var actor: List<ObjectOrLink>
|
||||||
|
var target: List<ObjectOrLink>
|
||||||
|
var result: ObjectOrLink?
|
||||||
|
var origin: ObjectOrLink?
|
||||||
|
var instrument: ObjectOrLink?
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Activity : dev.usbharu.activitystreams.model.core.InternalActivity {
|
||||||
|
var `object`: ObjectOrLink?
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IntransitiveActivity : dev.usbharu.activitystreams.model.core.InternalActivity
|
|
@ -0,0 +1,13 @@
|
||||||
|
package dev.usbharu.activitystreams.model.core
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.CollectionOrLink
|
||||||
|
import dev.usbharu.activitystreams.model.CollectionPageOrLink
|
||||||
|
import dev.usbharu.activitystreams.model.ObjectOrLink
|
||||||
|
|
||||||
|
interface Collection : dev.usbharu.activitystreams.model.core.Object, CollectionOrLink {
|
||||||
|
var totalItems: UInt?
|
||||||
|
var current: CollectionPageOrLink?
|
||||||
|
var first: CollectionPageOrLink?
|
||||||
|
var last: CollectionPageOrLink?
|
||||||
|
var items: List<ObjectOrLink>
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
package dev.usbharu.activitystreams.model.core
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.CollectionOrLink
|
||||||
|
import dev.usbharu.activitystreams.model.CollectionPageOrLink
|
||||||
|
|
||||||
|
interface CollectionPage : CollectionPageOrLink, dev.usbharu.activitystreams.model.core.Collection {
|
||||||
|
var partOf: CollectionOrLink?
|
||||||
|
var next: CollectionPageOrLink?
|
||||||
|
var prev: CollectionPageOrLink?
|
||||||
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.usbharu.activitystreams.core
|
package dev.usbharu.activitystreams.model.core
|
||||||
|
|
||||||
import dev.usbharu.activitystreams.*
|
import dev.usbharu.activitystreams.model.*
|
||||||
import dev.usbharu.activitystreams.other.LangString
|
import dev.usbharu.activitystreams.model.other.LangString
|
||||||
import dev.usbharu.activitystreams.other.MimeMediaType
|
import dev.usbharu.activitystreams.model.other.MimeMediaType
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
package dev.usbharu.activitystreams.model.core
|
||||||
|
|
||||||
|
import dev.usbharu.activitystreams.model.ImageOrLink
|
||||||
|
import dev.usbharu.activitystreams.model.JsonLd
|
||||||
|
import dev.usbharu.activitystreams.model.ObjectOrLink
|
||||||
|
import dev.usbharu.activitystreams.model.UriOrLink
|
||||||
|
import dev.usbharu.activitystreams.model.other.LangString
|
||||||
|
import dev.usbharu.activitystreams.model.other.MimeMediaType
|
||||||
|
import java.time.Duration
|
||||||
|
import java.time.OffsetDateTime
|
||||||
|
|
||||||
|
interface Object : ObjectOrLink, JsonLd {
|
||||||
|
var attachment: List<ObjectOrLink>
|
||||||
|
var attributedTo: List<ObjectOrLink>
|
||||||
|
var audience: List<ObjectOrLink>
|
||||||
|
var content: LangString?
|
||||||
|
var context: List<ObjectOrLink>
|
||||||
|
var name: LangString?
|
||||||
|
var endTime: OffsetDateTime?
|
||||||
|
var generator: List<ObjectOrLink>
|
||||||
|
var icon: List<ImageOrLink>
|
||||||
|
var image: List<ImageOrLink>
|
||||||
|
var inReplyTo: List<ObjectOrLink>
|
||||||
|
var location: ObjectOrLink?
|
||||||
|
var preview: ObjectOrLink?
|
||||||
|
var published: OffsetDateTime?
|
||||||
|
var replies: Collection?
|
||||||
|
var startTime: OffsetDateTime?
|
||||||
|
var summary: LangString?
|
||||||
|
var tag: List<ObjectOrLink>
|
||||||
|
var updated: OffsetDateTime?
|
||||||
|
var url: List<UriOrLink>
|
||||||
|
var to: List<ObjectOrLink>
|
||||||
|
var bto: List<ObjectOrLink>
|
||||||
|
var cc: List<ObjectOrLink>
|
||||||
|
var bcc: List<ObjectOrLink>
|
||||||
|
var mediaType: MimeMediaType?
|
||||||
|
var duration: Duration?
|
||||||
|
var source: ObjectOrLink?
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
package dev.usbharu.activitystreams.model.core
|
||||||
|
|
||||||
|
interface OrderedCollection : dev.usbharu.activitystreams.model.core.Collection {
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue