RDFReader

trait RDFReader

RDFReader can read RDF data from several sources like an in-memory model or a SPARQL endpoint

class Object
trait Matchable
class Any

Type members

Types

type RDFRead[A] = IO[A]
type RDFStream[A] = Stream[IO, A]
type Rdf <: RDFReader
type S[A] = Stream[IO, A]

Value members

Abstract methods

Returns:

List of available formats that this RDFReader supports

Returns:

List of formats in which this RDFReader can be serialized

def checkDatatype(node: RDFNode, datatype: IRI): IO[Boolean]

Checks if a node has a given datatype

Checks if a node has a given datatype

Value parameters:
datatype

Datatype IRI to check

node

RDF node to check

Returns:

In case of a bad formed literal, a Left with a message, otherwise the check

Prefix map

Prefix map

return the SHACL instances of a node cls A node node is a shacl instance of cls if node rdf:type/rdfs:subClassOf* cls

return the SHACL instances of a node cls A node node is a shacl instance of cls if node rdf:type/rdfs:subClassOf* cls

true if node rdf:type/rdfs:subClassOf* cls

true if node rdf:type/rdfs:subClassOf* cls

Value parameters:
other

RDF reader

Returns:

true if this RDF graph is isomorphic with other

Set of RDFTriples that relate two nodes by a SHACL path

Set of RDFTriples that relate two nodes by a SHACL path

Value parameters:
p

path

return the values associated with a node by a path The path is defined as in SHACL paths which are a simplified version of SPARQL paths

return the values associated with a node by a path The path is defined as in SHACL paths which are a simplified version of SPARQL paths

Run a SPARQL query which returns a JSON representation of the result

Run a SPARQL query which returns a JSON representation of the result

Value parameters:
str

string representing the SPARQL query

Returns:

JSON representation of the result

Run a SPARQL select query which returns a result map

Run a SPARQL select query which returns a result map

Value parameters:
queryStr

string representing the SPARQL query

Returns:

Either a List of mappings or an error message

Set of RDFTriples in a graph

Set of RDFTriples in a graph

def serialize(format: String, base: Option[IRI]): IO[String]

convert a RDF graph to a String

convert a RDF graph to a String

Returns:

Source IRI of this RDF graph if exists

Set of RDFTriples that relate a node with some object by a path

Set of RDFTriples that relate a node with some object by a path

Value parameters:
o

object

p

path

Set of RDFTriples that contain a node as object

Set of RDFTriples that contain a node as object

Value parameters:
n

node

Set of RDFTriples that relate two nodes by a predicate

Set of RDFTriples that relate two nodes by a predicate

Value parameters:
p

predicate

Set of RDFTriples that contain a node as predicate with some object

Set of RDFTriples that contain a node as predicate with some object

Value parameters:
o

object

p

predicate

Set of RDFTriples that contain a node as subject

Set of RDFTriples that contain a node as subject

Value parameters:
n

node

Returns:

A set of triples or a String with an error message

Concrete methods

Returns the set of iriObjects that are IRIs in a graph

Returns the set of iriObjects that are IRIs in a graph

The set of all iri's available

The set of all iri's available

def mkStream[A, B](vs: List[A], f: A => Stream[IO, B]): Stream[IO, B]

Returns the set of predicates

Returns the set of predicates

Returns the set of subjects that are IRIs in a graph

Returns the set of subjects that are IRIs in a graph

Set of RDFTriples that contain a node as object with some of the predicates in a list

Set of RDFTriples that contain a node as object with some of the predicates in a list

Value parameters:
o

object

ps

list of predicates

Set of RDFTriples that contain a node as subject and a given Predicate

Set of RDFTriples that contain a node as subject and a given Predicate

Set of RDFTriples that contain a node as subject with some of the predicates in a list

Set of RDFTriples that contain a node as subject with some of the predicates in a list

Value parameters:
n

node

ps

list of predicates

def triplesWithType(expectedType: IRI): RDFStream[RDFTriple]

Abstract fields

val id: String