This section is empty.


This section is empty.


This section is empty.


type Dict

type Dict map[string]rdf.Term

Dict reference a term by its rawvalue

type Edge

type Edge struct {
	F, T graph.Node
	Term rdf.Term

Edge ...

func (Edge) Attributes

func (e Edge) Attributes() []encoding.Attribute

Attributes fulfills the gonum encoding Attributer

func (Edge) From

func (e Edge) From() graph.Node

From ...

func (Edge) ReversedEdge

func (e Edge) ReversedEdge() graph.Edge

ReversedEdge returns a new Edge with the F and T fields swapped.

func (Edge) To

func (e Edge) To() graph.Node

To ...

type Graph

type Graph struct {
	// Reference of the term and their associated nodes
	Reference map[rdf.Term]*Node
	// Dict ...
	Dict map[string]rdf.Term

Graph is carrying the information

func NewGraph

func NewGraph(rdfGraph *rdf.Graph) Graph

NewGraph ...

func (*Graph) FindNode

func (g *Graph) FindNode(t rdf.Term) *Node

FindNode returns a node whose Term match t's rawstring it returns nil if no matching node is found

func (*Graph) GetTerm

func (g *Graph) GetTerm(s string) rdf.Term

GetTerm returns the term matching s (short forms are expanded according to the namespaces of the graph)

func (*Graph) ToWithEdges

func (g *Graph) ToWithEdges(n *Node, ts ...rdf.Term) graph.Nodes

ToWithEdges return al the nodes reaching n with an edge whosh subject is one of ts

type Node

type Node struct {
	Subject         rdf.Term
	PredicateObject map[rdf.Term][]rdf.Term
	// contains filtered or unexported fields

Node is a node of the graph, it carries n tuple associated with one subject

func (*Node) Attributes

func (n *Node) Attributes() []encoding.Attribute

Attributes fulfills the gonum encoding Attributer

func (*Node) ID

func (n *Node) ID() int64

ID of the node