LabKit MATLAB Workbench

reference

FrameworkApp SDK API

labkit.app.project.sourceRecord

Create a portable source value during project migration.

Syntax

record = labkit.app.project.sourceRecord(id,role,filepath) record = labkit.app.project.sourceRecord(id,role,filepath,required)

Description

Creates the opaque durable source value accepted by App project schemas. Use this pure constructor only while creating or migrating payloads. Runtime callbacks resolve paths through CallbackContext.

Inputs

id
Nonempty scalar text stable within the project.
role
Nonempty scalar semantic source role.
filepath
Nonempty scalar source path, or an existing scalar opaque reference struct during legacy migration.
required
Optional logical scalar relinking requirement. Default: true.

Outputs

record
Scalar portable source struct owned by the App framework.

Errors

labkit:app:contract:InvalidValue
Text or required is malformed.

Example

source = labkit.app.project.sourceRecord( ...
"image1","cropSource","image.png");
assert(source.id == "image1")

Source

This page is generated from the MATLAB help text in +labkit/+app/+project/sourceRecord.m.