Hets - the Heterogeneous Tool Set

Copyright(c) Klaus Luettich, Christian Maeder and Uni Bremen 2002-2006
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred

Common.GlobalAnnotations

Description

Data structures for global annotations

Synopsis

Documentation

data GlobalAnnos

all global annotations and a field for pretty printing stuff

Constructors

GA 

Fields

prec_annos :: PrecedenceGraph

precedences

assoc_annos :: AssocMap

associativity

display_annos :: DisplayMap

display annotations

literal_annos :: LiteralAnnos

literal annotations

literal_map :: LiteralMap

redundant literal map

prefix_map :: PrefixMap

abbreviated IRI prefixes

emptyGlobalAnnos :: GlobalAnnos

empty (or initial) global annotations

data LiteralAnnos

literal annotations for string, lists, number and floating

Constructors

LA 

emptyLiteralAnnos :: LiteralAnnos

empty literal annotations

type DisplayMap = Map Id (Map Display_format [Token])

ids to be displayed according to a format

type LiteralMap = Map Id LiteralType

a redundant map for LiteralAnnos

type PrefixMap = Map String IRI

a map for expansion of abbreviated/simple IRI to full IRI

data LiteralType

description of the type of a literal for a given Id in LiteralMap

Constructors

StringCons Id

refer to the Id of the null string

StringNull 
ListCons Id Id

brackets (as Id) and Id of matching empty list

ListNull Id

brackets (as Id) for the empty list

Number 
Fraction 
Floating 
NoLiteral

and error value for a getLiteralType

type AssocMap = Map Id AssocEither

a map of associative ids

isAssoc :: AssocEither -> AssocMap -> Id -> Bool

check if Id has a given associativity

type PrecedenceGraph = Rel Id

a binary relation over ids as precedence graph

precRel

Arguments

:: PrecedenceGraph

Graph describing the precedences

-> Id

x oID (y iid z) -- outer id

-> Id

x oid (y iID z) -- inner id

-> PrecRel 

return precedence relation of two ids

lookupDisplay :: GlobalAnnos -> Display_format -> Id -> Maybe [Token]

lookup of an display [string] in the GlobalAnnos record