-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.go
53 lines (45 loc) · 1.22 KB
/
schema.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package gexf
import (
"encoding/xml"
)
type attrValue struct {
XMLName xml.Name `xml:"attvalue"`
For string `xml:"for,attr"`
Value interface{} `xml:"value,attr"`
}
type attribute struct {
XMLName xml.Name `xml:"attribute"`
ID string `xml:"id,attr"`
Title string `xml:"title,attr"`
Type string `xml:"type,attr"`
Default interface{} `xml:"default"`
}
type attributes struct {
XMLName xml.Name `xml:"attributes"`
Class string `xml:"class,attr"`
Attrs []attribute `xml:"attribute"`
}
type node struct {
XMLName xml.Name `xml:"node"`
ID string `xml:"id,attr"`
Label string `xml:"label,attr"`
Attr *[]attrValue `xml:"attvalues>attvalue"`
}
type edge struct {
XMLName xml.Name `xml:"edge"`
ID string `xml:"id,attr"`
Source string `xml:"source,attr"`
Target string `xml:"target,attr"`
}
type meta struct {
LastModified string `xml:"lastmodifieddate,attr"`
Creator string `xml:"creator"`
Desc string `xml:"description"`
}
type gexf struct {
XMLName xml.Name `xml:"gexf"`
Namespace string `xml:"xmlns,attr"`
Version string `xml:"version,attr"`
Meta *meta `xml:"meta"`
Graph *Graph `xml:"graph"`
}