RDF2ShEx

trait RDF2ShEx extends RDFParser
Companion
object
trait RDFParser
class Object
trait Matchable
class Any
object RDF2ShEx

Type members

Inherited types

type Err = Throwable
Inherited from
RDFParser
type R[A] = Kleisli[IO, Config, A]
Inherited from
RDFParser
type RDFParser[A] = EitherT[R, Err, A]

An RDFParser of values of type a takes a pointed node RDFNode and an RDFReader and tries to obtain a value of type a

An RDFParser of values of type a takes a pointed node RDFNode and an RDFReader and tries to obtain a value of type a

Inherited from
RDFParser

Value members

Concrete methods

def fromStream[A](s: Stream[IO, A]): RDFParser[List[A]]
def getSchema(rdf: RDFReader): RDFParser[Schema]

Inherited methods

def anyOf[A](ps: RDFParser[A]*): RDFParser[Seq[A]]

Applies a list of parsers If a parser fails, it continues with the rest of the list

Applies a list of parsers If a parser fails, it continues with the rest of the list

Returns

the list of successful values that can be parsed

Inherited from
RDFParser
def anyOfLs[A](ps: RDFParser[List[A]]*): RDFParser[Seq[A]]

Applies a list of parsers

Applies a list of parsers

Value Params
ps:

List of parsers. Each parser returns a list of values

Inherited from
RDFParser
def arc[A](pred: IRI, parser: RDFParser[A]): RDFParser[A]
Inherited from
RDFParser
def asLiteral: RDFParser[Literal]
Inherited from
RDFParser
def asLiterals(ls: List[RDFNode]): RDFParser[List[Literal]]
Inherited from
RDFParser
def boolean: RDFParser[Boolean]
Inherited from
RDFParser
def booleanFromPredicate(p: IRI): RDFParser[Boolean]
Inherited from
RDFParser
def booleanFromPredicateOptional(p: IRI): RDFParser[Option[Boolean]]
Inherited from
RDFParser
def checkBoolean(n: RDFNode): RDFParser[Boolean]
Inherited from
RDFParser
def checkCondition(cond: RDFNode => Boolean, name: String, n: RDFNode): RDFParser[RDFNode]
Inherited from
RDFParser
def checkDecimal(obj: RDFNode, p: IRI): RDFParser[DecimalLiteral]
Inherited from
RDFParser
def checkExpected(obtained: RDFNode, expected: RDFNode, n: RDFNode): RDFParser[Boolean]
Inherited from
RDFParser
def checkIRI(n: RDFNode): RDFParser[IRI]
Inherited from
RDFParser
def checkIRIFromPredicate(node: RDFNode, p: IRI): RDFParser[IRI]
Inherited from
RDFParser
def checkInteger(n: RDFNode): RDFParser[Int]
Inherited from
RDFParser
def checkLiteral(n: RDFNode): RDFParser[Literal]
Inherited from
RDFParser
def checkNil[A](n: RDFNode): RDFParser[List[A]]
Inherited from
RDFParser
def checkNodes[A](ns: Set[RDFNode], parser: RDFParser[A], n: RDFNode, pred: IRI): RDFParser[Option[A]]
Inherited from
RDFParser
def checkNodesIris(ns: Set[RDFNode]): RDFParser[List[IRI]]
Inherited from
RDFParser
def checkOptBooleanFromPredicate(v: Option[RDFNode], p: IRI): RDFParser[Option[Boolean]]
Inherited from
RDFParser
def checkString(n: RDFNode): RDFParser[String]
Inherited from
RDFParser
def checkString(obj: RDFNode, p: IRI): RDFParser[String]
Inherited from
RDFParser
def checkTriples(ts: Vector[RDFTriple], n: RDFNode, p: IRI): RDFParser[RDFNode]
Inherited from
RDFParser
def checkType(expected: RDFNode): RDFParser[Boolean]
Inherited from
RDFParser
def collect[A](ps: List[RDFParser[A]]): RDFParser[List[A]]
Inherited from
RDFParser
def combine[A](p1: RDFParser[Seq[A]], p2: RDFParser[Seq[A]]): RDFParser[Seq[A]]
Inherited from
RDFParser
def combineAll[A](ps: RDFParser[Seq[A]]*): RDFParser[Seq[A]]

Combine a sequence of RDFParsers

Combine a sequence of RDFParsers

Inherited from
RDFParser
def condition(cond: RDFNode => Boolean, name: String): RDFParser[RDFNode]
Inherited from
RDFParser
def decimalLiteralFromPredicate(p: IRI): RDFParser[DecimalLiteral]

Returns the Decimal literal associated with a predicate p

Returns the Decimal literal associated with a predicate p

Value Params
p

predicate

Returns

An RDFParser that returns the decimal literal associated with that predicate

Inherited from
RDFParser
def decimalLiteralFromPredicateOptional(p: IRI): RDFParser[Option[DecimalLiteral]]
Inherited from
RDFParser
def failIf(cond: Boolean, msg: String): RDFParser[Unit]
Inherited from
RDFParser
def firstOf[A](ps: RDFParser[A]*): RDFParser[A]

If a parser fails, it continues with the rest of the list

If a parser fails, it continues with the rest of the list

Returns

the result of the first parser that succeeds of failure

Inherited from
RDFParser
def fromEither[A](e: Either[Err, A]): RDFParser[A]
Inherited from
RDFParser
def fromEitherT[A](e: EitherT[IO, Err, A]): RDFParser[A]
Inherited from
RDFParser
def fromIO[A](x: IO[A]): RDFParser[A]
Inherited from
RDFParser
def fromRDFStream[A](r: Stream[IO, A]): RDFParser[Vector[A]]
Inherited from
RDFParser
def getIntegerFromValues(ts: Vector[RDFTriple], p: IRI, n: RDFNode): RDFParser[Int]
Inherited from
RDFParser
def getIntegerLiteral(t: RDFTriple): RDFParser[Int]
Inherited from
RDFParser
def getNode: RDFParser[RDFNode]
Inherited from
RDFParser
def getRDF: RDFParser[RDFReader]
Inherited from
RDFParser
def group[A](parser: RDFParser[A], nodes: Seq[RDFNode]): RDFParser[Seq[A]]

Applies a parser over a sequence of nodes

Applies a parser over a sequence of nodes

Value Params
nodes

sequence of nodes

parser

parser

Inherited from
RDFParser
def hasNoRDFType(t: IRI): RDFParser[Boolean]

Returns true if the current node does not have a given type

Returns true if the current node does not have a given type

Value Params
t

type to be checked

Inherited from
RDFParser
def hasRDFType(t: IRI): RDFParser[Boolean]

Returns true if the current node has a given type

Returns true if the current node has a given type

Value Params
t

type to be checked

Inherited from
RDFParser
def hasSomeRDFType(ts: Set[IRI]): RDFParser[Boolean]

Returns true if the current node has a type which belong to a given set of types

Returns true if the current node has a type which belong to a given set of types

Value Params
ts

set of types to be checked

Inherited from
RDFParser
def info(msg: String): RDFParser[Unit]
Inherited from
RDFParser
def integer: RDFParser[Int]
Inherited from
RDFParser
def integerLiteralForPredicate(p: IRI): RDFParser[Int]

Obtains an integer literal associated with a predicate in the current node

Obtains an integer literal associated with a predicate in the current node

Value Params
p

predicate

Inherited from
RDFParser
def integerLiteralsForPredicate(p: IRI): RDFParser[List[Int]]
Inherited from
RDFParser
def io2r[A](x: IO[A]): R[A]
Inherited from
RDFParser
def iri: RDFParser[IRI]
Inherited from
RDFParser
def iriFromPredicate(p: IRI): RDFParser[IRI]
Inherited from
RDFParser
def iriFromPredicateOptional(p: IRI): RDFParser[Option[IRI]]
Inherited from
RDFParser
def irisFromPredicate(p: IRI): RDFParser[List[IRI]]
Inherited from
RDFParser
def lift[A](r: R[A]): RDFParser[A]
Inherited from
RDFParser
def liftIO[A](io: IO[A]): RDFParser[A]
Inherited from
RDFParser
def list1Plus[A](p: RDFParser[A]): RDFParser[List[A]]

Parses a list of values. The list must contain at least one value

Parses a list of values. The list must contain at least one value

Inherited from
RDFParser
def list1PlusAux[A](p: RDFParser[A], visited: List[RDFNode]): RDFParser[List[A]]
Inherited from
RDFParser
def list2Plus[A](p: RDFParser[A]): RDFParser[List[A]]

Parses a list of values. The list must contain at least two values

Parses a list of values. The list must contain at least two values

Inherited from
RDFParser
def literalFromPredicate(p: IRI): RDFParser[Literal]
Inherited from
RDFParser
def literalsFromPredicate(p: IRI): RDFParser[List[Literal]]
Inherited from
RDFParser
def mapRDFParser[A, B](ls: List[A], p: A => RDFParser[B]): RDFParser[List[B]]
Inherited from
RDFParser
def nodes2iris(ns: List[RDFNode]): Either[String, List[IRI]]
Inherited from
RDFParser
def objectFromPredicate(p: IRI): RDFParser[RDFNode]

RDFParser that retrieves the object associated with current node for a given predicate

RDFParser that retrieves the object associated with current node for a given predicate

Fails if there are more than one object

Value Params
p

predicate

Inherited from
RDFParser
def objectFromPredicateOptional(p: IRI): RDFParser[Option[RDFNode]]
Inherited from
RDFParser
def objectsFromPredicate(p: IRI): RDFParser[Set[RDFNode]]

RDFParser that retrieves the set of iriObjects associated with the current node for a given predicate

RDFParser that retrieves the set of iriObjects associated with the current node for a given predicate

Value Params
p

predicate

Inherited from
RDFParser
def objectsFromTriples(triples: Set[RDFTriple]): Set[RDFNode]
Inherited from
RDFParser
def ok[A](x: A): RDFParser[A]
Inherited from
RDFParser
def oneOf[A](parsers: Seq[RDFParser[A]]): RDFParser[A]

Checks that exactly one of the parsers succeeds on the current node

Checks that exactly one of the parsers succeeds on the current node

Value Params
parsers

sequence of parsers

Inherited from
RDFParser
def opt[A](pred: IRI, parser: RDFParser[A]): RDFParser[Option[A]]
Inherited from
RDFParser
def optional[A](parser: RDFParser[A]): RDFParser[Option[A]]

An RDF parser that parses a value of type a if possible

An RDF parser that parses a value of type a if possible

Inherited from
RDFParser
def parse[A](parser: RDFParser[A], node: RDFNode, rdf: RDFReader): IO[Either[Err, A]]
Inherited from
RDFParser
def parseException[A](e: Throwable): RDFParser[A]
Inherited from
RDFParser
def parseFail[A](str: String): RDFParser[A]
Inherited from
RDFParser
def parseNodes[A](nodes: List[RDFNode], parser: RDFParser[A]): RDFParser[List[A]]
Inherited from
RDFParser
def parseOk[A](x: A): RDFParser[A]
Inherited from
RDFParser
def parsePredicate[A](p: IRI, maker: RDFNode => A): RDFParser[A]
Inherited from
RDFParser
def parsePredicateIRI[A](p: IRI, maker: IRI => A): RDFParser[A]
Inherited from
RDFParser
def parsePredicateIRIList[A](p: IRI, maker: IRI => A): RDFParser[List[A]]
Inherited from
RDFParser
def parsePredicateInt[A](p: IRI, maker: Int => A): RDFParser[A]
Inherited from
RDFParser
def parsePredicateIntList[A](p: IRI, maker: Int => A): RDFParser[List[A]]
Inherited from
RDFParser
def parsePredicateList[A](p: IRI, maker: RDFNode => A): RDFParser[List[A]]
Inherited from
RDFParser
def parsePredicateLiteral[A](p: IRI, maker: Literal => A): RDFParser[A]
Inherited from
RDFParser
def parsePredicateLiteralList[A](p: IRI, maker: Literal => A): RDFParser[List[A]]
Inherited from
RDFParser
def parsePredicateString[A](p: IRI, maker: String => A): RDFParser[A]
Inherited from
RDFParser
def parseRest[A](visited: List[RDFNode], restNode: RDFNode, parser: RDFParser[A]): RDFParser[List[A]]
Inherited from
RDFParser
def rdfList: RDFParser[List[RDFNode]]

A parser of the RDF List associated with the current node

A parser of the RDF List associated with the current node

Fails if there are more than one iriObjects associated with rdf_first or rdf_rest

Inherited from
RDFParser
def rdfListAux(visited: Vector[RDFNode]): RDFParser[List[RDFNode]]
Inherited from
RDFParser
def rdfListAuxRest(next: RDFNode, visited: Vector[RDFNode]): RDFParser[List[RDFNode]]
Inherited from
RDFParser
def rdfListForPredicate(p: IRI): RDFParser[List[RDFNode]]

Obtains the RDF list associated with a predicate for the current node

Obtains the RDF list associated with a predicate for the current node

Value Params
p

predicate

Inherited from
RDFParser
def rdfListForPredicateAllowingNone(p: IRI): RDFParser[List[RDFNode]]

Obtains the RDF list associated with a predicate for the current node If there is no value, returns the empty list

Obtains the RDF list associated with a predicate for the current node If there is no value, returns the empty list

Value Params
p

predicate

Inherited from
RDFParser
def rdfListForPredicateOptional(p: IRI): RDFParser[List[RDFNode]]
Inherited from
RDFParser
def rdfNil[A]: RDFParser[List[A]]
Inherited from
RDFParser
def rdfType: RDFParser[RDFNode]

Returns a parser that obtains the type associated with the current node

Returns a parser that obtains the type associated with the current node

Fails if there are more than one type associated

Inherited from
RDFParser
def rdfTypes: RDFParser[Set[RDFNode]]

Returns a parser that obtains the set of types associated with the current node

Returns a parser that obtains the set of types associated with the current node

Inherited from
RDFParser
def sequenceEither[E, A](xs: List[Either[E, A]]): Either[E, List[A]]
Inherited from
RDFParser
def someOf[A](ps: RDFParser[A]*): RDFParser[A]

Checks if some of the parsers pass and returns the corresponding value

Checks if some of the parsers pass and returns the corresponding value

Value Params
ps

sequence of parsers

Inherited from
RDFParser
def star[A](pred: IRI, parser: RDFParser[A]): RDFParser[List[A]]
Inherited from
RDFParser
def starWithNodes[A](pred: IRI, parser: RDFParser[A]): RDFParser[List[(RDFNode, A)]]
Inherited from
RDFParser
def stream2list[A](st: Stream[IO, A]): IO[Vector[A]]
Inherited from
RDFParser
def string: RDFParser[String]
Inherited from
RDFParser
def stringFromPredicate(p: IRI): RDFParser[String]

Returns the String associated with a predicate p

Returns the String associated with a predicate p

Value Params
p

predicate

Returns

An RDFParser that returns the String associated with that predicate

Inherited from
RDFParser
def stringFromPredicateOptional(p: IRI): RDFParser[Option[String]]
Inherited from
RDFParser
def subjectsFromTriples(triples: Set[RDFTriple]): Set[RDFNode]
Inherited from
RDFParser
def withNode[A](n: RDFNode, parser: RDFParser[A]): RDFParser[A]
Inherited from
RDFParser
def withRdf[A](rdf: RDFReader, parser: RDFParser[A]): RDFParser[A]
Inherited from
RDFParser

Concrete fields

val initialNode: BNode