graph

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package graph contains a functionality of a buffer that consumes triples one by one and can return a byte slice containing Turtle data of all triples consumed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

type Graph struct {
	// contains filtered or unexported fields
}

Graph serves as a buffer that consumes triples one by one and can return a byte slice containing Turtle data of all triples consumed.

func New

func New() *Graph

New returns a pointer to a new intance of graph.Graph

func (*Graph) Accept

func (g *Graph) Accept(t [3]string) error

Accept stores a new triple to the graph.

func (*Graph) Bytes

func (g *Graph) Bytes() ([]byte, error)

Bytes returns the so far consumed triples as a byte slice of Turle data. The triples in the byte slice are sorted first by subject, then by predicates, then by objects alphabetically.

Jump to

Keyboard shortcuts

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