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 true, will normalize URLs around the Base parameter and Prefixes for
// output.
ResolveURLs bool
// If set, will output a `@base` pragma at the start and if ResolveURLs is
// true will normalize all URLs that start with the base to their relative
// components.
Base string
// If set, if ResolveURLs is true, 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.