cquads

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package cquads implements parsing N-Quads like line-based syntax for RDF datasets.

N-Quad parsing is performed as based on a simplified grammar derived from the N-Quads grammar defined by http://www.w3.org/TR/n-quads/.

For a complete definition of the grammar, see cquads.rl.

Index

Constants

This section is empty.

Variables

View Source
var AutoConvertTypedString = true

AutoConvertTypedString allows to convert TypedString values to native equivalents directly while parsing. It will call ToNative on all TypedString values.

If conversion error occurs, it will preserve original TypedString value.

Functions

func Parse

func Parse(statement string) (quad.Quad, error)

Parse returns a valid quad.Quad or a non-nil error. Parse does handle comments except where the comment placement does not prevent a complete valid quad.Quad from being defined.

Types

type Decoder

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

Decoder implements simplified N-Quad document parsing.

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

NewDecoder returns an N-Quad decoder that takes its input from the provided io.Reader.

func (*Decoder) Unmarshal

func (dec *Decoder) Unmarshal() (quad.Quad, error)

Unmarshal returns the next valid N-Quad as a quad.Quad, or an error.

Jump to

Keyboard shortcuts

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