Portability | H98 |
---|---|
Stability | experimental |
Maintainer | Douglas Burke |
Safe Haskell | Safe-Infered |
This module defines the structures used by Swish to represent and manipulate RDF datatypes.
- type RDFDatatype = Datatype RDFGraph RDFLabel RDFLabel
- type RDFDatatypeVal vt = DatatypeVal RDFGraph vt RDFLabel RDFLabel
- type RDFDatatypeMod vt = DatatypeMod vt RDFLabel RDFLabel
- type RDFModifierFn = ModifierFn RDFLabel
- type RDFApplyModifier = ApplyModifier RDFLabel RDFLabel
- makeRdfDtOpenVarBindingModify :: RDFDatatypeVal vt -> RDFDatatypeMod vt -> RDFOpenVarBindingModify
- makeRdfDtOpenVarBindingModifiers :: RDFDatatypeVal vt -> [RDFOpenVarBindingModify]
- applyRDFDatatypeMod :: RDFDatatypeVal vt -> RDFDatatypeMod vt -> [RDFLabel] -> [RDFVarBinding] -> [RDFVarBinding]
- type RDFDatatypeSub supvt subvt = DatatypeSub RDFGraph RDFLabel RDFLabel supvt subvt
- fromRDFLabel :: RDFDatatypeVal vt -> RDFLabel -> Maybe vt
- toRDFLabel :: RDFDatatypeVal vt -> vt -> Maybe RDFLabel
- makeDatatypedLiteral :: ScopedName -> Text -> RDFLabel
Documentation
type RDFDatatype = Datatype RDFGraph RDFLabel RDFLabelSource
RDF datatype wrapper used with RDF graph values
type RDFDatatypeVal vt = DatatypeVal RDFGraph vt RDFLabel RDFLabelSource
RDF datatype value used with RDF graph values
type RDFDatatypeMod vt = DatatypeMod vt RDFLabel RDFLabelSource
RDF datatype modifier used with RDF graph values
type RDFModifierFn = ModifierFn RDFLabelSource
RDF value modifier function type
This indicates a modifier function that operates on RDFLabel
values.
type RDFApplyModifier = ApplyModifier RDFLabel RDFLabelSource
RDF value modifier application function type
This indicates a function that applies RDFModifierFn functions.
makeRdfDtOpenVarBindingModifySource
:: RDFDatatypeVal vt | is an |
-> 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.
makeRdfDtOpenVarBindingModifiersSource
:: RDFDatatypeVal vt | is an |
-> [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 subvtSource
Describe a subtype/supertype relationship between a pair of RDF datatypes.
fromRDFLabel :: RDFDatatypeVal vt -> RDFLabel -> Maybe vtSource
Convert from a typed literal to a Haskell value, with the possibility of failure.
toRDFLabel :: RDFDatatypeVal vt -> vt -> Maybe RDFLabelSource
Convert a Haskell value to a typed literal (label), with the possibility of failure.
makeDatatypedLiteral :: ScopedName -> Text -> RDFLabelSource
Create a typed literal from the given value.