Structs§
- AndThen
- ByRef
- Implementation of
RDFNodeParse::by_ref
- Combine
Vec - FlatMap
- GetFocus
- Map
- Neighs
- Not
- Optional
- Or
- Parse
ByType - ParseRDF
List - Parse
Term - Parser
Nodes - Property
Value - Property
Value Debug - Property
Values - RDFList
- RDFParser
- Implements a concrete RDF parser
- Satisfy
- SetFocus
- Subjects
Property Value - Then
- ThenMut
- ThenRef
- With
Enums§
Traits§
- FocusRDF
- Represents RDF graphs that contain a focus node
- RDFNode
Parse - By implementing the
RDFNodeParse
trait a type says that it can be used to parse RDF data which have a focus node. RDF data with a focus node have to implement theFocusRDF
trait. - RDFParse
- The following code is an attempt to define parser combinators where the input is an RDF graph instead of a sequence of characters Some parts of this code are inspired by Combine
Functions§
- and_
then - apply
- Applies a function and returns its result
- apply_
rdf - Applies a function over the RDF graph and returns the result of that function
- bool
- Parses a node as a bool
- combine_
vec - Combines the results of parsers that return vectors of values
- cond
- Applies a function and returns its result
- equals
- fail_
msg - Fails with a given massage
- flat_
map - get_
focus - Creates a parser that returns the focus node
- has_
type - instance_
of - Returns the node that is an instance of the expected IRI in the RDF data It moves the focus to point to that node
- instances_
of - Returns all nodes that are instances of the expected IRI in the RDF data
- iri
- Checks if the focus node is an IRI
- is_iri
- Succeeds if current term is the expected IRI
- literal
- Checks if the focus node is an IRI
- map
- Applies a function
f
on the result of a parser - neighs
- Creates a parser that returns the value associated with the current focus node for
property
- not
- Not parser succeeds if the
parser
fails and viceversa Example: - ok
- Succeeds with a given value
- optional
- or
- Equivalent to [
parser1.or(parser2)
]. - parse_
by_ type - Apply a parser to an RDF node associated with the value of it’s
rdf:type
property - parse_
nodes - Applies a parser over a list of nodes and returns the list of values
- parse_
property_ value_ as_ list - Parses the value of
property
as an RDF list - parse_
rdf_ list - Parses a node as an RDF List applying each element of the list a parser
- parse_
rdf_ nil - parse_
rdf_ type - property_
bool - Created a parser that returns the boolean associated with the current focus node for
property
- property_
integer - Returns the integer value of
property
for the focus node - property_
integers - Returns the integer values of
property
for the focus node - property_
iri - Returns the IRI value of
property
for the focus node - property_
list - Parses the RDF list linked from the value of property
prop
at focus node - property_
string - Returns the string value of
property
for the focus node - property_
value - Creates a parser that returns the value associated with the current focus node for
property
- property_
value_ debug - Creates a parser that returns the value associated with the current focus node for
property
- property_
values - Returns the values of
property
for the focus node - property_
values_ int - Return the integer values of
property
for the focus node - property_
values_ iri - Return the IRI values of
property
for the focus node - property_
values_ non_ empty - Returns the values of
property
for the focus node - rdf_
list - Parses the current focus node as an RDF List
- satisfy
- Creates a parser that checks if the current node satisfies a predicate
- set_
focus - Creates a parser that sets the focus node and returns
()
- set_
focus_ subject - subjects_
with_ property_ value - Returns all nodes that are instances of the expected IRI in the RDF data
- term
- Creates a parser that returns the current focus node as a term
- term_
as_ iri - then
- Equivalent to
p.then(f)
. - then_
mut - Equivalent to
p.then_mut(f)
. - then_
ref - Equivalent to
p.then_ref(f)
. - with
- Equivalent to [
parser1.with(parser2)
]