AS.hs revision 48d2e78323ec627872983f929b08dba2c7d03a3a
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel HausmannModule : $Header$
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel HausmannCopyright : (c) Heng Jiang, Uni Bremen 2004-2007
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel HausmannLicense : GPLv2 or higher, see LICENSE.txt
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel HausmannMaintainer : Christian.Maeder@dfki.de
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel HausmannStability : provisional
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel HausmannPortability : non-portable(deriving Typeable)
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel HausmannContains : Common datatypes for the Functional and Manchester Syntaxes of OWl 2
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel HausmannReferences : <http://www.w3.org/TR/2009/REC-owl2-syntax-20091027/#Functional-Style_Syntax>
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel Hausmann <http://www.w3.org/TR/owl2-manchester-syntax/>
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel Hausmannimport Common.Id (GetRange)
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel Hausmannimport qualified Data.Map as Map
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel Hausmann{- | full or abbreviated IRIs with a possible uri for the prefix
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel Hausmann or a local part following a hash sign -}
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel Hausmanndata QName = QN
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel Hausmann { namePrefix :: String
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel Hausmann -- ^ the name prefix part of a qualified name \"namePrefix:localPart\"
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel Hausmann , localPart :: String
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel Hausmann -- ^ the local part of a qualified name \"namePrefix:localPart\"
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel Hausmann , isFullIri :: Bool
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel Hausmann , namespaceUri :: String
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel Hausmann -- ^ the associated namespace uri (not printed)
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel Hausmann } deriving Show
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel HausmannshowQN :: QName -> String
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel HausmannshowQN q = (if isFullIri q then showQI else showQU) q
6a4fa2d53294f484fa8788a75656eff4ad1fd703Daniel Hausmann-- | show QName as abbreviated iri
dummyQName = QN "http" "//www.dfki.de/sks/hets/ontology/unamed" True ""
type PrefixMap = Map.Map String String