xlsx-1.1.2.2: Simple and incomplete Excel file parser/writer

Safe Haskell | Safe-Inferred
Language | Haskell2010

Codec.Xlsx.Types.Internal.Relationships

Synopsis

- data Relationship = Relationship {
  - relType :: Text
  - relTarget :: FilePath
  }
- newtype Relationships = Relationships {
  - relMap :: Map RefId Relationship
  }
- fromList :: [(RefId, Relationship)] -> Relationships
- empty :: Relationships
- size :: Relationships -> Int
- relEntry :: RefId -> Text -> FilePath -> (RefId, Relationship)
- lookup :: RefId -> Relationships -> Maybe Relationship
- setTargetsFrom :: FilePath -> Relationships -> Relationships
- joinRel :: FilePath -> FilePath -> FilePath
- relFrom :: FilePath -> FilePath -> FilePath
- findRelByType :: Text -> Relationships -> Maybe Relationship
- allByType :: Text -> Relationships -> [Relationship]
- parseRelEntry :: Cursor -> [(RefId, Relationship)]
- pr :: Text -> Name
- odr :: Text -> Name
- odRelNs :: Text
- pkgRelNs :: Text
- stdRelType :: Text -> Text

# Documentation

data Relationship Source #

Constructors

Relationship |

Fields

- relType :: Text
- relTarget :: FilePath

#### Instances

Instances details

Generic Relationship Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.Relationships Associated Types type Rep Relationship :: Type -> Type Source # Methods from :: Relationship -> Rep Relationship x Source # to :: Rep Relationship x -> Relationship Source #
Show Relationship Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.Relationships Methods showsPrec :: Int -> Relationship -> ShowS Source # show :: Relationship -> String Source # showList :: [Relationship] -> ShowS Source #
Eq Relationship Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.Relationships Methods (==) :: Relationship -> Relationship -> Bool Source # (/=) :: Relationship -> Relationship -> Bool Source #
FromCursor Relationship Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.Relationships Methods fromCursor :: Cursor -> [Relationship] Source #
ToElement Relationship Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.Relationships Methods toElement :: Name -> Relationship -> Element Source #
type Rep Relationship Source # |

Instance details

Defined in Codec.Xlsx.Types.Internal.Relationships

type Rep Relationship = D1 ('MetaData "Relationship" "Codec.Xlsx.Types.Internal.Relationships" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'False) (C1 ('MetaCons "Relationship" 'PrefixI 'True) (S1 ('MetaSel ('Just "relType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "relTarget") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))

newtype Relationships Source #

Describes relationships according to Open Packaging Convention

See ECMA-376, 4th Edition Office Open XML File Formats — Open Packaging Conventions

Constructors

Relationships |

Fields

- relMap :: Map RefId Relationship

#### Instances

Instances details

Generic Relationships Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.Relationships Associated Types type Rep Relationships :: Type -> Type Source # Methods from :: Relationships -> Rep Relationships x Source # to :: Rep Relationships x -> Relationships Source #
Show Relationships Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.Relationships Methods showsPrec :: Int -> Relationships -> ShowS Source # show :: Relationships -> String Source # showList :: [Relationships] -> ShowS Source #
Eq Relationships Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.Relationships Methods (==) :: Relationships -> Relationships -> Bool Source # (/=) :: Relationships -> Relationships -> Bool Source #
FromCursor Relationships Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.Relationships Methods fromCursor :: Cursor -> [Relationships] Source #
ToDocument Relationships Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.Relationships Methods toDocument :: Relationships -> Document Source #
ToElement Relationships Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.Relationships Methods toElement :: Name -> Relationships -> Element Source #
type Rep Relationships Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.Relationships type Rep Relationships = D1 ('MetaData "Relationships" "Codec.Xlsx.Types.Internal.Relationships" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'True) (C1 ('MetaCons "Relationships" 'PrefixI 'True) (S1 ('MetaSel ('Just "relMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map RefId Relationship))))

fromList :: [(RefId, Relationship)] -> Relationships Source #

empty :: Relationships Source #

size :: Relationships -> Int Source #

relEntry :: RefId -> Text -> FilePath -> (RefId, Relationship) Source #

lookup :: RefId -> Relationships -> Maybe Relationship Source #

setTargetsFrom :: FilePath -> Relationships -> Relationships Source #

joinRel :: FilePath -> FilePath -> FilePath Source #

joins relative URI (actually a file path as an internal relation target)

relFrom :: FilePath -> FilePath -> FilePath Source #

findRelByType :: Text -> Relationships -> Maybe Relationship Source #

allByType :: Text -> Relationships -> [Relationship] Source #

parseRelEntry :: Cursor -> [(RefId, Relationship)] Source #

pr :: Text -> Name Source #

Add package relationship namespace to name

odr :: Text -> Name Source #

Add office document relationship namespace to name

odRelNs :: Text Source #

pkgRelNs :: Text Source #

stdRelType :: Text -> Text Source #