reference
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")Related APIs
labkit.app.CallbackContext— Provide declared App-neutral runtime capabilities.labkit.app.project.Schema— Declare one durable App project contract.labkit.app.project.emptySourceRecords— Create an empty portable source collection.
Source
This page is generated from the MATLAB help text in +labkit/+app/+project/sourceRecord.m.