ReadableResource
@nuclia/core • Docs
@nuclia/core / ReadableResource
Class: ReadableResource
Implements all the read operations on resources.
A resource allows you to store content in the Knowledge Box. A single resource might contain several fields.
Fields have different types: files, links, texts, conversations, etc.
Extends
Extended by
Implements
Constructors
new ReadableResource()
new ReadableResource(
data
):ReadableResource
Note: Usually you will not need to create a Resource
object yourself.
It is returned by the getResource
method of the KnowledgeBox
object.
Parameters
• data: IResource
Returns
Inherited from
IResource.constructor
Defined in
libs/sdk-core/src/lib/db/resource/resource.ts:49
Properties
computedmetadata?
optional
computedmetadata:ComputedMetadata
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:12
created?
optional
created:string
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:16
data
data:
ResourceData
={}
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.ts:43
extra?
optional
extra:ExtraMetadata
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:13
fieldmetadata?
optional
fieldmetadata:UserFieldMetadata
[]
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:11
hidden?
optional
hidden:boolean
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:22
icon?
optional
icon:string
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:8
id
id:
string
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:4
last_account_seq?
optional
last_account_seq:number
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:20
last_seqid?
optional
last_seqid:number
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:19
metadata?
optional
metadata:Metadata
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:9
modified?
optional
modified:string
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:17
origin?
optional
origin:Origin
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:14
queue?
optional
queue:"private"
|"shared"
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:21
security?
optional
security:Security
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:15
slug?
optional
slug:string
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:5
summary?
optional
summary:string
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:7
thumbnail?
optional
thumbnail:string
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:18
title?
optional
title:string
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:6
usermetadata?
optional
usermetadata:UserMetadata
Implementation of
Inherited from
Defined in
libs/sdk-core/src/lib/db/resource/resource.models.ts:10
Methods
getClassifications()
getClassifications():
Classification
[]
Returns
Defined in
libs/sdk-core/src/lib/db/resource/resource.ts:120
getExtractedSummaries()
getExtractedSummaries():
string
[]
Returns the summaries generated by Nuclia for every resource fields.
Returns
string
[]
Defined in
libs/sdk-core/src/lib/db/resource/resource.ts:71
getExtractedTexts()
getExtractedTexts():
ExtractedText
[]
Returns the texts generated by Nuclia for every resource fields.
Returns
Defined in
libs/sdk-core/src/lib/db/resource/resource.ts:78
getFieldData()
getFieldData<
T
>(type
,fieldId
):undefined
|T
Type Parameters
• T = IFieldData
Parameters
• type: keyof ResourceData
• fieldId: string
Returns
undefined
| T
Defined in
libs/sdk-core/src/lib/db/resource/resource.ts:65
getFields()
getFields<
T
>(types
):T
[]
Type Parameters
• T = IFieldData
Parameters
• types: keyof ResourceData
[] = ...
Returns
T
[]
Defined in
libs/sdk-core/src/lib/db/resource/resource.ts:56
getFiles()
getFiles():
CloudLink
[]
Returns the files contained in the resource.
Returns
Defined in
libs/sdk-core/src/lib/db/resource/resource.ts:85
getNamedEntities()
getNamedEntities():
object
Returns the entities extracted from the resource.
Returns
object
Defined in
libs/sdk-core/src/lib/db/resource/resource.ts:100
getParagraphText()
getParagraphText(
fieldType
,fieldId
,paragraph
):string
Parameters
• fieldType: FIELD_TYPE
• fieldId: string
• paragraph: Paragraph
Returns
string
Defined in
libs/sdk-core/src/lib/db/resource/resource.ts:160
getPositionedNamedEntities()
getPositionedNamedEntities(
fieldType
,fieldId
):PositionedNER
[]
Parameters
• fieldType: keyof ResourceData
• fieldId: string
Returns
Defined in
libs/sdk-core/src/lib/db/resource/resource.ts:137
getSentenceText()
getSentenceText(
fieldType
,fieldId
,sentence
):string
Parameters
• fieldType: FIELD_TYPE
• fieldId: string
• sentence: Sentence
Returns
string
Defined in
libs/sdk-core/src/lib/db/resource/resource.ts:164
getThumbnails()
getThumbnails():
CloudLink
[]
Returns the thumbnails generated by Nuclia for every resource fields.