Documentation
¶
Overview ¶
Example (Example1) ¶
package main
import (
"embed"
_ "embed"
"fmt"
"github.com/0x51-dev/rdf/trig"
)
var example1 string
func main() {
doc, _ := trig.ParseDocument(example1)
fmt.Println(doc)
}
Output: @prefix ex: <http://www.example.org/vocabulary#> . @prefix : <http://www.example.org/exampleDocument#> . :G1 { :Monica a ex:Person ; ex:email <mailto:monica@monicamurphy.org> ; ex:hasSkill ex:Management, ex:Programming ; ex:homepage <http://www.monicamurphy.org> ; ex:name "Monica Murphy" . }
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateDocument ¶
Types ¶
type Context ¶
func NewContext ¶
func NewContext() *Context
func (*Context) EvaluateWrappedGraph ¶
func (ctx *Context) EvaluateWrappedGraph(wg WrappedGraph) bool
type LabelOrSubject ¶
LabelOrSubject is either an IRI or a BlankNode.
func ParseLabelOrSubject ¶
func ParseLabelOrSubject(n *parser.Node) (LabelOrSubject, error)
type Triple2 ¶
type Triple2 struct {
BlankNodePropertyList ttl.BlankNodePropertyList
Collection ttl.Collection
PredicateObjectList ttl.PredicateObjectList
}
type TriplesBlock ¶
func ParseTriplesBlock ¶
func ParseTriplesBlock(n *parser.Node) (TriplesBlock, error)
func (TriplesBlock) String ¶
func (t TriplesBlock) String() string
type TriplesOrGraph ¶
type TriplesOrGraph struct {
LabelOrSubject LabelOrSubject
WrappedGraph WrappedGraph
PredicateObjectList ttl.PredicateObjectList
}
func ParseTriplesOrGraph ¶
func ParseTriplesOrGraph(n *parser.Node) (*TriplesOrGraph, error)
func (*TriplesOrGraph) String ¶
func (t *TriplesOrGraph) String() string
type WrappedGraph ¶
type WrappedGraph TriplesBlock
func ParseWrappedGraph ¶
func ParseWrappedGraph(n *parser.Node) (WrappedGraph, error)
func (WrappedGraph) String ¶
func (w WrappedGraph) String() string
Click to show internal directories.
Click to hide internal directories.