Packages

t

es.weso.rdf.parser

RDFParser

trait RDFParser extends AnyRef

Obtains data from an RDFReader

The approach is similar to parser combinators but instead of sequence of characters, we have RDF graphs available through an RDFReader

Source
RDFParser.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RDFParser
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Err = Throwable
  2. type R[A] = Kleisli[IO, Config, A]
  3. 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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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

  5. def anyOfLs[A](ps: RDFParser[List[A]]*): RDFParser[Seq[A]]

    Applies a list of parsers

  6. def arc[A](pred: IRI, parser: RDFParser[A]): RDFParser[A]
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def asLiteral: RDFParser[Literal]
  9. def asLiterals(ls: List[RDFNode]): RDFParser[List[Literal]]
  10. def boolean: RDFParser[Boolean]
  11. def booleanFromPredicate(p: IRI): RDFParser[Boolean]
  12. def booleanFromPredicateOptional(p: IRI): RDFParser[Option[Boolean]]
  13. def checkType(expected: RDFNode): RDFParser[Boolean]
  14. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  15. def collect[A](ps: List[RDFParser[A]]): RDFParser[List[A]]
  16. def combine[A](p1: RDFParser[Seq[A]], p2: RDFParser[Seq[A]]): RDFParser[Seq[A]]
  17. def combineAll[A](ps: RDFParser[Seq[A]]*): RDFParser[Seq[A]]

    Combine a sequence of RDFParsers

  18. def condition(cond: (RDFNode) ⇒ Boolean, name: String): RDFParser[RDFNode]
  19. def decimalLiteralFromPredicate(p: IRI): RDFParser[DecimalLiteral]

    Returns the Decimal literal associated with a predicate p

    Returns the Decimal literal associated with a predicate p

    p

    predicate

    returns

    An RDFParser that returns the decimal literal associated with that predicate

  20. def decimalLiteralFromPredicateOptional(p: IRI): RDFParser[Option[DecimalLiteral]]
  21. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  23. def failIf(cond: Boolean, msg: String): RDFParser[Unit]
  24. 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

  25. def fromEither[A](e: Either[Err, A]): RDFParser[A]
  26. def fromEitherT[A](e: EitherT[IO, Err, A]): RDFParser[A]
  27. def fromIO[A](x: IO[A]): RDFParser[A]
  28. def fromRDFStream[A](r: Stream[IO, A]): RDFParser[Vector[A]]
  29. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. def getIntegerLiteral(t: RDFTriple): RDFParser[Int]
  31. def getNode: RDFParser[RDFNode]
  32. def getRDF: RDFParser[RDFReader]
  33. 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

    parser

    parser

    nodes

    sequence of nodes

  34. 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

    t

    type to be checked

  35. 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

    t

    type to be checked

  36. 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

    ts

    set of types to be checked

  37. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  38. def info(msg: String): RDFParser[Unit]
  39. def integer: RDFParser[Int]
  40. 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

    p

    predicate

  41. def integerLiteralsForPredicate(p: IRI): RDFParser[List[Int]]
  42. def io2r[A](x: IO[A]): R[A]
  43. def iri: RDFParser[IRI]
  44. def iriFromPredicate(p: IRI): RDFParser[IRI]
  45. def iriFromPredicateOptional(p: IRI): RDFParser[Option[IRI]]
  46. def irisFromPredicate(p: IRI): RDFParser[List[IRI]]
  47. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  48. def lift[A](r: R[A]): RDFParser[A]
  49. def liftIO[A](io: IO[A]): RDFParser[A]
  50. def list1Plus[A](p: RDFParser[A]): RDFParser[List[A]]

    Parses a list of values.

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

  51. def list1PlusAux[A](p: RDFParser[A], visited: List[RDFNode]): RDFParser[List[A]]
  52. def list2Plus[A](p: RDFParser[A]): RDFParser[List[A]]

    Parses a list of values.

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

  53. def literalFromPredicate(p: IRI): RDFParser[Literal]
  54. def literalsFromPredicate(p: IRI): RDFParser[List[Literal]]
  55. def mapRDFParser[A, B](ls: List[A], p: (A) ⇒ RDFParser[B]): RDFParser[List[B]]
  56. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  57. def nodes2iris(ns: List[RDFNode]): Either[String, List[IRI]]
  58. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  59. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  60. 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

    p

    predicate

  61. def objectFromPredicateOptional(p: IRI): RDFParser[Option[RDFNode]]
  62. 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

    p

    predicate

  63. def objectsFromTriples(triples: Set[RDFTriple]): Set[RDFNode]
  64. def ok[A](x: A): RDFParser[A]
  65. 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

    parsers

    sequence of parsers

  66. def opt[A](pred: IRI, parser: RDFParser[A]): RDFParser[Option[A]]
  67. def optional[A](parser: RDFParser[A]): RDFParser[Option[A]]

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

  68. def parse[A](parser: RDFParser[A], node: RDFNode, rdf: RDFReader): IO[Either[Err, A]]
  69. def parseException[A](e: Throwable): RDFParser[A]
  70. def parseFail[A](str: String): RDFParser[A]
  71. def parseNodes[A](nodes: List[RDFNode], parser: RDFParser[A]): RDFParser[List[A]]
  72. def parseOk[A](x: A): RDFParser[A]
  73. def parsePredicate[A](p: IRI, maker: (RDFNode) ⇒ A): RDFParser[A]
  74. def parsePredicateIRI[A](p: IRI, maker: (IRI) ⇒ A): RDFParser[A]
  75. def parsePredicateIRIList[A](p: IRI, maker: (IRI) ⇒ A): RDFParser[List[A]]
  76. def parsePredicateInt[A](p: IRI, maker: (Int) ⇒ A): RDFParser[A]
  77. def parsePredicateIntList[A](p: IRI, maker: (Int) ⇒ A): RDFParser[List[A]]
  78. def parsePredicateList[A](p: IRI, maker: (RDFNode) ⇒ A): RDFParser[List[A]]
  79. def parsePredicateLiteral[A](p: IRI, maker: (Literal) ⇒ A): RDFParser[A]
  80. def parsePredicateLiteralList[A](p: IRI, maker: (Literal) ⇒ A): RDFParser[List[A]]
  81. def parsePredicateString[A](p: IRI, maker: (String) ⇒ A): RDFParser[A]
  82. def parseRest[A](visited: List[RDFNode], restNode: RDFNode, parser: RDFParser[A]): RDFParser[List[A]]
  83. 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

  84. def rdfListAux(visited: Vector[RDFNode]): RDFParser[List[RDFNode]]
  85. 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

    p

    predicate

  86. 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

    p

    predicate

  87. def rdfListForPredicateOptional(p: IRI): RDFParser[List[RDFNode]]
  88. def rdfNil[A]: RDFParser[List[A]]
  89. 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

  90. def rdfTypes: RDFParser[Set[RDFNode]]

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

  91. def sequenceEither[E, A](xs: List[Either[E, A]]): Either[E, List[A]]
  92. 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

    ps

    sequence of parsers

  93. def star[A](pred: IRI, parser: RDFParser[A]): RDFParser[List[A]]
  94. def starWithNodes[A](pred: IRI, parser: RDFParser[A]): RDFParser[List[(RDFNode, A)]]
  95. def stream2list[A](st: Stream[IO, A]): IO[Vector[A]]
  96. def string: RDFParser[String]
  97. def stringFromPredicate(p: IRI): RDFParser[String]

    Returns the String associated with a predicate p

    Returns the String associated with a predicate p

    p

    predicate

    returns

    An RDFParser that returns the String associated with that predicate

  98. def stringFromPredicateOptional(p: IRI): RDFParser[Option[String]]

  99. def subjectsFromTriples(triples: Set[RDFTriple]): Set[RDFNode]
  100. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  101. def toString(): String
    Definition Classes
    AnyRef → Any
  102. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  103. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  104. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  105. def withNode[A](n: RDFNode, parser: RDFParser[A]): RDFParser[A]
  106. def withRdf[A](rdf: RDFReader, parser: RDFParser[A]): RDFParser[A]

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped