swish- A semantic web toolkit.

MaintainerDouglas Burke
Safe HaskellNone



This module implements an inference rule based on a restruction on class membership of one or more values.



data ClassRestriction Source

Datatype for named class restriction


Eq ClassRestriction

Equality of class restrictions is based on the name of the restriction.

Show ClassRestriction 

type ClassRestrictionFn = [Maybe RDFLabel] -> Maybe [[RDFLabel]]Source

Type of function that evaluates missing node values in a restriction from those supplied.

makeDatatypeRestriction :: RDFDatatypeVal vt -> DatatypeRel vt -> ClassRestrictionSource

Make a class restriction from a datatype relation.

This lifts application of the datatype relation to operate on RDFLabel values, which are presumed to contain appropriately datatyped values.

makeDatatypeRestrictionFn :: RDFDatatypeVal vt -> DatatypeRelFn vt -> ClassRestrictionFnSource

Make a class restriction function from a datatype relation function.

makeRDFClassRestrictionRules :: [ClassRestriction] -> RDFGraph -> [RDFRule]Source

Make a list of class restriction rules given a list of class restriction values and a graph containing one or more class restriction definitions.

makeRDFDatatypeRestrictionRules :: RDFDatatypeVal vt -> RDFGraph -> [RDFRule]Source

Make restriction rules from the supplied datatype and graph.

falseGraph :: RDFGraphSource

The graph

 _:a <http://id.ninebynine.org/2003/rdfext/rdfd#false> _:b .

Exported for testing.

falseGraphStr :: BuilderSource

Exported for testing.