parsestar-1.5: NMR-STAR file format parser.

Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.STAR.Path

Synopsis

Documentation

(./) :: (a -> [a1]) -> (a1 -> [b]) -> a -> [b] infixr 3 Source

This module presents a convenient, compositional interface for filtering Example use: > test1 :: STAR -> [String] > test1 = blocksByName "" . entriesByName "chemical_shifts" . entryValue Another example: > test2 :: STAR -> [String] > test2 = starBlocks . entries . entryValue

Path separator - serves as general function composition operator.

(/<>) :: (a -> b) -> (b -> Bool) -> a -> [b] Source

Path predicate operator - serves as general function composition operator.

(->//) :: [a] -> (a -> [b]) -> [b] infixl 1 Source

Applies a path to a set of elements (not just a document, or single entry.)

filterP :: (t -> Bool) -> t -> [t] Source

blocksByName :: String -> STAR -> [STAREntry] Source

Selects all block matching a given name or GLOBAL block for empty string. TODO: Regex for names?

entriesByName :: String -> STAREntry -> [STAREntry] Source

Filter entries with a given name. Expand loops if necessary.

entryValue :: STAREntry -> [String] Source

Extracts a string value from a flat entry.

allEntriesByName :: String -> STAR -> [String] Source

Find all flat entries with a given name, and return their values.

flattenEntries :: STAREntry -> [STAREntry] Source

Expands a possibly complex entry into a list of flat entries.