tmcf

package
v1.38.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PreC is the prefix for Column
	PreC = "C:"
	// PreE is the prefix for Entity
	PreE = "E:"
	// Arrow is the symbol in schema mapping between table name and table column
	Arrow = "->"
	// TypeOf represents "typeOf" literal
	TypeOf = "typeOf"
	// ReferenceDelimiter is the delimiter for schema namespace
	ReferenceDelimiter = ':'
	// Triple represents Triples table name
	Triple = "Triple"
)

Variables

This section is empty.

Functions

func ParseComplexValue

func ParseComplexValue(val string) string

ParseComplexValue parses a complex value string into node.

[!!]This has minimal validation check, assuming the input has been checked by the import tool.

  1. a Quantity/QuantityRange value, coded as one of: [<unit> <val>] [<unit> <startval> <endval>] [<unit> - <endval>] [<unit> <startval> -]
  1. a GeoCoordinates type, coded as one of: [LatLong <lat_value> <long_value>] [<lat_value> <long_value> LatLong]

func ParseTmcf

func ParseTmcf(tmcf string) (map[string]*TableSchema, error)

ParseTmcf parses TMCF into a map with key of the table name, and value being the TableSchema struct.

Types

type Column

type Column struct {
	Node     string
	Property string
}

Column represents a csv column' node and property.

type TableSchema

type TableSchema struct {
	// Keyed by column name.
	ColumnInfo map[string][]*Column
	// Keyed by node name and property.
	NodeSchema map[string]map[string]string
}

TableSchema Represents the schema of one table

Jump to

Keyboard shortcuts

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