turtle

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataSet added in v0.5.2

type DataSet struct {
	Namespaces map[string]string
	Triples    []Triple
	// contains filtered or unexported fields
}

func (*DataSet) AddTripleStrings added in v0.6.0

func (d *DataSet) AddTripleStrings(subject, predicate, object string)

func (*DataSet) AddTripleURIs added in v0.6.0

func (d *DataSet) AddTripleURIs(subject, predicate, object URI)

func (*DataSet) NumNamespaces added in v0.5.2

func (d *DataSet) NumNamespaces() int

func (*DataSet) NumTriples added in v0.5.2

func (d *DataSet) NumTriples() int

type Parser added in v0.5.2

type Parser struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func GetParser added in v0.5.2

func GetParser() *Parser

Return Parser instance

func (*Parser) Parse added in v0.5.2

func (p *Parser) Parse(filename string) (DataSet, time.Duration)

Parses the given filename using the turtle format. Returns the dataset, and the time elapsed in parsing

func (*Parser) ParseReader added in v0.5.2

func (p *Parser) ParseReader(r io.Reader) (DataSet, time.Duration, error)

Writes the contents of the reader to a temporary file, and then reads in that file

type Triple added in v0.5.2

type Triple struct {
	Subject   URI `msg:"s"`
	Predicate URI `msg:"p"`
	Object    URI `msg:"o"`
}

func MakeTriple added in v0.5.2

func MakeTriple(sub, pred, obj string) Triple

func (*Triple) DecodeMsg added in v0.5.2

func (z *Triple) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Triple) EncodeMsg added in v0.5.2

func (z *Triple) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Triple) MarshalMsg added in v0.5.2

func (z *Triple) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Triple) Msgsize added in v0.5.2

func (z *Triple) Msgsize() (s int)

func (*Triple) UnmarshalMsg added in v0.5.2

func (z *Triple) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type URI added in v0.5.2

type URI struct {
	Namespace string `msg:"n"`
	Value     string `msg:"v"`
}

func ParseURI added in v0.5.2

func ParseURI(uri string) URI

func (URI) Bytes added in v0.5.2

func (u URI) Bytes() []byte

func (*URI) DecodeMsg added in v0.5.2

func (z *URI) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (URI) EncodeMsg added in v0.5.2

func (z URI) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (URI) IsVariable added in v0.5.2

func (u URI) IsVariable() bool

func (URI) MarshalMsg added in v0.5.2

func (z URI) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (URI) Msgsize added in v0.5.2

func (z URI) Msgsize() (s int)

func (URI) String added in v0.5.2

func (u URI) String() string

func (*URI) UnmarshalMsg added in v0.5.2

func (z *URI) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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