Last active
August 29, 2015 13:56
-
-
Save mmeisinger/9012141 to your computer and use it in GitHub Desktop.
Marine Asset Definitions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Holds information about the definition of a custom attribute, e.g. for instrument models | |
CustomAttribute: | |
# Name of the attribute | |
name: "" | |
# Type of the attribute. | |
# Codelist: str, int, float, bool, list, dict | |
type: "" | |
# Description for the attribute | |
description: "" | |
# Default value for the attribute | |
default: "" | |
# Units applied to the attribute value (if applicable) | |
units: "" | |
--- | |
MarineAssetType: !Extends_InformationResource | |
# Additional attributes permissible or required for this specific asset type. | |
# Each entry in the list is a CustomAttribute object (see above). | |
# An asset of this type should then store these attribute values in the corresponding custom_attributes | |
# of the asset instance. | |
#@ContentType=CustomAttribute | |
custom_attribute_definitions: {} | |
MarineAsset: !Extends_InformationResource | |
# Identifies the asset type by name (redundant with association to MarineAssetType) | |
asset_type: "" | |
# Common attribute for all assets | |
serial_number: "" | |
# Additional attribute values applicable for the asset's type as key-value pairs. | |
# The attribute names must align with the MarineAssetType:custom_attribute_definitions:name field for this type of asset. | |
custom_attributes: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create_marine_asset_type: | |
docstring: | | |
Create a MarineAssetType resource. | |
in: | |
marine_asset_type: !MarineAssetType | |
out: | |
marine_asset_type_id: "" | |
throws: | |
BadRequest: if object does not have _id or _rev attribute | |
NotFound: object with specified id does not exist | |
update_observatory: | |
docstring: Update a MarineAssetType resource | |
in: | |
marine_asset_type: !MarineAssetType | |
out: | |
throws: | |
NotFound: object with specified id does not exist | |
read_observatory: | |
docstring: Read a MarineAssetType resource | |
in: | |
marine_asset_type_id: "" | |
out: | |
marine_asset_type: !MarineAssetType | |
throws: | |
NotFound: object with specified id does not exist | |
delete_observatory: | |
docstring: Delete a MarineAssetType resource | |
in: | |
marine_asset_type_id: "" | |
out: | |
throws: | |
NotFound: object with specified id does not exist | |
create_marine_asset: | |
docstring: | | |
Create a MarineAsset resource. | |
in: | |
marine_asset: !MarineAsset | |
out: | |
marine_asset_id: "" | |
throws: | |
BadRequest: if object does not have _id or _rev attribute | |
NotFound: object with specified id does not exist | |
update_observatory: | |
docstring: Update a MarineAsset resource | |
in: | |
marine_asset: !MarineAsset | |
out: | |
throws: | |
NotFound: object with specified id does not exist | |
read_observatory: | |
docstring: Read a MarineAsset resource | |
in: | |
marine_asset_id: "" | |
out: | |
marine_asset_type: !MarineAsset | |
throws: | |
NotFound: object with specified id does not exist | |
delete_observatory: | |
docstring: Delete a MarineAsset resource | |
in: | |
marine_asset_id: "" | |
out: | |
throws: | |
NotFound: object with specified id does not exist | |
assign_marine_asset_type_to_marine_asset: | |
docstring: link a marine asset to a marine asset type | |
in: | |
marine_asset_type_id: "" | |
marine_asset_id: "" | |
out: | |
throws: | |
NotFound: object with specified id does not exist | |
unassign_marine_asset_type_from_marine_asset: | |
in: | |
marine_asset_type_id: "" | |
marine_asset_id: "" | |
out: | |
throws: | |
NotFound: object with specified id does not exist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AssociationDefinitions: | |
- predicate: hasAssetType | |
domain: [MarineAsset] | |
range: [MarineAssetType] | |
docstring: References a the type resource of a marine asset resource | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment