Trait

es.weso.rdf.parser

RDFParser

Related Doc: package parser

Permalink

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
AnyRef, Any
Type Hierarchy
RDFParserAnyRef
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 RDFParser[a] = (RDFNode, RDFReader) ⇒ Try[a]

    Permalink

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

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def getIntegerLiteral(t: RDFTriple): Try[Integer]

    Permalink
  11. def group[A](parser: RDFParser[A], nodes: Seq[RDFNode]): RDFParser[Seq[A]]

    Permalink

    Applies a parser over a sequence of nodes

    Applies a parser over a sequence of nodes

    parser

    parser

    nodes

    sequence of nodes

  12. def hasNoRDFType(t: IRI): RDFParser[Boolean]

    Permalink

    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

  13. def hasPredicateWithSubject(n: RDFNode, p: IRI, rdf: RDFReader): Boolean

    Permalink
  14. def hasRDFType(t: IRI): RDFParser[Boolean]

    Permalink

    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

  15. def hasSomeRDFType(ts: Set[IRI]): RDFParser[Boolean]

    Permalink

    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

  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. def integerLiteralForPredicate(p: IRI): RDFParser[Integer]

    Permalink

    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

  18. def iriFromPredicate(p: IRI): RDFParser[IRI]

    Permalink
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. def objectFromPredicate(p: IRI): RDFParser[RDFNode]

    Permalink

    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

  24. def objectFromPredicateOptional(p: IRI): RDFParser[Option[RDFNode]]

    Permalink
  25. def objectsFromPredicate(p: IRI): RDFParser[Set[RDFNode]]

    Permalink

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

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

    p

    predicate

  26. def objectsFromTriples(triples: Set[RDFTriple]): Set[RDFNode]

    Permalink
  27. def oneOf[A](parsers: Seq[RDFParser[A]]): RDFParser[A]

    Permalink

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

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

    parsers

    sequence of parsers

  28. def optional[A](parser: RDFParser[A]): RDFParser[Option[A]]

    Permalink

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

  29. def rdfList: RDFParser[List[RDFNode]]

    Permalink

    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 objects associated with rdf_first or rdf_rest

  30. def rdfListForPredicate(p: IRI): RDFParser[List[RDFNode]]

    Permalink

    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

  31. def rdfType: RDFParser[RDFNode]

    Permalink

    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

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

    Permalink

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

  33. def someOf[A](ps: Seq[RDFParser[A]]): RDFParser[A]

    Permalink

    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

  34. def stringFromPredicate(p: IRI): RDFParser[String]

    Permalink

    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 associate with that predicate

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

    Permalink

  36. def subjectsFromTriples(triples: Set[RDFTriple]): Set[RDFNode]

    Permalink
  37. def subjectsWithProperty(pred: IRI, rdf: RDFReader): Set[RDFNode]

    Permalink
  38. def subjectsWithType(t: RDFNode, rdf: RDFReader): Set[RDFNode]

    Permalink
  39. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  40. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  41. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped