GS1Combinators-0.1.0.0: Haskell combinator library of GS1 EPCIS standard

Safe HaskellNone
LanguageHaskell2010

Data.GS1.Parser.Parser

Description

module providing parser helper functions

Synopsis

Documentation

getCursorsByName :: Name -> Cursor -> [Cursor] Source #

Get all the cursors with the given name below the current cursor

parseStr2TimeZone :: Text -> Either ParseFailure TimeZone Source #

parse the T.Text and obtain TimeZone,

parseStr2Time :: Text -> Either ParseFailure EPCISTime Source #

parse the string to UTC time, the time zone information will be merged into the time tries the different ISO8601 formats and gets the first one that parses

parseAction :: Cursor -> Either ParseFailure Action Source #

Parse Action by Name

parseDWhen :: Cursor -> Either ParseFailure DWhen Source #

Requires Event Level cursor

parseSourceDestLocation :: Cursor -> Name -> Name -> Name -> [Either ParseFailure SrcDestLocation] Source #

TODO: there must be some more modification on it

c --> Can be a top level / event-level cursor list --> The Name of the cursor under which the list of epcs lie e.g -> sourceList, destinationList el --> The Name of cursor which has the epc string as its content e.g -> source, destination The content of this forms the LocationEPC attr --> The name of the attribute to look into for epc content, e.g, "type" The content found with this form the SourceDestTypes

parseParentLabel :: Cursor -> Maybe ParentLabel Source #

parse group of text to obtain ParentId takes in one event cursor, looks for a cursor that resembles

parseObjectDWhat :: Cursor -> Either ParseFailure ObjectDWhat Source #

parse and construct ObjectDWhat dimension

parseAggregationDWhat :: Cursor -> Either ParseFailure AggregationDWhat Source #

parse and construct AggregationDWhat dimension

parseEventByType :: Cursor -> EventType -> [Either ParseFailure Event] Source #

Find all events (that match the specified EventType) and put them into an event list