AS.hs revision aa0ca44e856c87db27e61687cbb630f270976da1
abd8dd44106c507dd2cb64359b63d7d56fa0a9c8Christian Maeder{- |
abd8dd44106c507dd2cb64359b63d7d56fa0a9c8Christian MaederModule : $Header$
09249711700a6acbc40a2e337688b434d7aafa28Christian MaederCopyright : (c) Heng Jiang, Uni Bremen 2004-2007
abd8dd44106c507dd2cb64359b63d7d56fa0a9c8Christian MaederLicense : GPLv2 or higher, see LICENSE.txt
97018cf5fa25b494adffd7e9b4e87320dae6bf47Christian Maeder
abd8dd44106c507dd2cb64359b63d7d56fa0a9c8Christian MaederMaintainer : Christian.Maeder@dfki.de
3f69b6948966979163bdfe8331c38833d5d90ecdChristian MaederStability : provisional
abd8dd44106c507dd2cb64359b63d7d56fa0a9c8Christian MaederPortability : non-portable(deriving Typeable)
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder
f3a94a197960e548ecd6520bb768cb0d547457bbChristian MaederCommon datatypes for Functional and Manchester Syntax of OWl 2
f3a94a197960e548ecd6520bb768cb0d547457bbChristian Maeder
d703a61b7fa9f85d92ac8f768d7c290b7c0a41c5Christian MaederIt is modeled after the W3C document:
d703a61b7fa9f85d92ac8f768d7c290b7c0a41c5Christian Maeder<http://www.w3.org/TR/2009/REC-owl2-syntax-20091027/#Functional-Style_Syntax>
e8ffec0fa3d3061061bdc16e44247b9cf96b050fChristian Maeder-}
d703a61b7fa9f85d92ac8f768d7c290b7c0a41c5Christian Maeder
e8ffec0fa3d3061061bdc16e44247b9cf96b050fChristian Maedermodule OWL2.AS where
d48085f765fca838c1d972d2123601997174583dChristian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maederimport Common.Keywords
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maederimport Common.Id (GetRange)
0df692ce8b9293499b2e1768458613a63e7b5cd0Christian Maeder
d48085f765fca838c1d972d2123601997174583dChristian Maederimport OWL.Keywords
47d6bc7bc9a708427f96be8d805f712697ad3d9eChristian Maederimport OWL.ColonKeywords
23a00c966f2aa8da525d7a7c51933c99964426c0Christian Maederimport qualified Data.Map as Map
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder{- | full or abbreviated IRIs with a possible uri for the prefix
d703a61b7fa9f85d92ac8f768d7c290b7c0a41c5Christian Maeder or a local part following a hash sign -}
3c5cc698b0c061209ff83eb8de027daef5ae922aChristian Maederdata QName = QN
3c5cc698b0c061209ff83eb8de027daef5ae922aChristian Maeder { namePrefix :: String
3c5cc698b0c061209ff83eb8de027daef5ae922aChristian Maeder -- ^ the name prefix part of a qualified name \"namePrefix:localPart\"
3c5cc698b0c061209ff83eb8de027daef5ae922aChristian Maeder , localPart :: String
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder -- ^ the local part of a qualified name \"namePrefix:localPart\"
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder , isFullIri :: Bool
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder , namespaceUri :: String
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder -- ^ the associated namespace uri (not printed)
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder } deriving Show
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian MaedershowQN :: QName -> String
8452387b4c54b8dd36c012b216e0b0c5004ca6f1Christian MaedershowQN q = (if isFullIri q then showQI else showQU) q
c18e9c3c6d5039618f1f2c05526ece84c7794ea3Christian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder-- | show QName as abbreviated iri
ce3928e71520030ad0275b72050a8f4377f9313cChristian MaedershowQU :: QName -> String
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian MaedershowQU (QN pre local _ _) =
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder if null pre then local else pre ++ ":" ++ local
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder
e997f1724fcc2c5bb49f44e9f45e8354e0f3a2d6Christian Maeder-- | show QName in ankle brackets as full iris
eab576044505ba1fbc64610323053490fbd9e82cChristian MaedershowQI :: QName -> String
413db961f13e112716509b6d61d7a7bbf50c98b2Christian MaedershowQI = ('<' :) . (++ ">") . showQU
81946e2b3f6dde6167f48769bd02c7a634736856Christian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian MaedernullQName :: QName
eab576044505ba1fbc64610323053490fbd9e82cChristian MaedernullQName = QN "" "" False ""
eab576044505ba1fbc64610323053490fbd9e82cChristian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian MaederdummyQName :: QName
120efeede54a5f7650cda8e91363bd6832eac9a9Christian MaederdummyQName = QN "http" "//www.dfki.de/sks/hets/ontology/unamed" True ""
120efeede54a5f7650cda8e91363bd6832eac9a9Christian Maeder
120efeede54a5f7650cda8e91363bd6832eac9a9Christian MaedermkQName :: String -> QName
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian MaedermkQName s = nullQName { localPart = s }
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder
df33a9af92444f63ad545da6bb326aac9284318eChristian Maederinstance Eq QName where
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder p == q = compare p q == EQ
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder
df33a9af92444f63ad545da6bb326aac9284318eChristian Maederinstance Ord QName where
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder compare (QN p1 l1 b1 n1) (QN p2 l2 b2 n2) =
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder if null n1 then
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder if null n2 then compare (b1, p1, l1) (b2, p2, l2) else LT
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder else if null n2 then GT else compare (b1, l1, n1) (b2, l2, n2)
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder
df33a9af92444f63ad545da6bb326aac9284318eChristian Maedertype IRIreference = QName
df33a9af92444f63ad545da6bb326aac9284318eChristian Maedertype IRI = QName
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder-- | prefix -> localname
120efeede54a5f7650cda8e91363bd6832eac9a9Christian Maedertype PrefixMap = Map.Map String String
ce3928e71520030ad0275b72050a8f4377f9313cChristian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maedertype NodeID = IRI
d703a61b7fa9f85d92ac8f768d7c290b7c0a41c5Christian Maedertype LexicalForm = String
abd8dd44106c507dd2cb64359b63d7d56fa0a9c8Christian Maedertype LanguageTag = String
c4e912fc181d72c8d0e0e38d0351278182f0d0b5Christian Maedertype PrefixName = String
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maedertype ImportIRI = IRI
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maedertype OntologyIRI = IRI
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maedertype Class = IRI
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maedertype Datatype = IRI
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maedertype ObjectProperty = IRI
d703a61b7fa9f85d92ac8f768d7c290b7c0a41c5Christian Maedertype DataProperty = IRI
92aa1b88f02d2a413da60dba78acd34312e6f29aChristian Maedertype AnnotationProperty = IRI
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maedertype NamedIndividual = IRI
d92635f998347112e5d5803301c2abfe7832ab65Christian Maedertype Individual = IRI
36c6cc568751e4235502cfee00ba7b597dae78dcChristian Maeder
81946e2b3f6dde6167f48769bd02c7a634736856Christian Maeder-------------------------
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder-- LITERALS
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder-------------------------
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maederdata TypedOrUntyped = Typed Datatype | Untyped (Maybe LanguageTag)
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder deriving (Show, Eq, Ord)
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder
36c6cc568751e4235502cfee00ba7b597dae78dcChristian Maederdata Literal = Literal LexicalForm TypedOrUntyped
024621f43239cfe9629e35d35a8669fad7acbba2Christian Maeder deriving (Show, Eq, Ord)
99f16a0f9ca757410960ff51a79b034503384fe2Christian Maeder
932f71e6f6f404ac139399c3d6a2b906ba055cbdChristian MaedercTypeS :: String
d48085f765fca838c1d972d2123601997174583dChristian MaedercTypeS = "^^"
68485f7bfab1b4c6f963ce6837cba5fb148ed625Christian Maeder
68485f7bfab1b4c6f963ce6837cba5fb148ed625Christian Maeder-- | a lexical representation either with an "^^" URI (typed) or
d48085f765fca838c1d972d2123601997174583dChristian Maeder-- an optional language tag starting with "\@" (untyped)
a59f2017dfc311ece7afcea3e8a3ceceac77ba5aChristian Maeder
8452387b4c54b8dd36c012b216e0b0c5004ca6f1Christian Maeder--------------------------
8452387b4c54b8dd36c012b216e0b0c5004ca6f1Christian Maeder-- PROPERTY EXPRESSIONS
a59f2017dfc311ece7afcea3e8a3ceceac77ba5aChristian Maeder--------------------------
a59f2017dfc311ece7afcea3e8a3ceceac77ba5aChristian Maeder
a59f2017dfc311ece7afcea3e8a3ceceac77ba5aChristian Maedertype InverseObjectProperty = ObjectPropertyExpression
a59f2017dfc311ece7afcea3e8a3ceceac77ba5aChristian Maeder
8452387b4c54b8dd36c012b216e0b0c5004ca6f1Christian Maederdata ObjectPropertyExpression = ObjectProp ObjectProperty | ObjectInverseOf InverseObjectProperty
a59f2017dfc311ece7afcea3e8a3ceceac77ba5aChristian Maeder deriving (Show, Eq, Ord)
a59f2017dfc311ece7afcea3e8a3ceceac77ba5aChristian Maeder
a59f2017dfc311ece7afcea3e8a3ceceac77ba5aChristian Maedertype DataPropertyExpression = DataProperty
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder-- | data type strings (some are not listed in the grammar)
df33a9af92444f63ad545da6bb326aac9284318eChristian MaederdatatypeKeys :: [String]
df33a9af92444f63ad545da6bb326aac9284318eChristian MaederdatatypeKeys =
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder [ booleanS
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder , dATAS
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder , decimalS
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder , floatS
68485f7bfab1b4c6f963ce6837cba5fb148ed625Christian Maeder , integerS
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder , negativeIntegerS
df33a9af92444f63ad545da6bb326aac9284318eChristian Maeder , nonNegativeIntegerS
04a1ed0b360858b85de6f449b84df4eab81b3fc9Christian Maeder , nonPositiveIntegerS
04a1ed0b360858b85de6f449b84df4eab81b3fc9Christian Maeder , positiveIntegerS
04a1ed0b360858b85de6f449b84df4eab81b3fc9Christian Maeder , stringS
932f71e6f6f404ac139399c3d6a2b906ba055cbdChristian Maeder , universalS
ae8052003e1ec7247597f034069db0939a7387e1Christian Maeder ]
68485f7bfab1b4c6f963ce6837cba5fb148ed625Christian Maeder
99f16a0f9ca757410960ff51a79b034503384fe2Christian Maeder--------------------------
99f16a0f9ca757410960ff51a79b034503384fe2Christian Maeder-- DATA RANGES
68485f7bfab1b4c6f963ce6837cba5fb148ed625Christian Maeder--------------------------
e997f1724fcc2c5bb49f44e9f45e8354e0f3a2d6Christian Maeder
e997f1724fcc2c5bb49f44e9f45e8354e0f3a2d6Christian Maederdata DatatypeFacet =
e997f1724fcc2c5bb49f44e9f45e8354e0f3a2d6Christian Maeder LENGTH
e997f1724fcc2c5bb49f44e9f45e8354e0f3a2d6Christian Maeder | MINLENGTH
932f71e6f6f404ac139399c3d6a2b906ba055cbdChristian Maeder | MAXLENGTH
932f71e6f6f404ac139399c3d6a2b906ba055cbdChristian Maeder | PATTERN
e997f1724fcc2c5bb49f44e9f45e8354e0f3a2d6Christian Maeder | MININCLUSIVE
932f71e6f6f404ac139399c3d6a2b906ba055cbdChristian Maeder | MINEXCLUSIVE
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder | MAXINCLUSIVE
99f16a0f9ca757410960ff51a79b034503384fe2Christian Maeder | MAXEXCLUSIVE
99f16a0f9ca757410960ff51a79b034503384fe2Christian Maeder | TOTALDIGITS
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder | FRACTIONDIGITS
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder deriving (Show, Eq, Ord)
68485f7bfab1b4c6f963ce6837cba5fb148ed625Christian Maeder
932f71e6f6f404ac139399c3d6a2b906ba055cbdChristian MaedershowFacet :: DatatypeFacet -> String
04a1ed0b360858b85de6f449b84df4eab81b3fc9Christian MaedershowFacet df = case df of
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder LENGTH -> lengthS
d48085f765fca838c1d972d2123601997174583dChristian Maeder MINLENGTH -> minLengthS
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder MAXLENGTH -> maxLengthS
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder PATTERN -> patternS
68485f7bfab1b4c6f963ce6837cba5fb148ed625Christian Maeder MININCLUSIVE -> lessEq
68485f7bfab1b4c6f963ce6837cba5fb148ed625Christian Maeder MINEXCLUSIVE -> lessS
d48085f765fca838c1d972d2123601997174583dChristian Maeder MAXINCLUSIVE -> greaterEq
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder MAXEXCLUSIVE -> greaterS
68485f7bfab1b4c6f963ce6837cba5fb148ed625Christian Maeder TOTALDIGITS -> digitsS
a59f2017dfc311ece7afcea3e8a3ceceac77ba5aChristian Maeder FRACTIONDIGITS -> fractionS
932f71e6f6f404ac139399c3d6a2b906ba055cbdChristian Maeder
35cd0c10843c2cdbbe29f00a2a5d7e5e4f2d0064Christian Maederdata DataRange
e997f1724fcc2c5bb49f44e9f45e8354e0f3a2d6Christian Maeder = DataType Datatype
e997f1724fcc2c5bb49f44e9f45e8354e0f3a2d6Christian Maeder | DataJunction JunctionType [DataRange] -- at least two elements in the list
e997f1724fcc2c5bb49f44e9f45e8354e0f3a2d6Christian Maeder | DataComplementOf DataRange
e997f1724fcc2c5bb49f44e9f45e8354e0f3a2d6Christian Maeder | DataOneOf [Literal] -- at least one element in the list
e997f1724fcc2c5bb49f44e9f45e8354e0f3a2d6Christian Maeder | DatatypeRestriction Datatype [(ConstrainingFacet, RestrictionValue)] -- at least one element in the list
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder deriving (Show, Eq, Ord)
68485f7bfab1b4c6f963ce6837cba5fb148ed625Christian Maeder
d703a61b7fa9f85d92ac8f768d7c290b7c0a41c5Christian Maederdata JunctionType = UnionOf | IntersectionOf deriving (Show, Eq, Ord)
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maedertype ConstrainingFacet = IRI
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maedertype RestrictionValue = Literal
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder
99edc5256de959957a8c27b05ae4ad4f0572233dChristian Maeder---------------------------
48c4688439e0aade4faeebf25ca8b16d661e47afChristian Maeder-- CLASS EXPERSSIONS
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder---------------------------
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder
37354e3ed68875fb527338105a610df481f98cb0Christian Maederdata QuantifierType = AllValuesFrom | SomeValuesFrom deriving (Show, Eq, Ord)
413db961f13e112716509b6d61d7a7bbf50c98b2Christian Maeder
d703a61b7fa9f85d92ac8f768d7c290b7c0a41c5Christian MaedershowQuantifierType :: QuantifierType -> String
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian MaedershowQuantifierType ty = case ty of
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder AllValuesFrom -> onlyS
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder SomeValuesFrom -> someS
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maederdata CardinalityType = MinCardinality | MaxCardinality | ExactCardinality
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder deriving (Show, Eq, Ord)
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian MaedershowCardinalityType :: CardinalityType -> String
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian MaedershowCardinalityType ty = case ty of
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder MinCardinality -> minS
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder MaxCardinality -> maxS
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder ExactCardinality -> exactlyS
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maederdata Cardinality a b = Cardinality CardinalityType Int a (Maybe b)
8452387b4c54b8dd36c012b216e0b0c5004ca6f1Christian Maeder deriving (Show, Eq, Ord)
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maederdata ClassExpression =
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder Expression Class
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder | ObjectJunction JunctionType [ClassExpression] -- min. 2 ClassExpressions
9d75ab580dbf51b7ca60903fb32e7f38d939d326Christian Maeder | ObjectComplementOf ClassExpression
09249711700a6acbc40a2e337688b434d7aafa28Christian Maeder | ObjectOneOf [Individual] -- min. 1 Individual
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder | ObjectValuesFrom QuantifierType ObjectPropertyExpression ClassExpression
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder | ObjectHasValue ObjectPropertyExpression Individual
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder | ObjectHasSelf ObjectPropertyExpression
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder | ObjectCardinality (Cardinality ObjectPropertyExpression ClassExpression)
f875f7eebac7f69bf9da98c93479a542d0a8056fChristian Maeder | DataValuesFrom
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder QuantifierType DataPropertyExpression [DataPropertyExpression] DataRange
24f79601ad5e42ce74f4152a36aad257d7c4d7b5Christian Maeder | DataHasValue DataPropertyExpression Literal
24f79601ad5e42ce74f4152a36aad257d7c4d7b5Christian Maeder | DataCardinality (Cardinality DataPropertyExpression DataRange)
24f79601ad5e42ce74f4152a36aad257d7c4d7b5Christian Maeder deriving (Show, Eq, Ord)
24f79601ad5e42ce74f4152a36aad257d7c4d7b5Christian Maeder
9d75ab580dbf51b7ca60903fb32e7f38d939d326Christian Maeder-------------------
09249711700a6acbc40a2e337688b434d7aafa28Christian Maeder-- ANNOTATIONS
24f79601ad5e42ce74f4152a36aad257d7c4d7b5Christian Maeder-------------------
24f79601ad5e42ce74f4152a36aad257d7c4d7b5Christian Maeder
24f79601ad5e42ce74f4152a36aad257d7c4d7b5Christian Maederdata Annotation = Annotation [Annotation] AnnotationProperty AnnotationValue
24f79601ad5e42ce74f4152a36aad257d7c4d7b5Christian Maeder deriving (Show, Eq, Ord)
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maeder
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maederdata AnnotationAxiom
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maeder = AnnotationAssertion [Annotation] IRI
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maeder | SubAnnotationPropertyOf [Annotation] AnnotationProperty AnnotationProperty
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maeder | AnnotationPropertyDomainOrRange AnnotationDomainOrRange [Annotation] AnnotationProperty IRI
79bf169bcae16ce390683c698bae248c1ed6ab13Christian Maeder deriving (Show, Eq, Ord)
09249711700a6acbc40a2e337688b434d7aafa28Christian Maeder
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maederdata AnnotationDomainOrRange = AnnDomain | AnnRange deriving (Show, Eq, Ord)
09249711700a6acbc40a2e337688b434d7aafa28Christian Maeder
d50ea352472823a62196db3cf11fae2af6866ab6Christian MaedershowAnnDomainOrRange :: AnnotationDomainOrRange -> String
d50ea352472823a62196db3cf11fae2af6866ab6Christian MaedershowAnnDomainOrRange dr = case dr of
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maeder AnnDomain -> domainC
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maeder AnnRange -> rangeC
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maeder
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maederdata AnnotationValue
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maeder = AnnValue IRI
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maeder | AnnValLit Literal
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maeder deriving (Show, Eq, Ord)
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maeder
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maedertype SourceIndividual = Individual
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maedertype TargetIndividual = Individual
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maedertype TargetValue = Literal
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maeder
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maederdata EquivOrDisjoint = Equivalent | Disjoint deriving (Show, Eq, Ord)
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maeder
f8a1ab8012a1f36060d6ce9b63399fa4a8a2981cChristian MaedershowEquivOrDisjoint :: EquivOrDisjoint -> String
8452387b4c54b8dd36c012b216e0b0c5004ca6f1Christian MaedershowEquivOrDisjoint ed = case ed of
8452387b4c54b8dd36c012b216e0b0c5004ca6f1Christian Maeder Equivalent -> equivalentToC
f8a1ab8012a1f36060d6ce9b63399fa4a8a2981cChristian Maeder Disjoint -> disjointWithC
f8a1ab8012a1f36060d6ce9b63399fa4a8a2981cChristian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maederdata ObjDomainOrRange = ObjDomain | ObjRange deriving (Show, Eq, Ord)
f875f7eebac7f69bf9da98c93479a542d0a8056fChristian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian MaedershowObjDomainOrRange :: ObjDomainOrRange -> String
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian MaedershowObjDomainOrRange dr = case dr of
ce3928e71520030ad0275b72050a8f4377f9313cChristian Maeder ObjDomain -> domainC
8452387b4c54b8dd36c012b216e0b0c5004ca6f1Christian Maeder ObjRange -> rangeC
8452387b4c54b8dd36c012b216e0b0c5004ca6f1Christian Maeder
f8a1ab8012a1f36060d6ce9b63399fa4a8a2981cChristian Maederdata DataDomainOrRange = DataDomain ClassExpression | DataRange DataRange
9d75ab580dbf51b7ca60903fb32e7f38d939d326Christian Maeder deriving (Show, Eq, Ord)
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maederdata Character =
09249711700a6acbc40a2e337688b434d7aafa28Christian Maeder Functional
09249711700a6acbc40a2e337688b434d7aafa28Christian Maeder | InverseFunctional
f875f7eebac7f69bf9da98c93479a542d0a8056fChristian Maeder | Reflexive
09249711700a6acbc40a2e337688b434d7aafa28Christian Maeder | Irreflexive
09249711700a6acbc40a2e337688b434d7aafa28Christian Maeder | Symmetric
09249711700a6acbc40a2e337688b434d7aafa28Christian Maeder | Asymmetric
09249711700a6acbc40a2e337688b434d7aafa28Christian Maeder | Antisymmetric
09249711700a6acbc40a2e337688b434d7aafa28Christian Maeder | Transitive
09249711700a6acbc40a2e337688b434d7aafa28Christian Maeder deriving (Enum, Bounded, Show, Eq, Ord)
09249711700a6acbc40a2e337688b434d7aafa28Christian Maeder
ce3928e71520030ad0275b72050a8f4377f9313cChristian Maederdata SameOrDifferent = Same | Different deriving (Show, Eq, Ord)
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian MaedershowSameOrDifferent :: SameOrDifferent -> String
341d00318de2d0ea9b6f0ab43f7e4d10ee4fb454Christian MaedershowSameOrDifferent sd = case sd of
84e7cfca5b97aef300acdaa8cf63a3572f9151c0Christian Maeder Same -> sameAsC
09249711700a6acbc40a2e337688b434d7aafa28Christian Maeder Different -> differentFromC
84e7cfca5b97aef300acdaa8cf63a3572f9151c0Christian Maeder
09249711700a6acbc40a2e337688b434d7aafa28Christian Maederdata PositiveOrNegative = Positive | Negative deriving (Show, Eq, Ord)
341d00318de2d0ea9b6f0ab43f7e4d10ee4fb454Christian Maeder
d50ea352472823a62196db3cf11fae2af6866ab6Christian Maederdata SubObjectPropertyExpression
ce3928e71520030ad0275b72050a8f4377f9313cChristian Maeder = OPExpression ObjectPropertyExpression
8452387b4c54b8dd36c012b216e0b0c5004ca6f1Christian Maeder | SubObjectPropertyChain [ObjectPropertyExpression] -- min. 2 ObjectPropertyExpression
5581c4644d91dcb9b7e2e7f6052f7cbf5f97b6deChristian Maeder deriving (Show, Eq, Ord)
5581c4644d91dcb9b7e2e7f6052f7cbf5f97b6deChristian Maeder
5581c4644d91dcb9b7e2e7f6052f7cbf5f97b6deChristian Maederdata EntityType =
5581c4644d91dcb9b7e2e7f6052f7cbf5f97b6deChristian Maeder Datatype
5581c4644d91dcb9b7e2e7f6052f7cbf5f97b6deChristian Maeder | Class
f875f7eebac7f69bf9da98c93479a542d0a8056fChristian Maeder | ObjectProperty
99edc5256de959957a8c27b05ae4ad4f0572233dChristian Maeder | DataProperty
f875f7eebac7f69bf9da98c93479a542d0a8056fChristian Maeder | AnnotationProperty
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder | NamedIndividual
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder deriving (Enum, Bounded, Show, Read, Eq, Ord)
a53f4b7cb8bedee4fb7a8b386efcb47246467948Christian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian MaederentityTypes :: [EntityType]
99edc5256de959957a8c27b05ae4ad4f0572233dChristian MaederentityTypes = [minBound .. maxBound]
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maeder