cx

package
v0.0.0-...-3d92bc2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2018 License: MIT Imports: 1 Imported by: 9

Documentation

Index

Constants

View Source
const (
	// For nodes
	Id string = "@id"
	N  string = "n"
	S  string = "s"
	T  string = "t"
	I  string = "i"
	PO string = "po"
	V  string = "v"
)

Tags used in CX files

View Source
const (
	NodesTag string = "nodes"
	EdgesTag string = "edges"

	NodeTag string = "node"
	EdgeTag string = "edge"

	NetworkAttributesTag string = "networkAttributes"
	NodeAttributesTag    string = "nodeAttributes"
	EdgeAttributesTag    string = "edgeAttributes"

	CartesianLayoutTag string = "cartesianLayout"

	VisualPropertiesTag string = "visualProperties"
)

Aspect tags used in CX file

View Source
const (
	Mappings    = "mappings"
	Passthrough = "PASSTHROUGH"
	Discrete    = "DISCRETE"
	Continuous  = "CONTINUOUS"
)
View Source
const (
	Cx_boolean     = "boolean"
	Cx_byte        = "byte"
	Cx_char        = "char"
	Cx_double      = "double"
	Cx_float       = "float"
	Cx_integer     = "integer"
	Cx_long        = "long"
	Cx_short       = "short"
	Cx_string      = "string"
	Cx_listBoolean = "list_of_boolean"
	Cx_listByte    = "list_of_byte"
	Cx_listChar    = "list_of_char"
	Cx_listDouble  = "list_of_double"
	Cx_listFloat   = "list_of_float"
	Cx_listInteger = "list_of_integer"
	Cx_listLong    = "list_of_long"
	Cx_listShort   = "list_of_short"
	Cx_listString  = "list_of_string"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	PO int64       `json:"po"`
	N  string      `json:"n"`
	V  interface{} `json:"v"`
	D  string      `json:"d,omitempty"`
}

Attribute for both nodes and edges

type Edge

type Edge struct {
	ID int64  `json:"@id"`
	S  int64  `json:"s"`
	T  int64  `json:"t"`
	I  string `json:"i"`
}

An Edge in CX

type Edges

type Edges struct {
	EdgeList []Edge `json:"edges"`
}

List of edges

type Mapping

type Mapping struct {
	Type       string `json:"type"`
	Definition string `json:"definition"`
}

type Metadata

type Metadata struct {
}

type NetworkAttribute

type NetworkAttribute struct {
	N string      `json:"n"`
	V interface{} `json:"v"`
	D string      `json:"d,omitempty"`
}

Special case: Attributes for a network

type Node

type Node struct {
	ID int64  `json:"@id"`
	N  string `json:"n"`
}

JSON structure for node

type Nodes

type Nodes struct {
	NodesList []Node `json:"nodes"`
}

List of Nodes

type TypeDecoder

type TypeDecoder struct {
}

func (TypeDecoder) Decode

func (decoder TypeDecoder) Decode(value string, dataType string) interface{}

type VisualProperty

type VisualProperty struct {
	PropertiesOf string `json:"properties_of"`
	AppliesTo    int    `json:"applies_to"`
	View         int    `json:"view"`

	Properties map[string]string  `json:"properties"`
	Mappings   map[string]Mapping `json:"mappings"`
}

Jump to

Keyboard shortcuts

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