Copyright | (c) 2003 Graham Klyne 2009 Vasili I Galchin 2011 2012 2018 Douglas Burke |
---|---|
License | GPL V2 |
Maintainer | Douglas Burke |
Stability | experimental |
Portability | H98 |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module defines the structures used by Swish to represent and manipulate RDF datatypes.
Synopsis
- 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 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 #
:: 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.
makeRdfDtOpenVarBindingModifiers Source #
:: 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 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.
:: ScopedName | data type |
-> Text | string form of the value |
-> RDFLabel |
Create a typed literal. No conversion is made to the string representation.