Validator21

case class Validator21(schema: ResolvedSchema, externalResolver: ExternalResolver, builder: RDFBuilder) extends Validator with ShExChecker with ShowValidator

ShEx validator for ShEx 2.1 (no extends, abstract)

trait Serializable
trait Product
trait Equals
class Validator
class Object
trait Matchable
class Any

Type members

Inherited types

type Check[A] = EitherT[Base, Err, A]
Inherited from:
ShExChecker
Inherited from:
ShExChecker
type Env = Context
Inherited from:
ShExChecker
type Err = ShExError
Inherited from:
ShExChecker
Inherited from:
ShExChecker
Inherited from:
ShExChecker

Value members

Concrete methods

def checkPartitionNeighs(attempt: Attempt, node: RDFNode, s: Shape, neighsShape: Neighs, extended: List[(ShapeExpr, Neighs)], visited: Visited): CheckTyping

Execute the validator with a given checker param chk Checker param rdf RDFReader verbose boolean flag to show internal messages

Execute the validator with a given checker param chk Checker param rdf RDFReader verbose boolean flag to show internal messages

Validate a node following target declarations. This methods follows SHACL convention and could be deprecated in the future

Validate a node following target declarations. This methods follows SHACL convention and could be deprecated in the future

def validateNodeShape(rdf: RDFReader, node: IRI, shape: String, verbose: VerboseLevel): IO[Result]

Validate a node against a shape

Validate a node against a shape

def validateNodeStart(rdf: RDFReader, node: IRI, verbose: VerboseLevel): IO[Result]

Validate a node against the START declaration

Validate a node against the START declaration

Validate a node against a shape map

Validate a node against a shape map

Inherited methods

Inherited from:
ShExChecker
def addEvidence(nodeShape: NodeShape, msg: String): Check[ShapeTyping]
Inherited from:
ShExChecker
def addLog(log: Log): Check[Unit]
Inherited from:
ShExChecker
Inherited from:
ShExChecker
def attempt[A](c: Check[A]): Check[Either[Err, A]]
Inherited from:
ShExChecker
def bind[A, Other](c1: Check[Other], c2: Check[A]): Check[A]
Inherited from:
ShExChecker
def checkAll[A](xs: List[Check[A]]): Check[List[A]]

Checks all elements in a list If any of the elements fails, it fails

Checks all elements in a list If any of the elements fails, it fails

Inherited from:
ShExChecker
def checkAllFailFAtFirstFlag[A, B : Monoid, F[_] : Monad](ls: => LazyList[A], check: A => F[(B, Boolean)], last: => B): F[(B, Boolean)]
Inherited from:
ShExChecker
def checkAllFlag[A, B : Monoid, F[_] : Monad](ls: => LazyList[A], check: A => F[(B, Boolean)], last: => B): F[(B, Boolean)]
Inherited from:
ShExChecker
def checkCond(condition: Boolean, attempt: Attempt, error: ShExError, evidence: String): CheckTyping
Inherited from:
ShExChecker
def checkList[A, B](ls: List[A], check: A => Check[B]): Check[List[B]]
Inherited from:
ShExChecker
def checkLs[A](cs: List[Check[A]]): Check[List[A]]

Given a list of checks, return the list of values that pass It never fails (in case of failure, it ignores the value)

Given a list of checks, return the list of values that pass It never fails (in case of failure, it ignores the value)

Inherited from:
ShExChecker
def checkOneOf[A](cs: List[Check[A]], errNone: Err, errMoreThanOne: List[A] => Err): Check[A]
Inherited from:
ShExChecker
def checkPair1st[A, B](p: (Check[A], B)): Check[(A, B)]
Inherited from:
ShExChecker
def checkPair2nd[A, B](p: (A, Check[B])): Check[(A, B)]
Inherited from:
ShExChecker
def checkSequenceFlag[A : Monoid, F[_] : Monad](ls: => List[F[(A, Boolean)]], last: A): F[(A, Boolean)]
Inherited from:
ShExChecker
def checkSome[A](cs: LazyList[Check[A]])(implicit ev: Monoid[Err]): Check[A]
Inherited from:
ShExChecker
def checkSome[A](cs: List[Check[A]], errorIfNone: Err): Check[A]
Inherited from:
ShExChecker
def checkSomeFlag[A, B, F[_] : Monad](ls: => LazyList[A], check: A => F[(B, Boolean)], last: F[(B, Boolean)]): F[(B, Boolean)]

Given a computation check that returns a pair of value and a flag, returns the first value whose flag is true If none is true, returns the value of the computation parameter last

Given a computation check that returns a pair of value and a flag, returns the first value whose flag is true If none is true, returns the value of the computation parameter last

Inherited from:
ShExChecker
def checkSomeFlagCount[A, B : Monoid](ls: => LazyList[A], check: A => Check[(B, Boolean)], last: B): Check[(B, Int)]
Inherited from:
ShExChecker
def checkSomeFlagValue[A, B](ls: => LazyList[A], check: A => Check[B], last: Check[B]): Check[(B, Option[A])]

Checks some values. Returns the first that passes or None

Checks some values. Returns the first that passes or None

Inherited from:
ShExChecker
def checkSomeLazyList[A](cs: LazyList[Check[A]], errIfNone: => Err): Check[A]
Inherited from:
ShExChecker
def cond[A, B](check: Check[A], thenPart: A => Check[B], elsePart: Err => Check[B]): Check[B]

Attempts to execute a check If it fails, applies thenPart to the result, otherwise applies elsePart to the error

Attempts to execute a check If it fails, applies thenPart to the result, otherwise applies elsePart to the error

Type parameters:
A

type returned by the computation

B

type returned the the condition

Value parameters:
check

Computation to check

elsePart

part to be executed when the check fails

thenPart

part to be executed when it passes

Inherited from:
ShExChecker
def condFlag[A, B](check: Check[A], thenPart: A => Check[B], elsePart: Err => Check[B]): Check[(B, Boolean)]
Inherited from:
ShExChecker
def debug(msg: String): Check[Unit]
Inherited from:
ShExChecker
def err[A](e: Err): Check[A]
Inherited from:
ShExChecker
def errStr[A](msg: String): Check[A]
Inherited from:
ShExChecker
def filterSuccess[A, B](ls: List[A], check: A => Check[B]): Check[List[(A, B)]]

Returns the list of values whose computation is successful

Returns the list of values whose computation is successful

Type parameters:
A

type of values

B

type returned by computation

Value parameters:
check

computation to check for each value

ls

list of values

Returns:

a computation with a list of pairs for whom the computation was successful

Inherited from:
ShExChecker
def fromBase[A](b: Base[A]): Check[A]
Inherited from:
ShExChecker
def fromEither[A](e: Either[Err, A]): Check[A]
Inherited from:
ShExChecker
def fromEitherIO[A](e: EitherT[IO, Err, A]): Check[A]
Inherited from:
ShExChecker
def fromEitherIOS[A](e: EitherT[IO, String, A]): Check[A]
Inherited from:
ShExChecker
def fromEitherString[A](e: Either[String, A]): Check[A]
Inherited from:
ShExChecker
def fromIO[A](io: IO[A]): Check[A]
Inherited from:
ShExChecker
def fromIOUnsafe[A](io: IO[A]): Check[A]
Inherited from:
ShExChecker
def fromStream[A](s: Stream[IO, A]): Check[List[A]]
Inherited from:
ShExChecker
Inherited from:
ShExChecker
Inherited from:
ShExChecker
def getNeighPaths(node: RDFNode, paths: Set[Path], ext: Option[Neighs]): Check[Neighs]
Inherited from:
ShExChecker
Inherited from:
ShExChecker
def getNotAllowedPredicates(node: RDFNode, paths: List[Path], neighs: Neighs): Check[Set[IRI]]
Inherited from:
ShExChecker
Inherited from:
ShExChecker
Inherited from:
ShExChecker
def getValuesPath(node: RDFNode, path: Path, ext: Option[Neighs]): Check[Set[RDFNode]]
Inherited from:
ShExChecker
Inherited from:
ShExChecker
Inherited from:
ShExChecker
def info(msg: String): Check[Unit]
Inherited from:
ShExChecker
def infoTyping(t: ShapeTyping, msg: String, shapesPrefixMap: PrefixMap): Check[Unit]
Inherited from:
ShExChecker
def local[A](f: Env => Env)(comp: Check[A]): Check[A]
Inherited from:
ShExChecker
def mkErr[F[_] : Applicative](e: Err): F[Err]
Inherited from:
ShExChecker
Inherited from:
ShExChecker
def mkSeq[A, B](vs: List[A], f: A => IO[List[B]]): IO[List[B]]
Inherited from:
ShExChecker
def ok[A](x: A): Check[A]
Inherited from:
ShExChecker
def optCheck[A, B](c: Option[A], check: A => Check[B], default: => Check[B]): Check[B]

If c is some value, applies check, otherwise applies default

If c is some value, applies check, otherwise applies default

Value parameters:
c

Optional value

check

check function

default

value in case there is no option

Inherited from:
ShExChecker
def orElse[A](c1: Check[A], c2: => Check[A]): Check[A]
Inherited from:
ShExChecker
Inherited from:
ShExChecker
Inherited from:
ShExChecker
Inherited from:
Product
def run[A](c: Check[A])(config: Config)(env: Env): IO[(Log, Either[Err, A])]
Inherited from:
ShExChecker
def runCheck[A : Show](c: Check[A], rdf: RDFReader, verbose: VerboseLevel): IO[CheckResult[ShExError, A, Log]]
Inherited from:
ShExChecker
def runLocal[A](c: Check[A], f: Env => Env): Check[A]
Inherited from:
ShExChecker
def runLocalSafe[A](c: Check[A], f: Env => Env, safe: (Err, Env) => A): Check[A]

Run a computation in a local environment. If the computation fails, return the result of calling safe function over the current environment

Run a computation in a local environment. If the computation fails, return the result of calling safe function over the current environment

Value parameters:
c

computation to run

f

environment

safe

function to call if the computation fails

Inherited from:
ShExChecker
def runLocalSafeTyping[A](c: Check[A], f: ShapeTyping => ShapeTyping, safe: (Err, ShapeTyping) => A): Check[A]
Inherited from:
ShExChecker
Inherited from:
ShExChecker
def sequence[A](xs: List[Check[A]]): Check[List[A]]
Inherited from:
ShExChecker
def sh(lbls: Set[ShapeLabel]): String
Inherited from:
ShowValidator
def showCurrentTyping(msg: String, shapesPrefixMap: PrefixMap): Check[Unit]
Inherited from:
ShExChecker
Inherited from:
ShowValidator
def step(msg: String): Check[Unit]
Inherited from:
ShExChecker
def validateCheck(condition: Boolean, e: Err): Check[Unit]
Inherited from:
ShExChecker

Inherited fields

Inherited from:
ShExChecker
Inherited from:
ShExChecker

Implicits

Inherited implicits

implicit lazy val showAttempt: Show[Attempt]
Inherited from:
ShowValidator
implicit lazy val showIRI: Show[IRI]
Inherited from:
ShowValidator
implicit lazy val showPath: Show[Path]
Inherited from:
ShowValidator
implicit lazy val showRDFNode: Show[RDFNode]
Inherited from:
ShowValidator
implicit lazy val showRDFTriple: Show[RDFTriple]
Inherited from:
ShowValidator
implicit lazy val showShapeLabel: Show[ShapeLabel]
Inherited from:
ShowValidator