Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- equalSubjects :: Triple -> Triple -> Bool
- equalPredicates :: Triple -> Triple -> Bool
- equalObjects :: Triple -> Triple -> Bool
- subjectOf :: Triple -> Node
- predicateOf :: Triple -> Node
- objectOf :: Triple -> Node
- isEmpty :: Rdf a => RDF a -> Bool
- rdfContainsNode :: Rdf a => RDF a -> Node -> Bool
- tripleContainsNode :: Node -> Triple -> Bool
- subjectsWithPredicate :: Rdf a => RDF a -> Predicate -> [Subject]
- objectsOfPredicate :: Rdf a => RDF a -> Predicate -> [Object]
- uordered :: Triples -> Triples
- isIsomorphic :: (Rdf a, Rdf b) => RDF a -> RDF b -> Bool
- expandTriples :: Rdf a => RDF a -> Triples
- fromEither :: Either ParseFailure (RDF a) -> RDF a
- expandTriple :: PrefixMappings -> Triple -> Triple
- expandNode :: PrefixMappings -> Node -> Node
- expandURI :: PrefixMappings -> Text -> Text
- absolutizeTriple :: Maybe BaseUrl -> Triple -> Triple
- absolutizeNode :: Maybe BaseUrl -> Node -> Either String Node
- absolutizeNodeUnsafe :: Maybe BaseUrl -> Node -> Node
- data QueryException = IRIResolutionException String
Query functions
equalSubjects :: Triple -> Triple -> Bool Source #
Determine whether two triples have equal subjects. Note that it doesn't perform namespace expansion!
equalPredicates :: Triple -> Triple -> Bool Source #
Determine whether two triples have equal predicates. Note that it doesn't perform namespace expansion!
equalObjects :: Triple -> Triple -> Bool Source #
Determine whether two triples have equal objects. Note that it doesn't perform namespace expansion!
predicateOf :: Triple -> Node Source #
Answer the predicate node of the triple.
tripleContainsNode :: Node -> Triple -> Bool Source #
Answer if triple contains node. Note that it doesn't perform namespace expansion!
subjectsWithPredicate :: Rdf a => RDF a -> Predicate -> [Subject] Source #
Lists of all subjects of triples with the given predicate.
objectsOfPredicate :: Rdf a => RDF a -> Predicate -> [Object] Source #
Lists of all objects of triples with the given predicate.
uordered :: Triples -> Triples Source #
Convert a list of triples into a sorted list of unique triples.
RDF graph functions
isIsomorphic :: (Rdf a, Rdf b) => RDF a -> RDF b -> Bool Source #
This determines if two RDF representations are equal regardless
of blank node names, triple order and prefixes. In math terms,
this is the simeq latex operator, or ~= . Unsafe because it
assumes IRI resolution will succeed, may throw an
IRIResolutionException
exception.
expandTriples :: Rdf a => RDF a -> Triples Source #
Expand the triples in a graph with the prefix map and base URL
for that graph. Unsafe because it assumes IRI resolution will
succeed, may throw an IRIResolutionException
exception.
fromEither :: Either ParseFailure (RDF a) -> RDF a Source #
Convert a parse result into an RDF if it was successful and error and terminate if not.
expansion functions
expandTriple :: PrefixMappings -> Triple -> Triple Source #
Expand the triple with the prefix map.
expandNode :: PrefixMappings -> Node -> Node Source #
Expand the node with the prefix map. Only UNodes are expanded, other kinds of nodes are returned as-is.
expandURI :: PrefixMappings -> Text -> Text Source #
Expand the URI with the prefix map. Also expands "a" to "http://www.w3.org/1999/02/22-rdf-syntax-ns#type".
absolutizing functions
absolutizeTriple :: Maybe BaseUrl -> Triple -> Triple Source #
Prefixes relative URIs in the triple with BaseUrl. Unsafe because
it assumes IRI resolution will succeed, may throw an
IRIResolutionException
exception.
absolutizeNode :: Maybe BaseUrl -> Node -> Either String Node Source #
Prepends BaseUrl to UNodes with relative URIs.
absolutizeNodeUnsafe :: Maybe BaseUrl -> Node -> Node Source #
Prepends BaseUrl to UNodes with relative URIs. Unsafe because it
assumes IRI resolution will succeed, may throw an
IRIResolutionException
exception.
data QueryException Source #
Instances
Show QueryException Source # | |
Defined in Data.RDF.Query showsPrec :: Int -> QueryException -> ShowS # show :: QueryException -> String # showList :: [QueryException] -> ShowS # | |
Exception QueryException Source # | |
Defined in Data.RDF.Query |