Skip to content

@pod-os/core


@pod-os/core / WebIdProfile

Class: WebIdProfile

Defined in: profile/WebIdProfile.ts:11

Allows finding things related to the WebID and their profile document

Extends

Constructors

Constructor

new WebIdProfile(webId, store, editable): WebIdProfile

Defined in: profile/WebIdProfile.ts:13

Parameters

webId

string

store

IndexedFormula

editable

boolean = false

Returns

WebIdProfile

Overrides

Thing.constructor

Properties

editable

readonly editable: boolean = false

Defined in: profile/WebIdProfile.ts:16

Whether the Thing can be edited according to its access control settings

Inherited from

Thing.editable


store

readonly store: IndexedFormula

Defined in: profile/WebIdProfile.ts:15

Inherited from

Thing.store


uri

readonly uri: string

Defined in: thing/Thing.ts:39

Inherited from

Thing.uri


webId

readonly webId: string

Defined in: profile/WebIdProfile.ts:14

Methods

anyValue()

anyValue(...predicateUris): undefined

Defined in: thing/Thing.ts:133

Returns any value linked from this thing via one of the given predicates

Parameters

predicateUris

...string[]

Returns

undefined

Inherited from

Thing.anyValue


assume()

assume\<T>(SpecificThing): T

Defined in: thing/Thing.ts:250

Call this method to switch to a more specific subclass of Thing.

Type Parameters

T

T

Parameters

SpecificThing

(uri, store, editable) => T

a subclass of Thing to assume

Returns

T

Inherited from

Thing.assume


attachments()

attachments(): Attachment[]

Defined in: thing/Thing.ts:231

Returns all attachments linked to this thing

Returns

Attachment[]

Inherited from

Thing.attachments


container()

container(): object

Defined in: thing/Thing.ts:264

Returns the container that contains this thing's document The container URI is derived from the thing's URI.

Returns

object

uri

uri: string

Inherited from

Thing.container


description()

description(): undefined

Defined in: thing/Thing.ts:146

Returns a literal value that describes this thing. Tries to match common RDF terms used for descriptions, like dct:description, schema:description or rdfs:comment

Returns

undefined

Inherited from

Thing.description


getPreferencesFile()

getPreferencesFile(): string | undefined

Defined in: profile/WebIdProfile.ts:25

Returns the URI of the preferences document

Returns

string | undefined


getPrivateLabelIndexes()

getPrivateLabelIndexes(): string[]

Defined in: profile/WebIdProfile.ts:55

Returns the URIs of the private label indexes

Returns

string[]


getPrivateTypeIndex()

getPrivateTypeIndex(): string | undefined

Defined in: profile/WebIdProfile.ts:41

Returns the URI of the private type index document

Returns

string | undefined

Since

0.24.0


getPublicTypeIndex()

getPublicTypeIndex(): string | undefined

Defined in: profile/WebIdProfile.ts:33

Returns the URI of the public type index document

Returns

string | undefined

Since

0.24.0


label()

label(): string

Defined in: thing/Thing.ts:53

Returns a human-readable label for this thing. Tries to match common RDF terms used for labels, such as rdfs:label, schema:name and others.

If no such term is present, it will derive a label from the URI.

Returns

string

Inherited from

Thing.label


literals()

literals(): Literal[]

Defined in: thing/Thing.ts:76

Returns all the literal values that are linked to this thing

Returns

Literal[]

Inherited from

Thing.literals


picture()

picture(): { url: string; } | null

Defined in: thing/Thing.ts:167

Returns the url of a picture or logo associated with this thing Tries to match common RDF terms used for pictures like schema:image, vcard:photo or foaf:img

Returns

{ url: string; } | null

An object containing the url of the picture

Inherited from

Thing.picture


relations()

relations(predicate?): Relation[]

Defined in: thing/Thing.ts:93

Returns all the links from this thing to other resources

Parameters

predicate?

string

Returns

Relation[]

Inherited from

Thing.relations


reverseRelations()

reverseRelations(predicate?): Relation[]

Defined in: thing/Thing.ts:113

Returns all the links from other resources to this thing

Parameters

predicate?

string

Returns

Relation[]

Inherited from

Thing.reverseRelations


types()

types(): RdfType[]

Defined in: thing/Thing.ts:220

Retrieves a list of RDF types for this thing.

Returns

RdfType[]

Inherited from

Thing.types