Safe Haskell | None |
---|---|
Language | Haskell98 |
TriplesGraph contains a list-backed graph implementation suitable
for smallish graphs or for temporary graphs that will not be queried.
It maintains the triples in the order that they are given in, and is
especially useful for holding N-Triples, where it is often desirable
to preserve the order of the triples when they were originally parsed.
Duplicate triples are not filtered. If you might have duplicate triples,
use MGraph
instead, which is also more efficient. However, the query
functions of this graph (select, query) remove duplicates from their
result triples (but triplesOf does not) since it is usually cheap
to do so.
Synopsis
- data TList
Documentation
A simple implementation of the RDF
type class that represents
the graph internally as a list of triples.
Note that this type of RDF is fine for interactive
experimentation and querying of smallish (<10,000 triples) graphs,
but there are better options for larger graphs or graphs that you
will do many queries against (e.g., MGraph
is faster for queries).
The time complexity of the functions (where n == num_triples) are:
Instances
Generic TList Source # | |
Binary TList Source # | |
NFData TList Source # | |
Defined in Data.RDF.Graph.TList | |
Rdf TList Source # | |
Defined in Data.RDF.Graph.TList baseUrl :: RDF TList -> Maybe BaseUrl Source # prefixMappings :: RDF TList -> PrefixMappings Source # addPrefixMappings :: RDF TList -> PrefixMappings -> Bool -> RDF TList Source # mkRdf :: Triples -> Maybe BaseUrl -> PrefixMappings -> RDF TList Source # addTriple :: RDF TList -> Triple -> RDF TList Source # removeTriple :: RDF TList -> Triple -> RDF TList Source # triplesOf :: RDF TList -> Triples Source # uniqTriplesOf :: RDF TList -> Triples Source # select :: RDF TList -> NodeSelector -> NodeSelector -> NodeSelector -> Triples Source # query :: RDF TList -> Maybe Node -> Maybe Node -> Maybe Node -> Triples Source # | |
Generic (RDF TList) Source # | |
NFData (RDF TList) Source # | |
Defined in Data.RDF.Graph.TList | |
type Rep TList Source # | |
data RDF TList Source # | |
Defined in Data.RDF.Graph.TList | |
type Rep (RDF TList) Source # | |
Defined in Data.RDF.Graph.TList |