gonum: gonum.org/v1/gonum/graph/formats/gexf12 Index | Files

package gexf12

import "gonum.org/v1/gonum/graph/formats/gexf12"

Package gexf12 implements marshaling and unmarshaling of GEXF1.2 documents.

For details of GEXF see https://gephi.org/gexf/format/.

Index

Package Files

gexf.go

type AttValue Uses

type AttValue struct {
    For       string `xml:"for,attr"`
    Value     string `xml:"value,attr"`
    Start     string `xml:"start,attr,omitempty"`
    StartOpen string `xml:"startopen,attr,omitempty"`
    End       string `xml:"end,attr,omitempty"`
    EndOpen   string `xml:"endopen,attr,omitempty"`
}

AttValues holds a single attribute value and its associated dynamics.

type AttValues Uses

type AttValues struct {
    AttValues []AttValue `xml:"attvalue,omitempty"`
}

AttVlues holds a collection of attribute values.

type Attribute Uses

type Attribute struct {
    ID    string `xml:"id,attr"`
    Title string `xml:"title,attr"`
    // Type may be one of "integer", "long", "double", "float",
    // "boolean", "liststring", "string", or "anyURI".
    Type    string `xml:"type,attr"`
    Default string `xml:"default,omitempty"`
    Options string `xml:"options,omitempty"`
}

Attribute holds a single graph attribute.

type Attributes Uses

type Attributes struct {
    Attributes []Attribute `xml:"attribute,omitempty"`
    // Class be one of "node" or "edge".
    Class string `xml:"class,attr"`
    // Mode may be "static" or "dynamic".
    Mode      string `xml:"mode,attr,omitempty"`
    Start     string `xml:"start,attr,omitempty"`
    StartOpen string `xml:"startopen,attr,omitempty"`
    End       string `xml:"end,attr,omitempty"`
    EndOpen   string `xml:"endopen,attr,omitempty"`
}

Attributes holds a collection of potentially dynamic attributes associated with a graph.

type Color Uses

type Color struct {
    Spells    *Spells `xml:"spells,omitempty"`
    R         byte    `xml:"r,attr"`
    G         byte    `xml:"g,attr"`
    B         byte    `xml:"b,attr"`
    A         float64 `xml:"a,attr,omitempty"`
    Start     string  `xml:"start,attr,omitempty"`
    StartOpen string  `xml:"startopen,attr,omitempty"`
    End       string  `xml:"end,attr,omitempty"`
    EndOpen   string  `xml:"endopen,attr,omitempty"`
}

Color represents a node or edge color and its associated dynamics.

type Content Uses

type Content struct {
    XMLName xml.Name `xml:"http://www.gexf.net/1.2draft gexf"`
    Meta    *Meta    `xml:"meta,omitempty"`
    Graph   Graph    `xml:"graph"`
    // Version must be "1.2".
    Version string `xml:"version,attr"`
    Variant string `xml:"variant,attr,omitempty"`
}

Content holds a GEFX graph and metadata.

type Edge Uses

type Edge struct {
    ID        string     `xml:"id,attr,omitempty"`
    AttValues *AttValues `xml:"attvalues"`
    Spells    *Spells    `xml:"spells"`
    Color     *Color     `xml:"http://www.gexf.net/1.2draft/viz color"`
    Thickness *Thickness `xml:"http://www.gexf.net/1.2draft/viz thickness"`
    Shape     *Edgeshape `xml:"http://www.gexf.net/1.2draft/viz shape"`
    Start     string     `xml:"start,attr,omitempty"`
    StartOpen string     `xml:"startopen,attr,omitempty"`
    End       string     `xml:"end,attr,omitempty"`
    EndOpen   string     `xml:"endopen,attr,omitempty"`
    // Type may be one of directed, undirected, mutual
    Type   string  `xml:"type,attr,omitempty"`
    Label  string  `xml:"label,attr,omitempty"`
    Source string  `xml:"source,attr"`
    Target string  `xml:"target,attr"`
    Weight float64 `xml:"weight,attr,omitempty"`
}

Edge is a single edge and its associated attributes.

type Edges Uses

type Edges struct {
    Count int    `xml:"count,attr,omitempty"`
    Edges []Edge `xml:"edge,omitempty"`
}

Edges holds a collection of edges constituting a graph or subgraph.

type Edgeshape Uses

type Edgeshape struct {
    // Shape be one of solid, dotted, dashed, double
    Shape     string  `xml:"value,attr"`
    Spells    *Spells `xml:"spells,omitempty"`
    Start     string  `xml:"start,attr,omitempty"`
    StartOpen string  `xml:"startopen,attr,omitempty"`
    End       string  `xml:"end,attr,omitempty"`
    EndOpen   string  `xml:"endopen,attr,omitempty"`
}

EdgeShape holds the visual representation of an edge with associated dynamics.

type Graph Uses

type Graph struct {
    Attributes []Attributes `xml:"attributes"`
    Nodes      Nodes        `xml:"nodes"`
    Edges      Edges        `xml:"edges"`
    // TimeFormat may be one of "integer", "double", "date" or "dateTime".
    TimeFormat string `xml:"timeformat,attr,omitempty"`
    Start      string `xml:"start,attr,omitempty"`
    StartOpen  string `xml:"startopen,attr,omitempty"`
    End        string `xml:"end,attr,omitempty"`
    EndOpen    string `xml:"endopen,attr,omitempty"`
    // DefaultEdgeType may be one of "directed", "undirected" or "mutual".
    DefaultEdgeType string `xml:"defaultedgetype,attr,omitempty"`
    // IDType may be one of "integer" or "string".
    IDType string `xml:"idtype,attr,omitempty"`
    // Mode may be "static" or "dynamic".
    Mode string `xml:"mode,attr,omitempty"`
}

Graph stores the graph nodes, edges, dynamics and visualization data.

type Meta Uses

type Meta struct {
    Creator      string    `xml:"creator,omitempty"`
    Keywords     string    `xml:"keywords,omitempty"`
    Description  string    `xml:"description,omitempty"`
    LastModified time.Time `xml:"lastmodifieddate,attr,omitempty"`
}

Meta holds optional metadata associated with the graph.

func (*Meta) MarshalXML Uses

func (t *Meta) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface.

func (*Meta) UnmarshalXML Uses

func (t *Meta) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface.

type Node Uses

type Node struct {
    ID        string     `xml:"id,attr,omitempty"`
    Label     string     `xml:"label,attr,omitempty"`
    AttValues *AttValues `xml:"attvalues"`
    Spells    *Spells    `xml:"spells"`
    Nodes     *Nodes     `xml:"nodes"`
    Edges     *Edges     `xml:"edges"`
    ParentID  string     `xml:"pid,attr,omitempty"`
    Parents   *Parents   `xml:"parents"`
    Color     *Color     `xml:"http://www.gexf.net/1.2draft/viz color"`
    Position  *Position  `xml:"http://www.gexf.net/1.2draft/viz position"`
    Size      *Size      `xml:"http://www.gexf.net/1.2draft/viz size"`
    Shape     *NodeShape `xml:"http://www.gexf.net/1.2draft/viz shape"`
    Start     string     `xml:"start,attr,omitempty"`
    StartOpen string     `xml:"startopen,attr,omitempty"`
    End       string     `xml:"end,attr,omitempty"`
    EndOpen   string     `xml:"endopen,attr,omitempty"`
}

Node is a single node and its associated attributes.

type NodeShape Uses

type NodeShape struct {
    Spells *Spells `xml:"spells,omitempty"`
    // Value be one of "disc", "square", "triangle",
    // "diamond" or "image".
    Shape     string `xml:"value,attr"`
    URI       string `xml:"uri,attr,omitempty"`
    Start     string `xml:"start,attr,omitempty"`
    StartOpen string `xml:"startopen,attr,omitempty"`
    End       string `xml:"end,attr,omitempty"`
    EndOpen   string `xml:"endopen,attr,omitempty"`
}

NodeShape holds the visual representation of a node with associated dynamics.

type Nodes Uses

type Nodes struct {
    Count int    `xml:"count,attr,omitempty"`
    Nodes []Node `xml:"node,omitempty"`
}

Nodes holds a collection of nodes constituting a graph or subgraph.

type Parent Uses

type Parent struct {
    For string `xml:"for,attr"`
}

Parent is a single parent relationship.

type Parents Uses

type Parents struct {
    Parents []Parent `xml:"parent,omitempty"`
}

Parents holds parent relationships between nodes in a hierarchical graph.

type Position Uses

type Position struct {
    X         float64 `xml:"x,attr"`
    Y         float64 `xml:"y,attr"`
    Z         float64 `xml:"z,attr"`
    Spells    *Spells `xml:"spells,omitempty"`
    Start     string  `xml:"start,attr,omitempty"`
    StartOpen string  `xml:"startopen,attr,omitempty"`
    End       string  `xml:"end,attr,omitempty"`
    EndOpen   string  `xml:"endopen,attr,omitempty"`
}

Position hold the spatial position of a node and its dynamics.

type Size Uses

type Size struct {
    Value     float64 `xml:"value,attr"`
    Spells    *Spells `xml:"http://www.gexf.net/1.2draft/viz spells,omitempty"`
    Start     string  `xml:"start,attr,omitempty"`
    StartOpen string  `xml:"startopen,attr,omitempty"`
    End       string  `xml:"end,attr,omitempty"`
    EndOpen   string  `xml:"endopen,attr,omitempty"`
}

Size hold the visual size of a node and its dynamics.

type Spell Uses

type Spell struct {
    Start     string `xml:"start,attr,omitempty"`
    StartOpen string `xml:"startopen,attr,omitempty"`
    End       string `xml:"end,attr,omitempty"`
    EndOpen   string `xml:"endopen,attr,omitempty"`
}

Spell is a time interval.

type Spells Uses

type Spells struct {
    Spells []Spell `xml:"spell"`
}

Spells holds a collection of time dynamics for a graph entity.

type Thickness Uses

type Thickness struct {
    Value     float64 `xml:"value,attr"`
    Spells    *Spells `xml:"http://www.gexf.net/1.2draft/viz spells,omitempty"`
    Start     string  `xml:"start,attr,omitempty"`
    StartOpen string  `xml:"startopen,attr,omitempty"`
    End       string  `xml:"end,attr,omitempty"`
    EndOpen   string  `xml:"endopen,attr,omitempty"`
}

Thickness hold the visual thickness of an edge and its dynamics.

Bugs

The namespace for GEFX1.2 is 1.2draft, though it has already been deprecated. There is no specification for 1.3, although it is being used in the wild.

Package gexf12 imports 3 packages (graph) and is imported by 1 packages. Updated 2019-01-30. Refresh now. Tools for package owners.