Documentation
¶
Overview ¶
Package graph provides various implementation for a RDF Graph
Index ¶
- type Graph
- type ListGraph
- func (g *ListGraph) Add(triple rdf.Triple)
- func (g *ListGraph) Delete(subject, predicate, object rdf.Node)
- func (g *ListGraph) Filter(subject, predicate, object rdf.Node) <-chan rdf.Triple
- func (g *ListGraph) FilterSubset(subject rdf.Node, predicate rdf.Node, object rdf.Node, limit int, offset int) <-chan rdf.Triple
- func (r ListGraph) LoadFromFile(filename string, format string) error
- type TreeGraph
- func (g *TreeGraph) Add(triple rdf.Triple)
- func (g *TreeGraph) Delete(subject, predicate, object rdf.Node)
- func (g *TreeGraph) Filter(subject, predicate, object rdf.Node) <-chan rdf.Triple
- func (g *TreeGraph) FilterSubset(subject rdf.Node, predicate rdf.Node, object rdf.Node, limit int, offset int) <-chan rdf.Triple
- func (r TreeGraph) LoadFromFile(filename string, format string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graph ¶
type Graph interface {
// Add a new Triple pattern to the graph.
Add(triple rdf.Triple)
// Delete triples from the graph that match a BGP given in parameters.
Delete(subject, predicate, object rdf.Node)
// Fetch triples form the graph that match a BGP given in parameters.
Filter(subject, predicate, object rdf.Node) <-chan rdf.Triple
// Same as Filter, but with a Limit and an Offset
FilterSubset(subject rdf.Node, predicate rdf.Node, object rdf.Node, limit int, offset int) <-chan rdf.Triple
}
Graph represents a generic RDF Graph
Package graph provides several implementations for this interface. RDF Graph reference : https://www.w3.org/TR/rdf11-concepts/#section-rdf-graph
type ListGraph ¶
ListGraph is implementation of a RDF Graph, using a slice to store RDF Triples.
func (*ListGraph) Filter ¶
Filter fetch triples form the graph that match a BGP given in parameters.
func (*ListGraph) FilterSubset ¶
func (g *ListGraph) FilterSubset(subject rdf.Node, predicate rdf.Node, object rdf.Node, limit int, offset int) <-chan rdf.Triple
FilterSubset fetch triples form the graph that match a BGP given in parameters. It impose a Limit(the max number of results to be send in the output channel) and an Offset (the number of results to skip before sending them in the output channel) to the nodes requested.
func (ListGraph) LoadFromFile ¶
LoadFromFile loads triples from a file into a graph, with a given format In the desired format isn't supported or doesn't exist, no new triples will be inserted into the graph and an error will be returned.
type TreeGraph ¶
TreeGraph is a implementation of a RDF Graph based on the HDT-MR model proposed by Giménez-García et al.
For more details, see http://dataweb.infor.uva.es/projects/hdt-mr/
func (*TreeGraph) Filter ¶
Filter fetch triples form the graph that match a BGP given in parameters.
func (*TreeGraph) FilterSubset ¶
func (g *TreeGraph) FilterSubset(subject rdf.Node, predicate rdf.Node, object rdf.Node, limit int, offset int) <-chan rdf.Triple
FilterSubset fetch triples form the graph that match a BGP given in parameters. It impose a Limit(the max number of results to be send in the output channel) and an Offset (the number of results to skip before sending them in the output channel) to the nodes requested.
func (TreeGraph) LoadFromFile ¶
LoadFromFile loads triples from a file into a graph, with a given format In the desired format isn't supported or doesn't exist, no new triples will be inserted into the graph and an error will be returned.