AS.hs revision 52991d9b46a98ad6a9020421a3244950b0f8a522
8a77240a809197c92c0736c431b4b88947a7bac1Christian Maeder{- |
8a77240a809197c92c0736c431b4b88947a7bac1Christian MaederModule : $Header$
6ea54752d184beb92c92fbae17ae9f7dd065d988Christian MaederCopyright : (c) C. Maeder
e9458b1a7a19a63aa4c179f9ab20f4d50681c168Jens ElknerLicense : GPLv2 or higher, see LICENSE.txt
3a6c7a7ff823616f56cd3d205fc44664a683effdChristian Maeder
6ea54752d184beb92c92fbae17ae9f7dd065d988Christian MaederMaintainer : Christian.Maeder@dfki.de
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu ProdescuStability : provisional
2eeec5240b424984e3ee26296da1eeab6c6d739eChristian MaederPortability : portable
306763c67bb99228487345b32ab8c5c6cd41f23cChristian Maeder
306763c67bb99228487345b32ab8c5c6cd41f23cChristian MaederOWL 2 Functional Syntax constructs
f3a94a197960e548ecd6520bb768cb0d547457bbChristian Maeder
9f87aabedf02d74917d94fe1ac0300e07d3d4bc2Christian MaederReferences:
44fb55f639914f4f531641f32dd4904f15c510a4Till Mossakowski <http://www.w3.org/TR/2009/REC-owl2-syntax-20091027/#Functional-Style_Syntax>
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski <http://www.w3.org/TR/owl2-manchester-syntax/>
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski-}
af0cbe339851fc558d2b18cde3666981325e667cTill Mossakowski
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowskimodule OWL2.AS where
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski
1bc5dccbf0083a620ae1181c717fea75e4af5e5cChristian Maederimport Common.Id
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maederimport Common.Keywords
1bc5dccbf0083a620ae1181c717fea75e4af5e5cChristian Maeder
1bc5dccbf0083a620ae1181c717fea75e4af5e5cChristian Maederimport OWL2.ColonKeywords
1bc5dccbf0083a620ae1181c717fea75e4af5e5cChristian Maederimport OWL2.Keywords
1bc5dccbf0083a620ae1181c717fea75e4af5e5cChristian Maeder
1bc5dccbf0083a620ae1181c717fea75e4af5e5cChristian Maederimport Data.Char (intToDigit)
1bc5dccbf0083a620ae1181c717fea75e4af5e5cChristian Maederimport Data.List
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maederimport qualified Data.Map as Map
1bc5dccbf0083a620ae1181c717fea75e4af5e5cChristian Maeder
1bc5dccbf0083a620ae1181c717fea75e4af5e5cChristian Maederdata IRIType = Full | Abbreviated | NodeID
1bc5dccbf0083a620ae1181c717fea75e4af5e5cChristian Maeder deriving (Show, Eq, Ord)
1bc5dccbf0083a620ae1181c717fea75e4af5e5cChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder{- | full or abbreviated IRIs with a possible uri for the prefix
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder or a local part following a hash sign -}
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maederdata QName = QN
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder { namePrefix :: String
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder -- ^ the name prefix part of a qualified name \"namePrefix:localPart\"
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder , localPart :: String
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder -- ^ the local part of a qualified name \"namePrefix:localPart\"
1bc5dccbf0083a620ae1181c717fea75e4af5e5cChristian Maeder , iriType :: IRIType
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski , expandedIRI :: String
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski -- ^ the associated namespace uri (not printed)
922819b1c2d383a0fa5d70e1c4aa76667e2f1ca3Christian Maeder , iriPos :: Range
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder } deriving Show
19298cbfd6ee2abd904f3181af7760b965b822c3Christian Maeder
9f87aabedf02d74917d94fe1ac0300e07d3d4bc2Christian Maederinstance Eq QName where
9f87aabedf02d74917d94fe1ac0300e07d3d4bc2Christian Maeder p == q = compare p q == EQ
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder
24a0fbb77b860bc28d25be37ba555fd5746cb6d6Christian Maederinstance Ord QName where
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder compare (QN p1 l1 b1 n1 _) (QN p2 l2 b2 n2 _) =
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder if null n1 || null n2 then compare (b1, p1, l1) (b2, p2, l2) else
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder compare n1 n2 -- compare fully expanded names only
1a38107941725211e7c3f051f7a8f5e12199f03acmaeder
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maederinstance GetRange QName where
63324a97283728a30932828a612c7b0b0f687624Christian Maeder getRange = iriPos
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski
59fa9b1349ae1e001d996da732c4ac805c2938e2Christian MaedershowQN :: QName -> String
e9249d3ecd51a2b6a966a58669953e58d703adc6Till MossakowskishowQN q = (if iriType q /= Abbreviated then showQI else showQU) q
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski-- | show QName as abbreviated iri
e9249d3ecd51a2b6a966a58669953e58d703adc6Till MossakowskishowQU :: QName -> String
53310804002cd9e3c9c5844db3b984abcf001788Christian MaedershowQU (QN pre local _ _ _) =
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski if null pre then local else pre ++ ":" ++ local
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski-- | show QName in ankle brackets as full iris
e9249d3ecd51a2b6a966a58669953e58d703adc6Till MossakowskishowQI :: QName -> String
e9249d3ecd51a2b6a966a58669953e58d703adc6Till MossakowskishowQI = ('<' :) . (++ ">") . showQU
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski
3a87487c048b275c56e502c4a933273788e8d0bbChristian MaedernullQName :: QName
2b565fe5cfb9f99857fd25b52304758d8544e266Mihai CodescunullQName = QN "" "" Abbreviated "" nullRange
2b565fe5cfb9f99857fd25b52304758d8544e266Mihai Codescu
2b565fe5cfb9f99857fd25b52304758d8544e266Mihai CodescudummyQName :: QName
e9249d3ecd51a2b6a966a58669953e58d703adc6Till MossakowskidummyQName =
b5056cf24da461ee868c4be7b803a76b677fa21dChristian Maeder QN "http" "//www.dfki.de/sks/hets/ontology/unamed" Full "" nullRange
b5056cf24da461ee868c4be7b803a76b677fa21dChristian Maeder
4184cb191a9081cb2a9cf3ef5f060f56f0ca5922Till MossakowskimkQName :: String -> QName
8731f7b93b26083dc34a2c0937cd6493b42f2c2cTill MossakowskimkQName s = nullQName { localPart = s }
d97cb7d1c9beadc4d9102738da0a88c4efcf8fddChristian Maeder
24a0fbb77b860bc28d25be37ba555fd5746cb6d6Christian MaedersetQRange :: Range -> QName -> QName
24a0fbb77b860bc28d25be37ba555fd5746cb6d6Christian MaedersetQRange r q = q { iriPos = r }
4184cb191a9081cb2a9cf3ef5f060f56f0ca5922Till Mossakowski
b5056cf24da461ee868c4be7b803a76b677fa21dChristian MaedersetPrefix :: String -> QName -> QName
b5056cf24da461ee868c4be7b803a76b677fa21dChristian MaedersetPrefix s q = q { namePrefix = s }
bba825b39570777866d560bfde3807731131097eKlaus Luettich
d97cb7d1c9beadc4d9102738da0a88c4efcf8fddChristian MaedersetReservedPrefix :: QName -> QName
b5056cf24da461ee868c4be7b803a76b677fa21dChristian MaedersetReservedPrefix iri
b5056cf24da461ee868c4be7b803a76b677fa21dChristian Maeder | isDatatypeKey iri && (null $ namePrefix iri) = setPrefix "xsd" iri
b5056cf24da461ee868c4be7b803a76b677fa21dChristian Maeder | isThing iri && (null $ namePrefix iri) = setPrefix "owl" iri
b5056cf24da461ee868c4be7b803a76b677fa21dChristian Maeder | otherwise = iri
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian Maeder
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian MaedersetFull :: QName -> QName
f23641ce10de2d58493d41a4b39c64d904e5b534Christian MaedersetFull q = q {iriType = Full}
f23641ce10de2d58493d41a4b39c64d904e5b534Christian Maeder
f23641ce10de2d58493d41a4b39c64d904e5b534Christian Maedertype IRI = QName
f23641ce10de2d58493d41a4b39c64d904e5b534Christian Maeder
f23641ce10de2d58493d41a4b39c64d904e5b534Christian Maeder-- | checks if an IRI is an anonymous individual
f23641ce10de2d58493d41a4b39c64d904e5b534Christian MaederisAnonymous :: IRI -> Bool
a89e661aad28f1b39f4fc9f9f9a4d46074234123Christian MaederisAnonymous iri = iriType iri == NodeID
3d86f079b07a6a058cdd6c112d287e01a69d9c0cChristian Maeder
a89e661aad28f1b39f4fc9f9f9a4d46074234123Christian MaederowlSomething :: [String]
b5056cf24da461ee868c4be7b803a76b677fa21dChristian MaederowlSomething = ["Thing", "Nothing"]
b5056cf24da461ee868c4be7b803a76b677fa21dChristian Maeder
b5056cf24da461ee868c4be7b803a76b677fa21dChristian MaederisThing :: IRI -> Bool
b60a22e76e983e8129c5dae4d713fe2794ed7054Christian MaederisThing u = elem (localPart u) owlSomething && elem (namePrefix u) ["", "owl"]
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai Codescu || (showQU u) `elem` map ("http://www.w3.org/2002/07/owl#" ++) owlSomething
b60a22e76e983e8129c5dae4d713fe2794ed7054Christian Maeder
a975722baf6fee1ca3e67df170c732c4abd0a945Christian Maeder-- | checks if a string (bound to be localPart of an IRI) contains \":\/\/\"
a975722baf6fee1ca3e67df170c732c4abd0a945Christian MaedercssIRI :: String -> IRIType
a975722baf6fee1ca3e67df170c732c4abd0a945Christian MaedercssIRI iri = if isInfixOf "://" iri then Full else Abbreviated
a975722baf6fee1ca3e67df170c732c4abd0a945Christian Maeder
63324a97283728a30932828a612c7b0b0f687624Christian Maeder-- | prefix -> localname
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian Maedertype PrefixMap = Map.Map String String
a98fd29a06e80e447af26d898044c23497adbc73Mihai Codescu
b5056cf24da461ee868c4be7b803a76b677fa21dChristian Maedertype LexicalForm = String
b5056cf24da461ee868c4be7b803a76b677fa21dChristian Maedertype LanguageTag = String
b5056cf24da461ee868c4be7b803a76b677fa21dChristian Maedertype ImportIRI = IRI
b5056cf24da461ee868c4be7b803a76b677fa21dChristian Maedertype OntologyIRI = IRI
b5056cf24da461ee868c4be7b803a76b677fa21dChristian Maedertype Class = IRI
f2c050360525df494e6115073b0edc4c443a847cMihai Codescutype Datatype = IRI
b60a22e76e983e8129c5dae4d713fe2794ed7054Christian Maedertype ObjectProperty = IRI
f2c050360525df494e6115073b0edc4c443a847cMihai Codescutype DataProperty = IRI
b60a22e76e983e8129c5dae4d713fe2794ed7054Christian Maedertype AnnotationProperty = IRI
f2c050360525df494e6115073b0edc4c443a847cMihai Codescutype NamedIndividual = IRI
0e51a998b1b213654c7a9eca451562041971f100Till Mossakowskitype Individual = IRI
0e51a998b1b213654c7a9eca451562041971f100Till Mossakowski
b60a22e76e983e8129c5dae4d713fe2794ed7054Christian Maederdata EquivOrDisjoint = Equivalent | Disjoint
b60a22e76e983e8129c5dae4d713fe2794ed7054Christian Maeder deriving (Show, Eq, Ord)
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski
5c358300e78157f4bfaf5415c70e1096a9205b61Christian MaedershowEquivOrDisjoint :: EquivOrDisjoint -> String
5c358300e78157f4bfaf5415c70e1096a9205b61Christian MaedershowEquivOrDisjoint ed = case ed of
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder Equivalent -> equivalentToC
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder Disjoint -> disjointWithC
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maederdata DomainOrRange = ADomain | ARange
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder deriving (Show, Eq, Ord)
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder
5c358300e78157f4bfaf5415c70e1096a9205b61Christian MaedershowDomainOrRange :: DomainOrRange -> String
f23641ce10de2d58493d41a4b39c64d904e5b534Christian MaedershowDomainOrRange dr = case dr of
19298cbfd6ee2abd904f3181af7760b965b822c3Christian Maeder ADomain -> domainC
19298cbfd6ee2abd904f3181af7760b965b822c3Christian Maeder ARange -> rangeC
19298cbfd6ee2abd904f3181af7760b965b822c3Christian Maeder
19298cbfd6ee2abd904f3181af7760b965b822c3Christian Maederdata SameOrDifferent = Same | Different
19298cbfd6ee2abd904f3181af7760b965b822c3Christian Maeder deriving (Show, Eq, Ord)
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian Maeder
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian MaedershowSameOrDifferent :: SameOrDifferent -> String
19298cbfd6ee2abd904f3181af7760b965b822c3Christian MaedershowSameOrDifferent sd = case sd of
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder Same -> sameAsC
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder Different -> differentFromC
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maederdata Relation =
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder EDRelation EquivOrDisjoint
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder | SubPropertyOf
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder | InverseOf
4c7f058cdd19ce67b2b5d4b7f69703d0f8a21e38Christian Maeder | SubClass
4c7f058cdd19ce67b2b5d4b7f69703d0f8a21e38Christian Maeder | Types
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder | DRRelation DomainOrRange
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder | SDRelation SameOrDifferent
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder deriving (Show, Eq, Ord)
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder
5c358300e78157f4bfaf5415c70e1096a9205b61Christian MaedershowRelation :: Relation -> String
5c358300e78157f4bfaf5415c70e1096a9205b61Christian MaedershowRelation r = case r of
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder EDRelation ed -> showEquivOrDisjoint ed
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder SubPropertyOf -> subPropertyOfC
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder InverseOf -> inverseOfC
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder SubClass -> subClassOfC
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder Types -> typesC
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder DRRelation dr -> showDomainOrRange dr
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder SDRelation sd -> showSameOrDifferent sd
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder
5c358300e78157f4bfaf5415c70e1096a9205b61Christian MaedergetED :: Relation -> EquivOrDisjoint
5c358300e78157f4bfaf5415c70e1096a9205b61Christian MaedergetED r = case r of
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai Codescu EDRelation ed -> ed
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai Codescu _ -> error "not domain or range"
5c358300e78157f4bfaf5415c70e1096a9205b61Christian Maeder
f23641ce10de2d58493d41a4b39c64d904e5b534Christian MaedergetDR :: Relation -> DomainOrRange
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian MaedergetDR r = case r of
6ea54752d184beb92c92fbae17ae9f7dd065d988Christian Maeder DRRelation dr -> dr
6ea54752d184beb92c92fbae17ae9f7dd065d988Christian Maeder _ -> error "not domain or range"
6ea54752d184beb92c92fbae17ae9f7dd065d988Christian Maeder
6ea54752d184beb92c92fbae17ae9f7dd065d988Christian MaedergetSD :: Relation -> SameOrDifferent
6ea54752d184beb92c92fbae17ae9f7dd065d988Christian MaedergetSD s = case s of
6ea54752d184beb92c92fbae17ae9f7dd065d988Christian Maeder SDRelation sd -> sd
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian Maeder _ -> error "not same or different"
f23641ce10de2d58493d41a4b39c64d904e5b534Christian Maeder
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian Maederdata Character =
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian Maeder Functional
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian Maeder | InverseFunctional
255f43c567972176c2078e3de2fb7a2798bcfde0Christian Maeder | Reflexive
9f87aabedf02d74917d94fe1ac0300e07d3d4bc2Christian Maeder | Irreflexive
8c7aa750542dcadb94b971be712564a9a8f1d189Christian Maeder | Symmetric
9f87aabedf02d74917d94fe1ac0300e07d3d4bc2Christian Maeder | Asymmetric
9f87aabedf02d74917d94fe1ac0300e07d3d4bc2Christian Maeder | Antisymmetric
9f87aabedf02d74917d94fe1ac0300e07d3d4bc2Christian Maeder | Transitive
24a0fbb77b860bc28d25be37ba555fd5746cb6d6Christian Maeder deriving (Enum, Bounded, Show, Eq, Ord)
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian Maederdata PositiveOrNegative = Positive | Negative
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder deriving (Show, Eq, Ord)
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder
6ea54752d184beb92c92fbae17ae9f7dd065d988Christian Maederdata QuantifierType = AllValuesFrom | SomeValuesFrom
4ef5e33657aae95850b7e6941f67ac1fb73cd13fChristian Maeder deriving (Show, Eq, Ord)
6ea54752d184beb92c92fbae17ae9f7dd065d988Christian Maeder
4ef5e33657aae95850b7e6941f67ac1fb73cd13fChristian MaedershowQuantifierType :: QuantifierType -> String
6ea54752d184beb92c92fbae17ae9f7dd065d988Christian MaedershowQuantifierType ty = case ty of
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder AllValuesFrom -> onlyS
6ea54752d184beb92c92fbae17ae9f7dd065d988Christian Maeder SomeValuesFrom -> someS
b5056cf24da461ee868c4be7b803a76b677fa21dChristian Maeder
53310804002cd9e3c9c5844db3b984abcf001788Christian Maeder-- | data type strings (some are not listed in the grammar)
53310804002cd9e3c9c5844db3b984abcf001788Christian MaederdatatypeKeys :: [String]
19298cbfd6ee2abd904f3181af7760b965b822c3Christian MaederdatatypeKeys =
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian Maeder [ booleanS
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian Maeder , dATAS
f23641ce10de2d58493d41a4b39c64d904e5b534Christian Maeder , decimalS
f23641ce10de2d58493d41a4b39c64d904e5b534Christian Maeder , doubleS
f23641ce10de2d58493d41a4b39c64d904e5b534Christian Maeder , floatS
19298cbfd6ee2abd904f3181af7760b965b822c3Christian Maeder , integerS
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder , negativeIntegerS
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder , nonNegativeIntegerS
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder , nonPositiveIntegerS
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder , positiveIntegerS
1a38107941725211e7c3f051f7a8f5e12199f03acmaeder , stringS
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettich , universalS
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettich ]
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettich
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus LuettichisDatatypeKey :: IRI -> Bool
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus LuettichisDatatypeKey u =
6ca6ffc92f5c0058ae4b92d46e4e8cbc7beb11fcMihai Codescu elem (localPart u) datatypeKeys && elem (namePrefix u) ["", "xsd"]
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder || (showQU u) `elem` map ("http://www.w3.org/2001/XMLSchema#" ++) datatypeKeys
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maederdata DatatypeType = OWL2Int | OWL2String | OWL2Bool | Other
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder deriving (Show, Eq, Ord)
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettich
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus LuettichdatatypeType :: IRI -> DatatypeType
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus LuettichdatatypeType iri =
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettich let lp = localPart iri
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettich in case isDatatypeKey iri of
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettich True
da955132262baab309a50fdffe228c9efe68251dCui Jian | lp == booleanS -> OWL2Bool
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettich | lp `elem` [integerS, negativeIntegerS, nonNegativeIntegerS,
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettich nonPositiveIntegerS, positiveIntegerS] -> OWL2Int
da955132262baab309a50fdffe228c9efe68251dCui Jian | lp == stringS -> OWL2String
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder | otherwise -> Other
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder False -> Other
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maederdata DatatypeFacet =
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian Maeder LENGTH
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettich | MINLENGTH
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettich | MAXLENGTH
3946c010d94321f14139e12061dd4261a3cc7295Christian Maeder | PATTERN
3946c010d94321f14139e12061dd4261a3cc7295Christian Maeder | MININCLUSIVE
3946c010d94321f14139e12061dd4261a3cc7295Christian Maeder | MINEXCLUSIVE
3946c010d94321f14139e12061dd4261a3cc7295Christian Maeder | MAXINCLUSIVE
3946c010d94321f14139e12061dd4261a3cc7295Christian Maeder | MAXEXCLUSIVE
3946c010d94321f14139e12061dd4261a3cc7295Christian Maeder | TOTALDIGITS
3946c010d94321f14139e12061dd4261a3cc7295Christian Maeder | FRACTIONDIGITS
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder deriving (Show, Eq, Ord)
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian MaedershowFacet :: DatatypeFacet -> String
e9249d3ecd51a2b6a966a58669953e58d703adc6Till MossakowskishowFacet df = case df of
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski LENGTH -> lengthS
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski MINLENGTH -> minLengthS
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski MAXLENGTH -> maxLengthS
6ca6ffc92f5c0058ae4b92d46e4e8cbc7beb11fcMihai Codescu PATTERN -> patternS
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski MININCLUSIVE -> lessEq
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski MINEXCLUSIVE -> lessS
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski MAXINCLUSIVE -> greaterEq
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski MAXEXCLUSIVE -> greaterS
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski TOTALDIGITS -> digitsS
53310804002cd9e3c9c5844db3b984abcf001788Christian Maeder FRACTIONDIGITS -> fractionS
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettichdata CardinalityType = MinCardinality | MaxCardinality | ExactCardinality
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettich deriving (Show, Eq, Ord)
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettich
3fb8a83c3c06671ee94fd12a1782b14563d09df1Christian MaedershowCardinalityType :: CardinalityType -> String
3fb8a83c3c06671ee94fd12a1782b14563d09df1Christian MaedershowCardinalityType ty = case ty of
3fb8a83c3c06671ee94fd12a1782b14563d09df1Christian Maeder MinCardinality -> minS
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettich MaxCardinality -> maxS
19298cbfd6ee2abd904f3181af7760b965b822c3Christian Maeder ExactCardinality -> exactlyS
a89e661aad28f1b39f4fc9f9f9a4d46074234123Christian Maeder
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maederdata Cardinality a b = Cardinality CardinalityType Int a (Maybe b)
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai Codescu deriving (Show, Eq, Ord)
da955132262baab309a50fdffe228c9efe68251dCui Jian
da955132262baab309a50fdffe228c9efe68251dCui Jiandata JunctionType = UnionOf | IntersectionOf
da955132262baab309a50fdffe228c9efe68251dCui Jian deriving (Show, Eq, Ord)
eb0e19a83d8e3eaeb936c197555b20d37129022cKlaus Luettich
da955132262baab309a50fdffe228c9efe68251dCui Jiantype ConstrainingFacet = IRI
a98fd29a06e80e447af26d898044c23497adbc73Mihai Codescutype RestrictionValue = Literal
f2c050360525df494e6115073b0edc4c443a847cMihai Codescu
f2c050360525df494e6115073b0edc4c443a847cMihai Codescu-- * ENTITIES
b60a22e76e983e8129c5dae4d713fe2794ed7054Christian Maeder
da955132262baab309a50fdffe228c9efe68251dCui Jiandata Entity = Entity EntityType IRI deriving (Show, Eq, Ord)
1a38107941725211e7c3f051f7a8f5e12199f03acmaeder
1a38107941725211e7c3f051f7a8f5e12199f03acmaederinstance GetRange Entity where
d85e3f253f6af237c4b70bbfacb1bfecb5cfa678Christian Maeder getRange (Entity _ iri) = iriPos iri
ca8550c6d47234042130bdc10a152806ecbc9832Christian Maeder
d85e3f253f6af237c4b70bbfacb1bfecb5cfa678Christian Maederdata EntityType =
53310804002cd9e3c9c5844db3b984abcf001788Christian Maeder Datatype
4ef5e33657aae95850b7e6941f67ac1fb73cd13fChristian Maeder | Class
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski | ObjectProperty
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski | DataProperty
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski | AnnotationProperty
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski | NamedIndividual
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski deriving (Enum, Bounded, Show, Read, Eq, Ord)
53310804002cd9e3c9c5844db3b984abcf001788Christian Maeder
e9249d3ecd51a2b6a966a58669953e58d703adc6Till MossakowskishowEntityType :: EntityType -> String
d85e3f253f6af237c4b70bbfacb1bfecb5cfa678Christian MaedershowEntityType e = case e of
d85e3f253f6af237c4b70bbfacb1bfecb5cfa678Christian Maeder Datatype -> datatypeC
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski Class -> classC
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski ObjectProperty -> objectPropertyC
d85e3f253f6af237c4b70bbfacb1bfecb5cfa678Christian Maeder DataProperty -> dataPropertyC
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski AnnotationProperty -> annotationPropertyC
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski NamedIndividual -> individualC
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski
d85e3f253f6af237c4b70bbfacb1bfecb5cfa678Christian MaederentityTypes :: [EntityType]
53310804002cd9e3c9c5844db3b984abcf001788Christian MaederentityTypes = [minBound .. maxBound]
f7819aa9d183836144a98c70d4fa7d65e31cb513Till Mossakowski
53310804002cd9e3c9c5844db3b984abcf001788Christian Maeder-- * LITERALS
f7819aa9d183836144a98c70d4fa7d65e31cb513Till Mossakowski
53310804002cd9e3c9c5844db3b984abcf001788Christian Maederdata TypedOrUntyped = Typed Datatype | Untyped (Maybe LanguageTag)
8731f7b93b26083dc34a2c0937cd6493b42f2c2cTill Mossakowski deriving (Show, Eq, Ord)
bba825b39570777866d560bfde3807731131097eKlaus Luettich
da955132262baab309a50fdffe228c9efe68251dCui Jiandata Literal = Literal LexicalForm TypedOrUntyped | NumberLit FloatLit
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder deriving (Show, Eq, Ord)
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder-- | non-negative integers given by the sequence of digits
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian Maederdata NNInt = NNInt [Int] deriving (Eq, Ord)
53310804002cd9e3c9c5844db3b984abcf001788Christian Maeder
53310804002cd9e3c9c5844db3b984abcf001788Christian Maederinstance Show NNInt where
53310804002cd9e3c9c5844db3b984abcf001788Christian Maeder show (NNInt l) = map intToDigit l
c44c23429c72f3a709e22a18f2ed6f05fc8cc765Christian Maeder
53310804002cd9e3c9c5844db3b984abcf001788Christian MaederzeroNNInt :: NNInt
922819b1c2d383a0fa5d70e1c4aa76667e2f1ca3Christian MaederzeroNNInt = NNInt []
922819b1c2d383a0fa5d70e1c4aa76667e2f1ca3Christian Maeder
e9249d3ecd51a2b6a966a58669953e58d703adc6Till MossakowskiisZeroNNInt :: NNInt -> Bool
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian MaederisZeroNNInt (NNInt l) = null l
5bb3727ef464d9f08ab0decb2d4a59c1352a389eChristian Maeder
53310804002cd9e3c9c5844db3b984abcf001788Christian Maederdata IntLit = IntLit
53310804002cd9e3c9c5844db3b984abcf001788Christian Maeder { absInt :: NNInt
6ea54752d184beb92c92fbae17ae9f7dd065d988Christian Maeder , isNegInt :: Bool }
5bb3727ef464d9f08ab0decb2d4a59c1352a389eChristian Maeder deriving (Eq, Ord)
27166b063721ef1a2efd8f00ab3d9bc820b315fbChristian Maeder
53310804002cd9e3c9c5844db3b984abcf001788Christian Maederinstance Show IntLit where
922819b1c2d383a0fa5d70e1c4aa76667e2f1ca3Christian Maeder show (IntLit n b) = (if b then ('-' :) else id) $ show n
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian Maeder
d85e3f253f6af237c4b70bbfacb1bfecb5cfa678Christian MaederzeroInt :: IntLit
e9249d3ecd51a2b6a966a58669953e58d703adc6Till MossakowskizeroInt = IntLit zeroNNInt False
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai Codescu
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai CodescuisZeroInt :: IntLit -> Bool
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai CodescuisZeroInt (IntLit n _) = isZeroNNInt n
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai Codescu
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai CodescunegNNInt :: Bool -> NNInt -> IntLit
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai CodescunegNNInt b n = IntLit n b
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai Codescu
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai CodescunegInt :: IntLit -> IntLit
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai CodescunegInt (IntLit n b) = IntLit n $ not b
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai Codescu
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai Codescudata DecLit = DecLit
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai Codescu { truncDec :: IntLit
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai Codescu , fracDec :: NNInt }
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai Codescu deriving (Eq, Ord)
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai Codescu
83b3260413a3b1b7dee1f9c4d3249dec994a875cMihai Codescuinstance Show DecLit where
63324a97283728a30932828a612c7b0b0f687624Christian Maeder show (DecLit t f) = show t
a975722baf6fee1ca3e67df170c732c4abd0a945Christian Maeder ++ if isZeroNNInt f then "" else
53f347ab16f992d909f47a50bf2059f57f3c7ad0Christian Maeder '.' : show f
0cd4575fe679a26de63d9a75a4d66d8366f79ab8Christian Maeder
0cd4575fe679a26de63d9a75a4d66d8366f79ab8Christian MaederisDecInt :: DecLit -> Bool
0cd4575fe679a26de63d9a75a4d66d8366f79ab8Christian MaederisDecInt = isZeroNNInt . fracDec
0cd4575fe679a26de63d9a75a4d66d8366f79ab8Christian Maeder
0cd4575fe679a26de63d9a75a4d66d8366f79ab8Christian MaedernegDec :: Bool -> DecLit -> DecLit
0cd4575fe679a26de63d9a75a4d66d8366f79ab8Christian MaedernegDec b (DecLit t f) = DecLit (if b then t else negInt t) f
0cd4575fe679a26de63d9a75a4d66d8366f79ab8Christian Maeder
53f347ab16f992d909f47a50bf2059f57f3c7ad0Christian Maederdata FloatLit = FloatLit
63324a97283728a30932828a612c7b0b0f687624Christian Maeder { floatBase :: DecLit
53310804002cd9e3c9c5844db3b984abcf001788Christian Maeder , floatExp :: IntLit }
933baca0720dae81434de384b32a93b47e754d09Christian Maeder deriving (Eq, Ord)
a98fd29a06e80e447af26d898044c23497adbc73Mihai Codescu
da955132262baab309a50fdffe228c9efe68251dCui Jianinstance Show FloatLit where
a98fd29a06e80e447af26d898044c23497adbc73Mihai Codescu show (FloatLit b e) = show b
a98fd29a06e80e447af26d898044c23497adbc73Mihai Codescu ++ if isZeroInt e then "" else
da955132262baab309a50fdffe228c9efe68251dCui Jian 'E' : show e ++ "F"
f2c050360525df494e6115073b0edc4c443a847cMihai Codescu
f2c050360525df494e6115073b0edc4c443a847cMihai CodescuisFloatDec :: FloatLit -> Bool
da955132262baab309a50fdffe228c9efe68251dCui JianisFloatDec = isZeroInt . floatExp
da955132262baab309a50fdffe228c9efe68251dCui Jian
b60a22e76e983e8129c5dae4d713fe2794ed7054Christian MaederisFloatInt :: FloatLit -> Bool
b60a22e76e983e8129c5dae4d713fe2794ed7054Christian MaederisFloatInt f = isFloatDec f && isDecInt (floatBase f)
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaederfloatToInt :: FloatLit -> IntLit
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaederfloatToInt = truncDec . floatBase
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaederintToDec :: IntLit -> DecLit
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaederintToDec i = DecLit i zeroNNInt
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaederdecToFloat :: DecLit -> FloatLit
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaederdecToFloat d = FloatLit d zeroInt
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaederintToFloat :: IntLit -> FloatLit
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaederintToFloat = decToFloat . intToDec
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaederabInt :: IntLit -> IntLit
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaederabInt int = int {isNegInt = False}
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaederabDec :: DecLit -> DecLit
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaederabDec dec = dec {truncDec = abInt $ truncDec dec}
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaederabFloat :: FloatLit -> FloatLit
a9183ce3b997bf3539e427b3cd22d70c3565446eChristian MaederabFloat f = f {floatBase = abDec $ floatBase f}
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaederisNegDec :: DecLit -> Bool
a9183ce3b997bf3539e427b3cd22d70c3565446eChristian MaederisNegDec d = isNegInt $ truncDec d
a9183ce3b997bf3539e427b3cd22d70c3565446eChristian Maeder
a9183ce3b997bf3539e427b3cd22d70c3565446eChristian MaedernumberName :: FloatLit -> String
a9183ce3b997bf3539e427b3cd22d70c3565446eChristian MaedernumberName f
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder | isFloatInt f = integerS
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder | isFloatDec f = decimalS
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder | otherwise = floatS
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaedercTypeS :: String
556f473448dfcceee22afaa89ed7a364489cdbbbChristian MaedercTypeS = "^^"
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder-- * PROPERTY EXPRESSIONS
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maedertype InverseObjectProperty = ObjectPropertyExpression
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maederdata ObjectPropertyExpression = ObjectProp ObjectProperty
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder | ObjectInverseOf InverseObjectProperty
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder deriving (Show, Eq, Ord)
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
3946c010d94321f14139e12061dd4261a3cc7295Christian Maedertype DataPropertyExpression = DataProperty
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder-- * DATA RANGES
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maederdata DataRange
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder = DataType Datatype [(ConstrainingFacet, RestrictionValue)]
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder | DataJunction JunctionType [DataRange]
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder | DataComplementOf DataRange
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder | DataOneOf [Literal]
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder deriving (Show, Eq, Ord)
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder-- * CLASS EXPERSSIONS
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maederdata ClassExpression =
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder Expression Class
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder | ObjectJunction JunctionType [ClassExpression]
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder | ObjectComplementOf ClassExpression
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder | ObjectOneOf [Individual]
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder | ObjectValuesFrom QuantifierType ObjectPropertyExpression ClassExpression
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder | ObjectHasValue ObjectPropertyExpression Individual
4ef5e33657aae95850b7e6941f67ac1fb73cd13fChristian Maeder | ObjectHasSelf ObjectPropertyExpression
4ef5e33657aae95850b7e6941f67ac1fb73cd13fChristian Maeder | ObjectCardinality (Cardinality ObjectPropertyExpression ClassExpression)
4ef5e33657aae95850b7e6941f67ac1fb73cd13fChristian Maeder | DataValuesFrom QuantifierType DataPropertyExpression DataRange
4ef5e33657aae95850b7e6941f67ac1fb73cd13fChristian Maeder | DataHasValue DataPropertyExpression Literal
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder | DataCardinality (Cardinality DataPropertyExpression DataRange)
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder deriving (Show, Eq, Ord)
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder
fd496ec12c6be2731410ea84111f1ff88d8b6384Christian Maeder-- * ANNOTATIONS
082693e05d9719faff6a21da3a476dfe8f42a261Jonathan von Schroeder
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroederdata Annotation = Annotation [Annotation] AnnotationProperty AnnotationValue
082693e05d9719faff6a21da3a476dfe8f42a261Jonathan von Schroeder deriving (Show, Eq, Ord)
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder
082693e05d9719faff6a21da3a476dfe8f42a261Jonathan von Schroederdata AnnotationValue
082693e05d9719faff6a21da3a476dfe8f42a261Jonathan von Schroeder = AnnValue IRI
082693e05d9719faff6a21da3a476dfe8f42a261Jonathan von Schroeder | AnnValLit Literal
082693e05d9719faff6a21da3a476dfe8f42a261Jonathan von Schroeder deriving (Show, Eq, Ord)