swish-0.10.7.0: A semantic web toolkit.
Copyright(c) 2003 Graham Klyne 2009 Vasili I Galchin 2011 2012 2018 Douglas Burke
LicenseGPL V2
MaintainerDouglas Burke
Stabilityexperimental
PortabilityH98
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swish.RDF.Datatype

Description

This module defines the structures used by Swish to represent and manipulate RDF datatypes.

Synopsis

Documentation

type RDFDatatype = Datatype RDFGraph RDFLabel RDFLabel Source #

RDF datatype wrapper used with RDF graph values

type RDFDatatypeVal vt = DatatypeVal RDFGraph vt RDFLabel RDFLabel Source #

RDF datatype value used with RDF graph values

type RDFDatatypeMod vt = DatatypeMod vt RDFLabel RDFLabel Source #

RDF datatype modifier used with RDF graph values

type RDFModifierFn = ModifierFn RDFLabel Source #

RDF value modifier function type

This indicates a modifier function that operates on RDFLabel values.

type RDFApplyModifier = ApplyModifier RDFLabel RDFLabel Source #

RDF value modifier application function type

This indicates a function that applies RDFModifierFn functions.

makeRdfDtOpenVarBindingModify Source #

Arguments

:: RDFDatatypeVal vt

is an RDFDatatype value containing details of the datatype for which a variable binding modifier is created.

-> RDFDatatypeMod vt

is the data value modifier value that defines the calculations that are used to implement a variable binding modifier.

-> RDFOpenVarBindingModify 

Create an RDFOpenVarBindingModify value.

The key purpose of this function is to lift the supplied variable constraint functions from operating on data values directly to a corresponding list of functions that operate on values contained in RDF graph labels (i.e. RDF literal nodes). It also applies node type checking, such that if the actual RDF nodes supplied do not contain appropriate values then the variable binding is not accepted.

makeRdfDtOpenVarBindingModifiers Source #

Arguments

:: RDFDatatypeVal vt

is an RDFDatatype value containing details of the datatype for which variable binding modifiers are created.

-> [RDFOpenVarBindingModify] 

Create all RDFOpenVarBindingModify values for a given datatype value. See makeRdfDtOpenVarBindingModify.

applyRDFDatatypeMod :: RDFDatatypeVal vt -> RDFDatatypeMod vt -> [RDFLabel] -> [RDFVarBinding] -> [RDFVarBinding] Source #

Apply a datatype modifier using supplied RDF labels to a supplied RDF variable binding.

type RDFDatatypeSub supvt subvt = DatatypeSub RDFGraph RDFLabel RDFLabel supvt subvt Source #

Describe a subtype/supertype relationship between a pair of RDF datatypes.

fromRDFLabel :: RDFDatatypeVal vt -> RDFLabel -> Maybe vt Source #

Convert from a typed literal to a Haskell value, with the possibility of failure.

toRDFLabel :: RDFDatatypeVal vt -> vt -> Maybe RDFLabel Source #

Convert a Haskell value to a typed literal (label), with the possibility of failure.

makeDatatypedLiteral Source #

Arguments

:: ScopedName

data type

-> Text

string form of the value

-> RDFLabel 

Create a typed literal. No conversion is made to the string representation.