RDF.ex v0.5.4 RDF.Literal.Guards View Source
Guards for working with RDF.Literal
s.
These are useful for pattern matching on datatypes of literals, since
Elixir doesn’t allow function calls in pattern matching clauses, which means
the qualified terms of a RDF.Vocabulary.Namespace
can’t be used.
Examples
defmodule M do
import RDF.Literal.Guards
def f(%RDF.Literal{datatype: datatype} = literal) when is_xsd_integer(datatype) do
# ...
end
end
Link to this section Summary
Guards
Returns true
if the given datatype is rdf:langString
; otherwise returns false
Returns true
if the given datatype is xsd:anyURI
; otherwise returns false
Returns true
if the given datatype is xsd:boolean
; otherwise returns false
Returns true
if the given datatype is xsd:date
; otherwise returns false
Returns true
if the given datatype is xsd:dateTime
; otherwise returns false
Returns true
if the given datatype is xsd:decimal
; otherwise returns false
Returns true
if the given datatype is xsd:double
; otherwise returns false
Returns true
if the given datatype is xsd:float
; otherwise returns false
Returns true
if the given datatype is xsd:integer
; otherwise returns false
Returns true
if the given datatype is xsd:string
; otherwise returns false
Returns true
if the given datatype is xsd:time
; otherwise returns false
Link to this section Guards
Returns true
if the given datatype is rdf:langString
; otherwise returns false
.
Returns true
if the given datatype is xsd:anyURI
; otherwise returns false
.
Returns true
if the given datatype is xsd:boolean
; otherwise returns false
.
Returns true
if the given datatype is xsd:date
; otherwise returns false
.
Returns true
if the given datatype is xsd:dateTime
; otherwise returns false
.
Returns true
if the given datatype is xsd:decimal
; otherwise returns false
.
Returns true
if the given datatype is xsd:double
; otherwise returns false
.
Returns true
if the given datatype is xsd:float
; otherwise returns false
.
Returns true
if the given datatype is xsd:integer
; otherwise returns false
.
Returns true
if the given datatype is xsd:string
; otherwise returns false
.
Returns true
if the given datatype is xsd:time
; otherwise returns false
.