SolidSourceReference

data class SolidSourceReference(val identifier: String, val types: List<String>, val size: Long? = null, val modified: String? = null, val mtime: Long? = null, val contentType: String? = null, val headMetadata: SolidMetadata? = null) : Parcelable

A lightweight reference to a resource contained inside a SolidContainer. Populated from the container's RDF dataset, which Solid servers SHOULD enrich with stat metadata per https://solidproject.org/TR/protocol (section on container contained resource metadata).

Constructors

Link copied to clipboard
constructor(identifier: String, types: List<String>, size: Long? = null, modified: String? = null, mtime: Long? = null, contentType: String? = null, headMetadata: SolidMetadata? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Content-type hint derived from rdf:type media-type URI, if present.

Link copied to clipboard

Full HTTP HEAD metadata for this resource, populated after a HEAD request.

Link copied to clipboard

The IRI of the contained resource.

Link copied to clipboard

Last-modified datetime string (dcterms:modified), if provided.

Link copied to clipboard
val mtime: Long?

Unix timestamp of last modification (stat:mtime), if provided.

Link copied to clipboard
val size: Long?

File size in bytes (stat:size), if provided by the server.

Link copied to clipboard

List of rdf:type IRI values for the resource.

Functions

Link copied to clipboard
open override fun describeContents(): Int
Link copied to clipboard

Returns true if types includes any LDP container type. This is the reliable check, but only works when the container listing enriched this reference with the child's rdf:type; use isContainerByUri as a fallback when types is empty.

Link copied to clipboard

Returns true if the identifier ends with /, the Solid convention for a container URI. A cheap heuristic for when types is unavailable.

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