Documentation ¶
Overview ¶
Package nquads parses N-Quads (https://www.w3.org/TR/n-quads/)
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnexpectedCharacter is the error returned when a general syntax error is encountered. ErrUnexpectedCharacter = errors.New("unexpected character") // ErrInvalidCodepointExpression is the error returned when an IRI or literal is encountered with an invalid // unicode encoding of the form \Uxxxxxxxx or \uxxxx is encountered. ErrInvalidCodepointExpression = errors.New("invalid unicode codepoint expression") // ErrUnexpectedEOF is the error returned when an EOF was encountered while reading a quad. ErrUnexpectedEOF = io.ErrUnexpectedEOF // ErrUnterminatedQuad is the error returned when a quad appears to be missing the final period. ErrUnterminatedQuad = errors.New("unterminated quad, expecting '.'") // ErrRelativeIRI is the error returned when a relative IRI is encountered. All IRIs in an N-Quads document must // be written as absolute IRIs. ErrRelativeIRI = errors.New("relative IRI") )
These are the errors that can be returned in ParseError.Error
Functions ¶
This section is empty.
Types ¶
type ParseError ¶
type ParseError struct { Line int // Line where the error occurred Column int // Column (rune index) where the error occurred Err error // The actual error }
A ParseError is returned for parsing errors. The first line is 1. The first column is 0.
func (*ParseError) Error ¶
func (e *ParseError) Error() string
func (*ParseError) Unwrap ¶
func (e *ParseError) Unwrap() error
type Quad ¶
type Quad struct { S rdf.Term P rdf.Term O rdf.Term G rdf.Term }
A Quad consists of a subject, predicate, object and graph
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) Err ¶
Err returns any error encountered while reading. If Err is non-nil then Next will always return false.
Click to show internal directories.
Click to hide internal directories.