package
module
Version:
v0.0.0-...-cad7271
Opens a new window with list of versions in this module.
Published: Feb 22, 2016
License: BSD-3-Clause
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
gexf
A GEXF file format package.
Supported features
- Basic graph
- Associated data
- Network and data dynamics
- Hierarchy structure
- Phylogeny structure
- Visualization
Documentation
¶
Package gexf implements the GEXF file format
View Source
const (
Version = "1.2"
Space = "http://www.gexf.net/1.2draft"
Local = "gexf"
)
type Attr struct {
ID string `xml:"id,attr"`
Title string `xml:"title,attr"`
Type string `xml:"type,attr"`
Default string `xml:"default,omitempty"`
}
type AttrVal struct {
For string `xml:"for,attr"`
Value string `xml:"value,attr"`
}
type ClassAttrs struct {
Class ClassType `xml:"class,attr"`
Attrs []Attr `xml:"attribute"`
}
type Color struct {
R uint8 `xml:"r,attr"`
G uint8 `xml:"g,attr"`
B uint8 `xml:"b,attr"`
}
type Doc struct {
XMLName xml.Name
Version string `xml:"version,attr"`
Meta Meta `xml:"meta"`
Graph Graph `xml:"graph"`
}
type Edge struct {
ID string `xml:"id,attr"`
Label string `xml:"label,attr,omitempty"`
Type EdgeType `xml:"type,attr,omitempty"`
Source string `xml:"source,attr"`
Target string `xml:"target,attr"`
Weight float64 `xml:"weight,attr,omitempty"`
Attrs []AttrVal `xml:"attvalues>attvalue,omiempty"`
}
type Graph struct {
Mode GraphMode `xml:"mode,attr,omitempty"`
IDType IDType `xml:"idtype,attr,omitempty"`
DefEdge EdgeType `xml:"defaultedgetype,attr,omitempty"`
Attrs []ClassAttrs `xml:"attributes,omitempty"`
Nodes []Node `xml:"nodes>node,omitempty"`
Edges []Edge `xml:"edges>edge,omitempty"`
}
type Meta struct {
LastMod Date `xml:"lastmodifieddate,attr"`
Creator string `xml:"creator,omitempty"`
Keywords string `xml:"keywords,omitempty"`
Desc string `xml:"description,omitempty"`
}
type Node struct {
ID string `xml:"id,attr"`
Label string `xml:"label,attr,omitempty"`
Attrs []AttrVal `xml:"attvalues>attvalue,omiempty"`
Parents []Parent `xml:"parents>parent"`
Size *Size `xml:"http://www.gexf.net/1.2draft/viz size,omitempty"`
Pos *Pos `xml:"http://www.gexf.net/1.2draft/viz position,omitempty"`
Color *Color `xml:"http://www.gexf.net/1.2draft/viz color,omitempty"`
}
type Parent struct {
For string `xml:"for,attr"`
}
type Size struct {
Value float64 `xml:"value,attr"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.