LabKit MATLAB Workbench

reference

FrameworkApp SDK API

labkit.app.project.Schema

Declare one durable App project contract.

Syntax

contract = labkit.app.project.Schema() contract = labkit.app.project.Schema(Name=Value)

Description

Project Schema owns payload creation, validation, sequential migration, optional legacy import, resume, and source-relink callback signatures. App-specific fields and scientific meaning remain inside the payload and are not interpreted by this value.

Default Contract

With no arguments, Version is 1, Create returns struct(), and Validate accepts any scalar struct. This is the standard path for a simple App with no migration or specialized project invariants.

Required Name-Value Arguments (custom contract): Version - Positive integer payload version. Create - Fixed callback project = create(). Validate - Fixed callback accepted = validate(project).

Optional Name-Value Arguments

Migrate
Fixed callback project = migrate(project,fromVersion). Required when Version is greater than 1. Default: empty.
LegacyImports
Scalar struct mapping legacy MAT variable names to fixed callbacks accepting one value and returning project or [project,resume]. Default: struct().
CreateResume
Fixed callback resume = createResume(session,project). Default: empty.
ApplyResume
Fixed callback session = applyResume(session,resume,project). Default: empty.
RelinkSources
Fixed callback project = relink(project,unresolved,projectFile). Returning empty cancels the load. Default: empty.

Outputs

contract
Immutable labkit.app.project.Schema value.

Errors

labkit:app:contract:UnknownArgument
An option is missing, unknown, duplicated, or unpaired.
labkit:app:contract:InvalidValue
Version or LegacyImports is invalid.
labkit:app:contract:CallbackRoleMismatch
A callback does not have its documented fixed input and output count.

Typical Call

contract = labkit.app.project.Schema(Version=1, ...
Create=@createProject, Validate=@validateProject);

Source

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