ShareNotificationRDF

RDF wrapper for one item in an LDN inbox — read as an as:Offer, as:Undo, or as:Reject activity:

<#offer>
rdf:type as:Offer ;
as:actor <{ownerWebId}> ;
as:object <{resourceUri}> ;
as:target <{receiverWebId}> ;
acl:mode acl:Read ;
as:published "2026-05-29T10:00:00Z"^^xsd:dateTime .

Any of as:Offer, as:Update, as:Accept, as:Undo, or as:Reject are accepted. Notifications without a recognised type are returned with activityType = null and should be skipped by callers. The access mode is read from the standard WAC acl:mode IRI (aclModes); a solidshare:mode string literal (mode) is also accepted as a fallback.

The reflective constructor required by the Solid resource parser is provided.

Constructors

Link copied to clipboard
constructor(identifier: String, contentType: String? = null, quads: List<RdfQuad>? = null, headers: SolidHeaders? = null)

Functions

Link copied to clipboard

Standard WAC acl:mode IRIs asserted on the activity.

Link copied to clipboard
Link copied to clipboard

Subject of the first recognised activity in the document, or null.

Link copied to clipboard

Full type IRI of the activity, or null.

Link copied to clipboard
fun actor(): String?
Link copied to clipboard
fun addQuad(subject: String, predicate: String, obj: String, maxNumber: Int = 1)

Adds a triple whose object is an IRI (or blank node).

Link copied to clipboard
fun addQuadLiteral(subject: String, predicate: String, value: String, datatype: String? = XSD.STRING, language: String? = null, maxNumber: Int = 1)

Adds a triple whose object is a literal.

Link copied to clipboard
fun clearProperties(predicate: String, subject: String = itselfSubject)

Removes every triple with the given predicate for subject.

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun describeContents(): Int
Link copied to clipboard
fun ensureType(subject: String, typeIri: String)

Ensures subject carries an rdf:type triple with typeIri, preserving any other type triples already present.

Link copied to clipboard

Returns the object values of every triple with the given predicate, across all subjects.

Link copied to clipboard

Returns the object values of every triple matching the given subject and predicate.

Link copied to clipboard
fun findProperty(predicate: String): String?

Returns the object value of the first triple with the given predicate, or null if none.

Link copied to clipboard
fun findPropertyForSubject(subject: String, predicate: String): String?

Returns the object value of the first triple matching subject and predicate, or null.

Link copied to clipboard

Returns a snapshot copy of all triples held by this resource.

Link copied to clipboard
open override fun getContentType(): String

The media type of the resource representation (the value of its Content-Type).

Link copied to clipboard

The creation time in epoch milliseconds, from this resource's own dcterms:created (then stat:ctime) triple, or null when neither is present.

Link copied to clipboard
open override fun getEntity(): InputStream

Returns the resource representation as a byte stream.

Link copied to clipboard
open override fun getHeaders(): SolidHeaders

The HTTP headers associated with this resource (empty when constructed locally).

Link copied to clipboard
open override fun getIdentifier(): String

The URI that identifies this resource on the pod.

Link copied to clipboard

The last-modified time in epoch milliseconds. Prefers this resource's own dcterms:modified (then stat:mtime) triple and falls back to the Last-Modified header. null when none is present.

Link copied to clipboard
open override fun getMetadata(): SolidMetadata
Link copied to clipboard
fun getSize(): Long

The size of this resource in bytes (its Content-Length), or 0 when the server did not report one.

Link copied to clipboard

as:inReplyTo — the AccessRequest this activity answers, if any.

Link copied to clipboard
fun mode(vocab: ShareNotificationVocabulary = SolidShareNotificationVocabulary): String?

Fallback access-mode literal (solidshare:mode "read"), if present.

Link copied to clipboard

schema:name asserted on the as:object node, if any.

Link copied to clipboard

RDF class IRI the sender asserted on the as:object node (<resourceUri> rdf:type <iri>) — a typed entity share's kind. Null when the notification carries no object description.

Link copied to clipboard
Link copied to clipboard
fun summary(): String?
Link copied to clipboard
fun target(): String?
Link copied to clipboard
open override fun writeToParcel(dest: Parcel, flags: Int)