@pod-os/core / LabelIndex
Class: LabelIndex
Defined in: search/LabelIndex.ts:9
Represents a label index document as described in https://github.com/pod-os/PodOS/blob/main/docs/features/full-text-search.md
Extends
Constructors
Constructor
new LabelIndex(
uri,store,editable):LabelIndex
Defined in: search/LabelIndex.ts:10
Parameters
uri
string
store
IndexedFormula
editable
boolean = false
Returns
LabelIndex
Overrides
Properties
editable
readonlyeditable:boolean=false
Defined in: search/LabelIndex.ts:13
Whether the Thing can be edited according to its access control settings
Inherited from
store
readonlystore:IndexedFormula
Defined in: search/LabelIndex.ts:12
Inherited from
uri
readonlyuri:string
Defined in: search/LabelIndex.ts:11
Inherited from
Methods
anyValue()
anyValue(...
predicateUris):undefined
Defined in: thing/Thing.ts:127
Returns any value linked from this thing via one of the given predicates
Parameters
predicateUris
...string[]
Returns
undefined
Inherited from
assume()
assume\<
T>(SpecificThing):T
Defined in: thing/Thing.ts:227
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
contains()
contains(
uri):boolean
Defined in: search/LabelIndex.ts:37
Parameters
uri
string
Returns
boolean
description()
description():
undefined
Defined in: thing/Thing.ts:140
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
getIndexedItems()
getIndexedItems():
object[]
Defined in: search/LabelIndex.ts:21
Returns the URIs and labels for all the things listed in the document.
Returns
object[]
label()
label():
string
Defined in: thing/Thing.ts:47
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
literals()
literals():
Literal[]
Defined in: thing/Thing.ts:70
Returns all the literal values that are linked to this thing
Returns
Literal[]
Inherited from
picture()
picture():
null| {url:string; }
Defined in: thing/Thing.ts:161
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
null | { url: string; }
An object containing the url of the picture
Inherited from
relations()
relations(
predicate?):Relation[]
Defined in: thing/Thing.ts:87
Returns all the links from this thing to other resources
Parameters
predicate?
string
Returns
Relation[]
Inherited from
reverseRelations()
reverseRelations(
predicate?):Relation[]
Defined in: thing/Thing.ts:107
Returns all the links from other resources to this thing
Parameters
predicate?
string
Returns
Relation[]
Inherited from
subjects()
subjects():
object[]
Defined in: rdf-document/RdfDocument.ts:17
Returns
object[]
Inherited from
types()
types():
RdfType[]
Defined in: thing/Thing.ts:214
Retrieves a list of RDF types for this thing.
Returns
RdfType[]