Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ReadResource

Hierarchy

Index

Properties

arkUrl

arkUrl: string = ""

attachedToProject

attachedToProject: string = ""

attachedToUser

attachedToUser: string = ""

creationDate

creationDate: string = ""

entityInfo

hasPermissions

hasPermissions: string = ""

id

id: string = ""

incomingReferences

incomingReferences: ReadResource[] = []

label

label: string = ""

Optional lastModificationDate

lastModificationDate: undefined | string = undefined

outgoingReferences

outgoingReferences: ReadResource[] = []

properties

properties: object

Type declaration

Optional resourceClassComment

resourceClassComment: undefined | string

Optional resourceClassLabel

resourceClassLabel: undefined | string

type

type: string = ""

userHasPermission

userHasPermission: string = ""

versionArkUrl

versionArkUrl: string = ""

Methods

getLinkPropertyIriFromLinkValuePropertyIri

  • getLinkPropertyIriFromLinkValuePropertyIri(linkValueProperty: string): string
  • Given the IRI of a property pointing to a link value, returns the corresponding link property IRI.

    Parameters

    • linkValueProperty: string

      IRI of the link value property.

    Returns string

getNumberOfProperties

  • getNumberOfProperties(): number

getNumberOfValues

  • getNumberOfValues(property: string): number

getValueType

  • getValueType(property: string): string | false

getValues

getValuesAs

  • getValuesAs<T>(property: string, valueType: Constructor<T>): T[]
  • Gets all the values for a given resource property as instances of the requested type. If the value cannot be casted to the requested type, an error is thrown.

    Type parameters

    Parameters

    • property: string

      the IRI of the property.

    • valueType: Constructor<T>

      the requested type of the value.

    Returns T[]

getValuesAsStringArray

  • getValuesAsStringArray(property: string, defaultStr?: string): string[]
  • Gets an array of string values representing the values of a property.

    Parameters

    • property: string

      the IRI of the property.

    • Default value defaultStr: string = "?"

      placeholder if there is no string representation of a value.

    Returns string[]

Generated using TypeDoc