workflow.datapackage.md
February 1, 2023 ยท View on GitHub
Home > @datashaper/workflow > DataPackage
DataPackage class
Signature:
export declare class DataPackage extends Resource
Extends: Resource
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(profiles) | Constructs a new instance of the DataPackage class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| $schema | readonly | string | |
| isEmpty | readonly | boolean | |
| isEmpty$ | readonly | Observable<boolean> | |
| names | readonly | string[] | |
| names$ | readonly | Observable<string[]> | |
| profile | readonly | (not declared) | |
| resourceManager | readonly | ResourceManager | |
| resources | readonly | Resource[] | |
| resources$ | readonly | Observable<Resource[]> | |
| size | readonly | number | |
| size$ | readonly | Observable<number> |
Methods
| Method | Modifiers | Description |
|---|---|---|
| addResource(resource, top) | ||
| addResourceHandler(handler) | Registers a new handler for processing resources. | |
| clear() | ||
| defaultTitle() | ||
| getResource(name) | ||
| load(files, quiet) | Load the data-package from an archive of files, usually hydrated from a zip. The load process occurs in stages. In the first stage, the datapackage.json file is loaded and recursed to create a hierarchy of objects that represent the resource tree. In the second stage, we walk the resource tree and link together resources that have cross-references. | |
| loadSchema() | ||
| removeResource(name) | ||
| save() | ||
| suggestResourceName(name) | Suggests a new, unique resource name for a resource to adopt | |
| toSchema() |