View Source Smee.Extract (Smee v0.5.0)
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.
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.
Functions
@spec 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.
@spec list_entity_attrs(metadata :: Smee.Metadata.t()) :: map()
Returns a map of all unique metadata Entity Attributes and their values
@spec list_ids(metadata :: Smee.Metadata.t()) :: [binary()]
Returns a list of all entity IDs in a Metadata struct.
@spec mdui_info(metadata :: Smee.Metadata.t()) :: map()
Returns a list of maps containing MDUI information for each entity in the metadata file.