net-spider-0.4.3.7: A graph database middleware to maintain a time-varying graph.
MaintainerToshio Ito <debug.ito@gmail.com>
Safe HaskellNone
LanguageHaskell2010

NetSpider.GraphML.Attribute

Description

Since: 0.4.1.0

Synopsis

Documentation

type AttributeKey = Text Source #

Key of attribute.

data AttributeValue Source #

Typed value of attribute.

Instances

Instances details
Eq AttributeValue Source # 
Instance details

Defined in NetSpider.GraphML.Attribute

Ord AttributeValue Source # 
Instance details

Defined in NetSpider.GraphML.Attribute

Show AttributeValue Source # 
Instance details

Defined in NetSpider.GraphML.Attribute

ToJSON AttributeValue Source #

Since: 0.4.1.0

Instance details

Defined in NetSpider.GraphML.Attribute

FromJSON AttributeValue Source #

Based on valueFromAeson.

Since: 0.4.1.0

Instance details

Defined in NetSpider.GraphML.Attribute

ToAttributes [(AttributeKey, AttributeValue)] Source # 
Instance details

Defined in NetSpider.GraphML.Attribute

class ToAttributes a where Source #

Type that can be converted to list of attributes.

Instances

Instances details
ToAttributes () Source # 
Instance details

Defined in NetSpider.GraphML.Attribute

ToAttributes TimeZone Source #

Since: 0.4.1.0

Instance details

Defined in NetSpider.GraphML.Attribute

ToAttributes Timestamp Source #

Since: 0.4.1.0

Instance details

Defined in NetSpider.Timestamp

ToAttributes [(AttributeKey, AttributeValue)] Source # 
Instance details

Defined in NetSpider.GraphML.Attribute

ToAttributes a => ToAttributes (Maybe a) Source #

Nothing is mapped to empty attributes.

Instance details

Defined in NetSpider.GraphML.Attribute

valueFromAeson :: Value -> Maybe AttributeValue Source #

Make AttributeValue from aeson's Value. It returns Nothing, if the input is null, an object or an array. If the input is a number, the output uses AttrDouble.

attributesFromAeson :: Value -> Maybe [(AttributeKey, AttributeValue)] Source #

Make attributes from aeson's Value. It assumes the input is an object, and its values can be converted by valueFromAeson. Otherwise, it returns Nothing.

attributesToAeson :: [(AttributeKey, AttributeValue)] -> Value Source #

Make aeson Object as Value from attributes.

Since: 0.4.1.0