graphml

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Undirected = EdgeDefault("undirected")
	Directed   = EdgeDefault("directed")
)
View Source
const (
	EndpointIn    = EndpointType("in")
	EndpointOut   = EndpointType("out")
	EndpointUndir = EndpointType("undir")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attr

type Attr struct {
	// XMLName xml.Name `xml:"data"`
	Key   string `xml:"key,attr"`
	Value []byte `xml:",innerxml"`
}

type Attrs

type Attrs []Attr

func (*Attrs) AddNonEmpty

func (attrs *Attrs) AddNonEmpty(key, value string)

type Edge

type Edge struct {
	// XMLName xml.Name `xml:"edge"`
	ID string `xml:"id,attr,omitempty"`

	Source   string `xml:"source,attr"`
	Target   string `xml:"target,attr"`
	Directed *bool  `xml:"directed,attr,omitempty"`

	SourcePort string `xml:"sourceport,attr,omitempty"`
	TargetPort string `xml:"targetport,attr,omitempty"`

	Attrs Attrs `xml:"data"`
}

type EdgeDefault

type EdgeDefault string

type Endpoint

type Endpoint struct {
	// XMLName xml.Name `xml:"endpoint"`
	Node string       `xml:"node,attr"`
	Port string       `xml:"port,attr,omitempty"`
	Type EndpointType `xml:"type,attr,omitempty"`
}

type EndpointType

type EndpointType string

type File

type File struct {
	XMLName           xml.Name `xml:"graphml"`
	XMLNS             string   `xml:"xmlns,attr"`
	XMLNSXSI          string   `xml:"xmlns:xsi,attr"`
	XMLNSY            string   `xml:"xmlns:y,attr"`
	XSISchemaLocation string   `xml:"xsi:schemalocation,attr"`

	Key    []Key    `xml:"key"`
	Graphs []*Graph `xml:"graph"`
}

func NewFile

func NewFile() *File

type Graph

type Graph struct {
	// XMLName xml.Name `xml:"graph"`
	ID          string      `xml:"id,attr"`
	EdgeDefault EdgeDefault `xml:"edgedefault,attr"`

	Node      []Node      `xml:"node"`
	Edge      []Edge      `xml:"edge"`
	Hyperedge []Hyperedge `xml:"hyperedge"`
}

type Hyperedge

type Hyperedge struct {
	ID       string     `xml:"id,attr,omitempty"`
	Endpoint []Endpoint `xml:"endpoint"`
}

type Key

type Key struct {
	ID  string `xml:"id,attr"`
	For string `xml:"for,attr"`

	AttrName string `xml:"attr.name,attr,omitempty"`
	AttrType string `xml:"attr.type,attr,omitempty"`

	YFilesType string `xml:"yfiles.type,attr,omitempty"`
}

type Node

type Node struct {
	// XMLName xml.Name `xml:"node"`
	ID    string   `xml:"id,attr"`
	Port  []Port   `xml:"port"`
	Graph []*Graph `xml:"graph"`
	Attrs Attrs    `xml:"data"`
}

type Port

type Port struct {
	// XMLName xml.Name `xml:"port"`
	Name string `xml:"name,attr"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL