Smee.Extract (Smee v0.1.0) View Source
Processes %Metadata{}
structs to extract various information, usually using XSLT.
This module is intended to make common and relatively simple actions on potentially large XML files more efficiently than
processing each %Entity{} struct in turn, and may rely on external tools such as xsltproc
.
These functions are useful in quick reports or to speed-up the internal workings of other modules.
Link to this section Summary
Functions
Returns a single %Entity{} struct extracted from the metadata, if present. Raises an exception if not present.
Returns a map of all unique metadata Entity Attributes and their values
Returns a list of all entity IDs in a Metadata struct.
Returns a list of maps containing MDUI information for each entity in the metadata file.
Link to this section Functions
Specs
entity!(metadata :: Smee.Metadata.t(), uri :: binary()) :: Smee.Entity.t()
Returns a single %Entity{} struct extracted from the metadata, if present. Raises an exception if not present.
Specs
list_entity_attrs(metadata :: Smee.Metadata.t()) :: map()
Returns a map of all unique metadata Entity Attributes and their values
Specs
list_ids(metadata :: Smee.Metadata.t()) :: [binary()]
Returns a list of all entity IDs in a Metadata struct.
Specs
mdui_info(metadata :: Smee.Metadata.t()) :: map()
Returns a list of maps containing MDUI information for each entity in the metadata file.