cquads

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2014 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

This section is empty.

Functions

func Parse

func Parse(str 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