ReceivedSharesIndexRDF

RDF wrapper for {podRoot}/solidshare/shares/received_shares.ttl.

Symmetric to GivenSharesIndexRDF: each received share is a reified record node whose counterpart is the resource's owner, carrying the time the share was recorded:

<#share-…>
rdf:type solidshare:Share ;
solidshare:resource <resourceUri> ;
solidshare:owner <ownerWebId> ;
acl:mode acl:Read ;
dcterms:created "2026-06-04T12:00:00Z"^^xsd:dateTime .

Legacy reads. Earlier versions stored a bare <ownerWebId> <acl:mode> <resourceUri> triple with no node and no time; getShares still surfaces those (with addedAt = null).

Constructors

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

Types

Link copied to clipboard
data class Node(val subject: String, val ownerWebId: String, val resourceUri: String, val mode: ShareMode, val addedAt: String?, val resourceType: String? = null, val resourceName: String? = null)

One reified solidshare:Share record. subject is the node IRI (the writer targets patch deletes at it); mode is the strongest acl:mode asserted; addedAt is the record's dcterms:created, or null. resourceType / resourceName are the record's solidshare:resourceType IRI and dcterms:title, both null on untyped (file/folder) records.

Functions

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

Shares stored in the legacy bare-triple form <ownerWebId> <acl:mode> <resourceUri> (no record node, addedAt = null).

Link copied to clipboard
open override fun getMetadata(): SolidMetadata
Link copied to clipboard
fun getShareNodes(vocab: ShareVocabulary = SolidShareVocabulary): List<ReceivedSharesIndexRDF.Node>

The reified received-share records (node form only — excludes legacy flat rows).

Link copied to clipboard
fun getShares(vocab: ShareVocabulary = SolidShareVocabulary): List<ReceivedShare>

Every received share, one row per (ownerWebId, resourceUri) at the strongest mode: reified records first, then any legacy rows for pairs they don't cover, folded via collapseByOwner so an owner never appears more than once per resource.

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
open override fun writeToParcel(dest: Parcel, flags: Int)