Rename.hs revision 431571057e88a650a974adec93ea4bb5173b6213
7ea448352f44eec95bc3e5dcf6f59a4b5dbc5f79Christian Maeder{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
7ea448352f44eec95bc3e5dcf6f59a4b5dbc5f79Christian MaederModule : $Header$
5de34eba726f63d1522bf17a857309a6208ce0b5Christian MaederCopyright : (c) Felix Gabriel Mance
5de34eba726f63d1522bf17a857309a6208ce0b5Christian MaederLicense : GPLv2 or higher, see LICENSE.txt
5de34eba726f63d1522bf17a857309a6208ce0b5Christian MaederMaintainer : f.mance@jacobs-university.de
5de34eba726f63d1522bf17a857309a6208ce0b5Christian MaederStability : provisional
37a69d649b33c6b4aaa58129bdf1091e443b2f0eChristian MaederPortability : portable
37a69d649b33c6b4aaa58129bdf1091e443b2f0eChristian MaederRenames prefixes in OntologyDocuments, so that there are
module OWL2.Rename where
import OWL2.AS
import OWL2.MS
import OWL2.Sign
import OWL2.Function
import Data.Maybe
import Data.Char (isDigit)
import Data.List (find, nub)
import qualified Data.Map as Map
import Common.Result
testAndInteg (pre, oiri) (old, tm) = case Map.lookup pre old of
Nothing -> (Map.insert pre oiri old, tm)
in fromJust $ find (not . flip Map.member nameMap)
if Map.null tm then return (addSign s1 s2) {prefixMap = pm}