View Source BUPE.Item (BUPE v0.6.1)
The Item element definition.
Each Item element represents a Publication Resource.
Summary
Types
Functions
Convert a given path into a BUPE.Item
struct.
Examples
iex> BUPE.Item.from_string("book/bacon.xhtml")
#=> %BUPE.Item{
description: "bacon",
duration: nil,
fallback: nil,
href: "book/bacon.xhtml",
id: "i-fddafede-7628-4cc9-b7e9-4a653cd2fef3",
media_overlay: nil,
media_type: "application/xhtml+xml",
properties: nil
}
Normalize the given BUPE.Item
struct.
Examples
iex> BUPE.Item.normalize(%BUPE.Item{
...> id: "ode-to-bacon",
...> href: "book/bacon.xhtml",
...> description: "Ode to Bacon"
...> })
%BUPE.Item{
description: "Ode to Bacon",
duration: nil,
fallback: nil,
href: "book/bacon.xhtml",
id: "ode-to-bacon",
media_overlay: nil,
media_type: "application/xhtml+xml",
properties: nil
}