smart_city v2.7.0 SmartCity.Dataset.Metadata View Source
A struct defining internal metadata on a dataset.
Link to this section Summary
Functions
Returns a new SmartCity.Dataset.Metadata
struct.
Can be created from Map
with string or atom keys.
Raises an ArgumentError
when passed invalid input.
Link to this section Types
Link to this section Functions
Returns a new SmartCity.Dataset.Metadata
struct.
Can be created from Map
with string or atom keys.
Raises an ArgumentError
when passed invalid input.
Parameters
- msg: Map with string or atom keys that defines the dataset's metadata.
Examples
iex> SmartCity.Dataset.Metadata.new(%{"intendedUse" => ["a","b","c"], "expectedBenefit" => [1,2,3]})
%SmartCity.Dataset.Metadata{
expectedBenefit: [1, 2, 3],
intendedUse: ["a", "b", "c"]
}
iex> SmartCity.Dataset.Metadata.new(%{:intendedUse => ["a","b","c"], :expectedBenefit => [1,2,3]})
%SmartCity.Dataset.Metadata{
expectedBenefit: [1, 2, 3],
intendedUse: ["a", "b", "c"]
}
iex> SmartCity.Dataset.Metadata.new("Not a map")
** (ArgumentError) Invalid internal metadata: "Not a map"