80802511792d4e59a4ac67ad19677009d332b37dBruno LavitDescription : OWL signatures colimits
80802511792d4e59a4ac67ad19677009d332b37dBruno LavitCopyright : (c) Mihai Codescu, and Uni Bremen 2009
0d29d2c9c206eb1652fa951dd55bcc0cfa4b48feNeil MaddenLicense : GPLv2 or higher, see LICENSE.txt
80802511792d4e59a4ac67ad19677009d332b37dBruno LavitMaintainer : mcodescu@informatik.uni-bremen.de
80802511792d4e59a4ac67ad19677009d332b37dBruno LavitStability : provisional
0d29d2c9c206eb1652fa951dd55bcc0cfa4b48feNeil MaddenPortability : non-portable
0d29d2c9c206eb1652fa951dd55bcc0cfa4b48feNeil MaddenOWL2 signature colimits, computed component-wise.
80802511792d4e59a4ac67ad19677009d332b37dBruno Lavitimport qualified Data.Map as Map
80802511792d4e59a4ac67ad19677009d332b37dBruno LavitsignColimit :: Gr Sign (Int, OWLMorphism) ->
80802511792d4e59a4ac67ad19677009d332b37dBruno Lavit (Sign, Map.Map Int OWLMorphism)
80802511792d4e59a4ac67ad19677009d332b37dBruno LavitsignColimit graph = let
80802511792d4e59a4ac67ad19677009d332b37dBruno Lavit conGraph = emap (getEntityTypeMap Class) $ nmap concepts graph
80802511792d4e59a4ac67ad19677009d332b37dBruno Lavit dataGraph = emap (getEntityTypeMap Datatype) $ nmap datatypes graph
80802511792d4e59a4ac67ad19677009d332b37dBruno Lavit indGraph = emap (getEntityTypeMap NamedIndividual) $ nmap individuals graph
80802511792d4e59a4ac67ad19677009d332b37dBruno Lavit objGraph = emap (getEntityTypeMap ObjectProperty) $
80802511792d4e59a4ac67ad19677009d332b37dBruno Lavit nmap objectProperties graph
80802511792d4e59a4ac67ad19677009d332b37dBruno Lavit dataPropGraph = emap (getEntityTypeMap DataProperty) $
80802511792d4e59a4ac67ad19677009d332b37dBruno Lavit nmap dataProperties graph
80802511792d4e59a4ac67ad19677009d332b37dBruno Lavit annPropGraph = emap (getEntityTypeMap AnnotationProperty) $
80802511792d4e59a4ac67ad19677009d332b37dBruno Lavit nmap annotationRoles graph
80802511792d4e59a4ac67ad19677009d332b37dBruno Lavit _prefixGraph = emap getPrefixMap
80802511792d4e59a4ac67ad19677009d332b37dBruno Lavit $ nmap (Map.keysSet . toQName . prefixMap) graph
Map.findWithDefault (error "maps") i funC,
Map.findWithDefault (error "maps") i funD,
Map.findWithDefault (error "maps") i funI,
Map.findWithDefault (error "maps") i funO,
Map.findWithDefault (error "maps") i funDP,
Map.findWithDefault (error "maps") i funAP
morMaps = Map.fromAscList $
colimMor = Map.fromAscList $
mm = Map.findWithDefault (error "mor") i morMaps
pmap = Map.empty
-> (Int, Map.Map IRI IRI)
in (i, Map.fromList $
setEntityTypeMap :: EntityType -> Map.Map IRI IRI
-> Map.Map Entity IRI
setEntityTypeMap = Map.mapKeys . mkEntity
getPrefixMap :: (Int, OWLMorphism) -> (Int, Map.Map IRI IRI)
in (i, Map.fromList $
toQName :: PrefixMap -> Map.Map IRI String