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 instance of graph.Graph. No options are set.
func NewWithOptions ¶
NewWithOptions constructs a graph with options to tweak its behavior. See Options.
func (*Graph) AcceptWithAnnotations ¶
AcceptWithAnnotations stores a new triple with eventual label and data type of the object literal to the graph.
type Options ¶
type Options struct {
// If set, will output a `@base` pragma at the start. Will normalize all URLs
// that start with the base to their relative components.
Base string
// If set, any encountering of the prefix URL prefixes will be normalized to
// use the prefix. Additionally, @prefix lines are output at the top of the
// document for each one.
Prefixes map[string]string
}
Options changes the behavior of the graph. It is passed to NewWithOptions.