Constructor
new PackageModel()
- Deprecated:
- Warning! This model will be removed in a future release in
favour of the DataPackage model. The PackageModel is still used in some
places but will eventually be replaced with the DataPackage model. New code
should use the DataPackage model.
- Source:
Extends
Methods
addToAggregation(id)
Adds a new object to the resource map RDF graph
Parameters:
Name |
Type |
Description |
id |
string
|
The id of the object to add |
- Source:
fetchPromise(options, timeoutopt) → {Promise}
Fetch the resource map and return a promise that resolves when the
fetch is complete.
Parameters:
Name |
Type |
Attributes |
Description |
options |
Object
|
|
Options to pass to the fetch function |
timeout |
number
|
<optional>
|
Timeout in milliseconds for the fetch
operation. |
- Source:
Returns:
- A promise that resolves to the fetched model or an
error response.
-
Type
-
Promise
getMembersByMemberID(memberId)
Retrieve the id of the resource map/package that this id belongs to
Parameters:
Name |
Type |
Description |
memberId |
string
|
The id of the member to search for |
- Source:
getTotalSize() → {number}
Calculates and sets the total size of the package in bytes by summing
up the sizes of all members.
- Source:
Returns:
- The total size of the package in bytes.
-
Type
-
number