{-# LANGUAGE TupleSections #-}
module OWL2.ParseAS where
import Prelude hiding (lookup)
import OWL2.AS as AS
import Common.AnnoParser (newlineOrEof, commentLine)
import Common.IRI hiding (parseIRI)
import Common.Parsec
import Common.Lexer (getNumber, value, nestCommentOut)
import qualified Common.GlobalAnnotations as GA (PrefixMap)
import Text.ParserCombinators.Parsec
import Data.Char
import Data.Map (union, fromList)
followedBy :: CharParser st b -> CharParser st a -> CharParser st a
followedBy :: CharParser st b -> CharParser st a -> CharParser st a
followedBy cond :: CharParser st b
cond p :: CharParser st a
p = CharParser st a -> CharParser st a
forall tok st a. GenParser tok st a -> GenParser tok st a
try (CharParser st a -> CharParser st a)
-> CharParser st a -> CharParser st a
forall a b. (a -> b) -> a -> b
$ do
a
r <- CharParser st a
p
CharParser st b -> CharParser st b
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m a
lookAhead CharParser st b
cond
a -> CharParser st a
forall (m :: * -> *) a. Monad m => a -> m a
return a
r
arbitraryLookaheadOption :: [CharParser st a] -> CharParser st a
arbitraryLookaheadOption :: [CharParser st a] -> CharParser st a
arbitraryLookaheadOption p :: [CharParser st a]
p = CharParser st a -> CharParser st a
forall tok st a. GenParser tok st a -> GenParser tok st a
try (CharParser st a -> CharParser st a)
-> CharParser st a -> CharParser st a
forall a b. (a -> b) -> a -> b
$ CharParser st a -> CharParser st a
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m a
lookAhead (CharParser st a -> CharParser st a)
-> CharParser st a -> CharParser st a
forall a b. (a -> b) -> a -> b
$ [CharParser st a] -> CharParser st a
forall s (m :: * -> *) t u a.
Stream s m t =>
[ParsecT s u m a] -> ParsecT s u m a
choice [CharParser st a]
p
manyN :: Int -> CharParser st a -> CharParser st [a]
manyN :: Int -> CharParser st a -> CharParser st [a]
manyN n :: Int
n p :: CharParser st a
p =
(Int -> CharParser st [a] -> CharParser st [a])
-> CharParser st [a] -> [Int] -> CharParser st [a]
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr (\ _ r :: CharParser st [a]
r -> CharParser st a
p CharParser st a -> CharParser st [a] -> CharParser st [a]
forall (m :: * -> *) a. Monad m => m a -> m [a] -> m [a]
<:> CharParser st [a]
r) ([a] -> CharParser st [a]
forall (m :: * -> *) a. Monad m => a -> m a
return []) [1 .. Int
n] CharParser st [a] -> CharParser st [a] -> CharParser st [a]
forall (m :: * -> *) a. Monad m => m [a] -> m [a] -> m [a]
<++>
CharParser st a -> CharParser st [a]
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many CharParser st a
p
never :: CharParser st (Maybe a)
never :: CharParser st (Maybe a)
never = Maybe a -> CharParser st (Maybe a)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe a
forall a. Maybe a
Nothing
comment :: CharParser st String
= CharParser st String -> CharParser st String
forall tok st a. GenParser tok st a -> GenParser tok st a
try (CharParser st String -> CharParser st String)
-> CharParser st String -> CharParser st String
forall a b. (a -> b) -> a -> b
$ do
Char -> ParsecT String st Identity Char
forall s (m :: * -> *) u.
Stream s m Char =>
Char -> ParsecT s u m Char
char '#'
ParsecT String st Identity Char
-> ParsecT String st Identity () -> CharParser st String
forall s (m :: * -> *) t u a end.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m end -> ParsecT s u m [a]
manyTill ParsecT String st Identity Char
forall s (m :: * -> *) u. Stream s m Char => ParsecT s u m Char
anyChar ParsecT String st Identity ()
forall st. GenParser Char st ()
newlineOrEof
skips :: CharParser st a -> CharParser st a
skips :: CharParser st a -> CharParser st a
skips = (CharParser st a -> ParsecT String st Identity () -> CharParser st a
forall (m :: * -> *) a b. Monad m => m a -> m b -> m a
<< ParsecT String st Identity ()
forall st. GenParser Char st ()
skips')
skips' :: CharParser st ()
skips' :: CharParser st ()
skips' = CharParser st () -> CharParser st ()
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m ()
skipMany (ParsecT String st Identity Char -> CharParser st ()
forall (m :: * -> *) a. Monad m => m a -> m ()
forget ParsecT String st Identity Char
forall s (m :: * -> *) u. Stream s m Char => ParsecT s u m Char
space CharParser st () -> CharParser st () -> CharParser st ()
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|> ParsecT String st Identity String -> CharParser st ()
forall (m :: * -> *) a. Monad m => m a -> m ()
forget ParsecT String st Identity String
forall st. CharParser st String
comment CharParser st () -> CharParser st () -> CharParser st ()
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|> ParsecT String st Identity Annotation -> CharParser st ()
forall (m :: * -> *) a. Monad m => m a -> m ()
forget ParsecT String st Identity Annotation
forall st. GenParser Char st Annotation
commentLine CharParser st () -> CharParser st () -> CharParser st ()
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|> CharParser st () -> CharParser st ()
forall (m :: * -> *) a. Monad m => m a -> m ()
forget CharParser st ()
forall st. GenParser Char st ()
nestCommentOut)
keyword :: String -> CharParser st ()
keyword :: String -> CharParser st ()
keyword s :: String
s = CharParser st () -> CharParser st ()
forall tok st a. GenParser tok st a -> GenParser tok st a
try (CharParser st () -> CharParser st ())
-> CharParser st () -> CharParser st ()
forall a b. (a -> b) -> a -> b
$ CharParser st () -> CharParser st ()
forall st a. CharParser st a -> CharParser st a
skips (String -> ParsecT String st Identity String
forall s (m :: * -> *) u.
Stream s m Char =>
String -> ParsecT s u m String
string String
s ParsecT String st Identity String
-> CharParser st () -> CharParser st ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ParsecT String st Identity Char -> CharParser st ()
forall s (m :: * -> *) t a u.
(Stream s m t, Show a) =>
ParsecT s u m a -> ParsecT s u m ()
notFollowedBy ParsecT String st Identity Char
forall s (m :: * -> *) u. Stream s m Char => ParsecT s u m Char
alphaNum)
fullIri :: CharParser st IRI
fullIri :: CharParser st IRI
fullIri = CharParser st IRI -> CharParser st IRI
forall st. IRIParser st IRI -> IRIParser st IRI
angles CharParser st IRI
forall st. IRIParser st IRI
iriParser
ncNameStart :: Char -> Bool
ncNameStart :: Char -> Bool
ncNameStart c :: Char
c = Char -> Bool
isAlpha Char
c Bool -> Bool -> Bool
|| Char
c Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== '_'
ncNameChar :: Char -> Bool
ncNameChar :: Char -> Bool
ncNameChar c :: Char
c = Char -> Bool
isAlphaNum Char
c Bool -> Bool -> Bool
|| Char -> String -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
elem Char
c ".+-_\183"
prefix :: CharParser st String
prefix :: CharParser st String
prefix = CharParser st String -> CharParser st String
forall st a. CharParser st a -> CharParser st a
skips (CharParser st String -> CharParser st String)
-> CharParser st String -> CharParser st String
forall a b. (a -> b) -> a -> b
$ String -> CharParser st String -> CharParser st String
forall s (m :: * -> *) t a u.
Stream s m t =>
a -> ParsecT s u m a -> ParsecT s u m a
option "" ((Char -> Bool) -> ParsecT String st Identity Char
forall s (m :: * -> *) u.
Stream s m Char =>
(Char -> Bool) -> ParsecT s u m Char
satisfy Char -> Bool
ncNameStart ParsecT String st Identity Char
-> CharParser st String -> CharParser st String
forall (m :: * -> *) a. Monad m => m a -> m [a] -> m [a]
<:> ParsecT String st Identity Char -> CharParser st String
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many ((Char -> Bool) -> ParsecT String st Identity Char
forall s (m :: * -> *) u.
Stream s m Char =>
(Char -> Bool) -> ParsecT s u m Char
satisfy Char -> Bool
ncNameChar))
CharParser st String
-> ParsecT String st Identity Char -> CharParser st String
forall (m :: * -> *) a b. Monad m => m a -> m b -> m a
<< Char -> ParsecT String st Identity Char
forall s (m :: * -> *) u.
Stream s m Char =>
Char -> ParsecT s u m Char
char ':'
parseIRI :: GA.PrefixMap -> CharParser st IRI
parseIRI :: PrefixMap -> CharParser st IRI
parseIRI pm :: PrefixMap
pm = CharParser st IRI -> CharParser st IRI
forall st a. CharParser st a -> CharParser st a
skips (PrefixMap -> IRI -> IRI
expandIRI PrefixMap
pm (IRI -> IRI) -> CharParser st IRI -> CharParser st IRI
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (CharParser st IRI
forall st. IRIParser st IRI
fullIri CharParser st IRI -> CharParser st IRI -> CharParser st IRI
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|> CharParser st IRI
forall st. IRIParser st IRI
compoundIriCurie) CharParser st IRI -> String -> CharParser st IRI
forall s u (m :: * -> *) a.
ParsecT s u m a -> String -> ParsecT s u m a
<?> "IRI")
parseEnclosedWithKeyword :: String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword :: String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword s :: String
s p :: CharParser st a
p = do
String -> CharParser st ()
forall st. String -> CharParser st ()
keyword String
s
CharParser st Char -> CharParser st Char
forall st a. CharParser st a -> CharParser st a
skips (CharParser st Char -> CharParser st Char)
-> CharParser st Char -> CharParser st Char
forall a b. (a -> b) -> a -> b
$ Char -> CharParser st Char
forall s (m :: * -> *) u.
Stream s m Char =>
Char -> ParsecT s u m Char
char '('
a
r <- CharParser st a -> CharParser st a
forall st a. CharParser st a -> CharParser st a
skips CharParser st a
p
CharParser st Char -> CharParser st Char
forall st a. CharParser st a -> CharParser st a
skips (CharParser st Char -> CharParser st Char)
-> CharParser st Char -> CharParser st Char
forall a b. (a -> b) -> a -> b
$ Char -> CharParser st Char
forall s (m :: * -> *) u.
Stream s m Char =>
Char -> ParsecT s u m Char
char ')'
a -> CharParser st a
forall (m :: * -> *) a. Monad m => a -> m a
return a
r
parsePrefixDeclaration :: CharParser st (String, IRI)
parsePrefixDeclaration :: CharParser st (String, IRI)
parsePrefixDeclaration = String
-> CharParser st (String, IRI) -> CharParser st (String, IRI)
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "Prefix" (CharParser st (String, IRI) -> CharParser st (String, IRI))
-> CharParser st (String, IRI) -> CharParser st (String, IRI)
forall a b. (a -> b) -> a -> b
$ do
String
p <- CharParser st String
forall st. CharParser st String
prefix
CharParser st Char -> CharParser st Char
forall st a. CharParser st a -> CharParser st a
skips (CharParser st Char -> CharParser st Char)
-> CharParser st Char -> CharParser st Char
forall a b. (a -> b) -> a -> b
$ Char -> CharParser st Char
forall s (m :: * -> *) u.
Stream s m Char =>
Char -> ParsecT s u m Char
char '='
IRI
iri <- CharParser st IRI
forall st. IRIParser st IRI
fullIri
(String, IRI) -> CharParser st (String, IRI)
forall (m :: * -> *) a. Monad m => a -> m a
return ((String, IRI) -> CharParser st (String, IRI))
-> (String, IRI) -> CharParser st (String, IRI)
forall a b. (a -> b) -> a -> b
$ (String
p, IRI
iri)
parseDirectlyImportsDocument :: GA.PrefixMap -> CharParser st IRI
parseDirectlyImportsDocument :: PrefixMap -> CharParser st IRI
parseDirectlyImportsDocument pm :: PrefixMap
pm =
String -> CharParser st IRI -> CharParser st IRI
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "Import" (PrefixMap -> CharParser st IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) CharParser st IRI -> String -> CharParser st IRI
forall s u (m :: * -> *) a.
ParsecT s u m a -> String -> ParsecT s u m a
<?> "Import"
parseEntity' :: GA.PrefixMap -> EntityType -> String -> CharParser st Entity
parseEntity' :: PrefixMap -> EntityType -> String -> CharParser st Entity
parseEntity' pm :: PrefixMap
pm t :: EntityType
t k :: String
k = String -> CharParser st Entity -> CharParser st Entity
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword String
k (CharParser st Entity -> CharParser st Entity)
-> CharParser st Entity -> CharParser st Entity
forall a b. (a -> b) -> a -> b
$ do
IRI
iri <- PrefixMap -> CharParser st IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm
Entity -> CharParser st Entity
forall (m :: * -> *) a. Monad m => a -> m a
return (Entity -> CharParser st Entity) -> Entity -> CharParser st Entity
forall a b. (a -> b) -> a -> b
$ EntityType -> IRI -> Entity
mkEntity EntityType
t IRI
iri
parseEntity :: GA.PrefixMap -> CharParser st Entity
parseEntity :: PrefixMap -> CharParser st Entity
parseEntity pm :: PrefixMap
pm =
PrefixMap -> EntityType -> String -> CharParser st Entity
forall st.
PrefixMap -> EntityType -> String -> CharParser st Entity
parseEntity' PrefixMap
pm EntityType
Class "Class" CharParser st Entity
-> CharParser st Entity -> CharParser st Entity
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> EntityType -> String -> CharParser st Entity
forall st.
PrefixMap -> EntityType -> String -> CharParser st Entity
parseEntity' PrefixMap
pm EntityType
Datatype "Datatype" CharParser st Entity
-> CharParser st Entity -> CharParser st Entity
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> EntityType -> String -> CharParser st Entity
forall st.
PrefixMap -> EntityType -> String -> CharParser st Entity
parseEntity' PrefixMap
pm EntityType
ObjectProperty "ObjectProperty" CharParser st Entity
-> CharParser st Entity -> CharParser st Entity
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> EntityType -> String -> CharParser st Entity
forall st.
PrefixMap -> EntityType -> String -> CharParser st Entity
parseEntity' PrefixMap
pm EntityType
DataProperty "DataProperty" CharParser st Entity
-> CharParser st Entity -> CharParser st Entity
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> EntityType -> String -> CharParser st Entity
forall st.
PrefixMap -> EntityType -> String -> CharParser st Entity
parseEntity' PrefixMap
pm EntityType
AnnotationProperty "AnnotationProperty" CharParser st Entity
-> CharParser st Entity -> CharParser st Entity
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> EntityType -> String -> CharParser st Entity
forall st.
PrefixMap -> EntityType -> String -> CharParser st Entity
parseEntity' PrefixMap
pm EntityType
NamedIndividual "NamedIndividual" CharParser st Entity -> String -> CharParser st Entity
forall s u (m :: * -> *) a.
ParsecT s u m a -> String -> ParsecT s u m a
<?>
"Entity"
charOrEscaped :: CharParser st Char
charOrEscaped :: CharParser st Char
charOrEscaped = (CharParser st Char -> CharParser st Char
forall tok st a. GenParser tok st a -> GenParser tok st a
try (CharParser st Char -> CharParser st Char)
-> CharParser st Char -> CharParser st Char
forall a b. (a -> b) -> a -> b
$ String -> ParsecT String st Identity String
forall s (m :: * -> *) u.
Stream s m Char =>
String -> ParsecT s u m String
string "\\\"" ParsecT String st Identity String
-> CharParser st Char -> CharParser st Char
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Char -> CharParser st Char
forall (m :: * -> *) a. Monad m => a -> m a
return '"')
CharParser st Char -> CharParser st Char -> CharParser st Char
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|> (CharParser st Char -> CharParser st Char
forall tok st a. GenParser tok st a -> GenParser tok st a
try (CharParser st Char -> CharParser st Char)
-> CharParser st Char -> CharParser st Char
forall a b. (a -> b) -> a -> b
$ String -> ParsecT String st Identity String
forall s (m :: * -> *) u.
Stream s m Char =>
String -> ParsecT s u m String
string "\\\\" ParsecT String st Identity String
-> CharParser st Char -> CharParser st Char
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Char -> CharParser st Char
forall (m :: * -> *) a. Monad m => a -> m a
return '\\') CharParser st Char -> CharParser st Char -> CharParser st Char
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|> CharParser st Char
forall s (m :: * -> *) u. Stream s m Char => ParsecT s u m Char
anyChar
parseTypeSignature :: GA.PrefixMap -> CharParser st IRI
parseTypeSignature :: PrefixMap -> CharParser st IRI
parseTypeSignature pm :: PrefixMap
pm = do
String -> ParsecT String st Identity String
forall s (m :: * -> *) u.
Stream s m Char =>
String -> ParsecT s u m String
string "^^"
PrefixMap -> CharParser st IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm
parseLanguageTag :: CharParser st String
parseLanguageTag :: CharParser st String
parseLanguageTag = do
Char -> ParsecT String st Identity Char
forall s (m :: * -> *) u.
Stream s m Char =>
Char -> ParsecT s u m Char
char '@'
ParsecT String st Identity Char -> CharParser st String
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m [a]
many1 (ParsecT String st Identity Char
forall s (m :: * -> *) u. Stream s m Char => ParsecT s u m Char
letter ParsecT String st Identity Char
-> ParsecT String st Identity Char
-> ParsecT String st Identity Char
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|> Char -> ParsecT String st Identity Char
forall s (m :: * -> *) u.
Stream s m Char =>
Char -> ParsecT s u m Char
char '-')
parseLiteral :: GA.PrefixMap -> CharParser st Literal
parseLiteral :: PrefixMap -> CharParser st Literal
parseLiteral pm :: PrefixMap
pm = do
Char -> ParsecT String st Identity Char
forall s (m :: * -> *) u.
Stream s m Char =>
Char -> ParsecT s u m Char
char '"'
String
s <- ParsecT String st Identity Char
-> ParsecT String st Identity Char
-> ParsecT String st Identity String
forall s (m :: * -> *) t u a end.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m end -> ParsecT s u m [a]
manyTill ParsecT String st Identity Char
forall st. CharParser st Char
charOrEscaped (ParsecT String st Identity Char -> ParsecT String st Identity Char
forall tok st a. GenParser tok st a -> GenParser tok st a
try (ParsecT String st Identity Char
-> ParsecT String st Identity Char)
-> ParsecT String st Identity Char
-> ParsecT String st Identity Char
forall a b. (a -> b) -> a -> b
$ Char -> ParsecT String st Identity Char
forall s (m :: * -> *) u.
Stream s m Char =>
Char -> ParsecT s u m Char
char '"')
TypedOrUntyped
typ <- (IRI -> TypedOrUntyped
Typed (IRI -> TypedOrUntyped)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity TypedOrUntyped
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseTypeSignature PrefixMap
pm) ParsecT String st Identity TypedOrUntyped
-> ParsecT String st Identity TypedOrUntyped
-> ParsecT String st Identity TypedOrUntyped
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(Maybe String -> TypedOrUntyped
Untyped (Maybe String -> TypedOrUntyped)
-> ParsecT String st Identity (Maybe String)
-> ParsecT String st Identity TypedOrUntyped
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ParsecT String st Identity String
-> ParsecT String st Identity (Maybe String)
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m (Maybe a)
optionMaybe ParsecT String st Identity String
forall st. CharParser st String
parseLanguageTag)
Literal -> CharParser st Literal
forall (m :: * -> *) a. Monad m => a -> m a
return (Literal -> CharParser st Literal)
-> Literal -> CharParser st Literal
forall a b. (a -> b) -> a -> b
$ String -> TypedOrUntyped -> Literal
Literal String
s TypedOrUntyped
typ
parseAnonymousIndividual :: GA.PrefixMap -> CharParser st AnonymousIndividual
parseAnonymousIndividual :: PrefixMap -> CharParser st IRI
parseAnonymousIndividual pm :: PrefixMap
pm = CharParser st IRI -> CharParser st IRI
forall st a. CharParser st a -> CharParser st a
skips (CharParser st IRI -> CharParser st IRI)
-> CharParser st IRI -> CharParser st IRI
forall a b. (a -> b) -> a -> b
$ PrefixMap -> IRI -> IRI
expandIRI PrefixMap
pm (IRI -> IRI) -> CharParser st IRI -> CharParser st IRI
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CharParser st IRI
forall st. IRIParser st IRI
iriCurie
parseIndividual :: GA.PrefixMap -> CharParser st Individual
parseIndividual :: PrefixMap -> CharParser st IRI
parseIndividual pm :: PrefixMap
pm = PrefixMap -> CharParser st IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm
CharParser st IRI -> CharParser st IRI -> CharParser st IRI
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|> PrefixMap -> CharParser st IRI
forall st. PrefixMap -> CharParser st IRI
parseAnonymousIndividual PrefixMap
pm
CharParser st IRI -> String -> CharParser st IRI
forall s u (m :: * -> *) a.
ParsecT s u m a -> String -> ParsecT s u m a
<?> "Individual"
parseAnnotationValue :: GA.PrefixMap -> CharParser st AnnotationValue
parseAnnotationValue :: PrefixMap -> CharParser st AnnotationValue
parseAnnotationValue pm :: PrefixMap
pm =
(PrefixMap -> CharParser st Literal
forall st. PrefixMap -> CharParser st Literal
parseLiteral PrefixMap
pm CharParser st Literal
-> (Literal -> CharParser st AnnotationValue)
-> CharParser st AnnotationValue
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= AnnotationValue -> CharParser st AnnotationValue
forall (m :: * -> *) a. Monad m => a -> m a
return (AnnotationValue -> CharParser st AnnotationValue)
-> (Literal -> AnnotationValue)
-> Literal
-> CharParser st AnnotationValue
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Literal -> AnnotationValue
AnnValLit) CharParser st AnnotationValue
-> CharParser st AnnotationValue -> CharParser st AnnotationValue
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm CharParser st IRI
-> (IRI -> CharParser st AnnotationValue)
-> CharParser st AnnotationValue
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= AnnotationValue -> CharParser st AnnotationValue
forall (m :: * -> *) a. Monad m => a -> m a
return (AnnotationValue -> CharParser st AnnotationValue)
-> (IRI -> AnnotationValue) -> IRI -> CharParser st AnnotationValue
forall b c a. (b -> c) -> (a -> b) -> a -> c
. IRI -> AnnotationValue
AnnValue) CharParser st AnnotationValue
-> CharParser st AnnotationValue -> CharParser st AnnotationValue
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st IRI
forall st. PrefixMap -> CharParser st IRI
parseAnonymousIndividual PrefixMap
pm CharParser st IRI
-> (IRI -> CharParser st AnnotationValue)
-> CharParser st AnnotationValue
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= AnnotationValue -> CharParser st AnnotationValue
forall (m :: * -> *) a. Monad m => a -> m a
return (AnnotationValue -> CharParser st AnnotationValue)
-> (IRI -> AnnotationValue) -> IRI -> CharParser st AnnotationValue
forall b c a. (b -> c) -> (a -> b) -> a -> c
. IRI -> AnnotationValue
AnnAnInd) CharParser st AnnotationValue
-> String -> CharParser st AnnotationValue
forall s u (m :: * -> *) a.
ParsecT s u m a -> String -> ParsecT s u m a
<?>
"AnnotationValue"
parseAnnotationSubject :: GA.PrefixMap -> CharParser st AnnotationSubject
parseAnnotationSubject :: PrefixMap -> CharParser st AnnotationSubject
parseAnnotationSubject pm :: PrefixMap
pm =
(IRI -> AnnotationSubject
AnnSubAnInd (IRI -> AnnotationSubject)
-> ParsecT String st Identity IRI
-> CharParser st AnnotationSubject
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseAnonymousIndividual PrefixMap
pm) CharParser st AnnotationSubject
-> CharParser st AnnotationSubject
-> CharParser st AnnotationSubject
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(IRI -> AnnotationSubject
AnnSubIri (IRI -> AnnotationSubject)
-> ParsecT String st Identity IRI
-> CharParser st AnnotationSubject
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)
parseAnnotations :: GA.PrefixMap -> CharParser st [Annotation]
parseAnnotations :: PrefixMap -> CharParser st [Annotation]
parseAnnotations pm :: PrefixMap
pm = ParsecT String st Identity Annotation -> CharParser st [Annotation]
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many (ParsecT String st Identity Annotation
-> CharParser st [Annotation])
-> ParsecT String st Identity Annotation
-> CharParser st [Annotation]
forall a b. (a -> b) -> a -> b
$ PrefixMap -> ParsecT String st Identity Annotation
forall st. PrefixMap -> CharParser st Annotation
parseAnnotation PrefixMap
pm
parseAnnotation :: GA.PrefixMap -> CharParser st Annotation
parseAnnotation :: PrefixMap -> CharParser st Annotation
parseAnnotation pm :: PrefixMap
pm = ((CharParser st Annotation -> String -> CharParser st Annotation)
-> String -> CharParser st Annotation -> CharParser st Annotation
forall a b c. (a -> b -> c) -> b -> a -> c
flip CharParser st Annotation -> String -> CharParser st Annotation
forall s u (m :: * -> *) a.
ParsecT s u m a -> String -> ParsecT s u m a
(<?>)) "Annotation" (CharParser st Annotation -> CharParser st Annotation)
-> CharParser st Annotation -> CharParser st Annotation
forall a b. (a -> b) -> a -> b
$
String -> CharParser st Annotation -> CharParser st Annotation
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "Annotation" (CharParser st Annotation -> CharParser st Annotation)
-> CharParser st Annotation -> CharParser st Annotation
forall a b. (a -> b) -> a -> b
$ do
[Annotation]
an <- (CharParser st Annotation -> ParsecT String st Identity [Annotation]
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many (PrefixMap -> CharParser st Annotation
forall st. PrefixMap -> CharParser st Annotation
parseAnnotation PrefixMap
pm))
IRI
property <- (PrefixMap -> CharParser st IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)
AnnotationValue
v <- PrefixMap -> CharParser st AnnotationValue
forall st. PrefixMap -> CharParser st AnnotationValue
parseAnnotationValue PrefixMap
pm
Annotation -> CharParser st Annotation
forall (m :: * -> *) a. Monad m => a -> m a
return (Annotation -> CharParser st Annotation)
-> Annotation -> CharParser st Annotation
forall a b. (a -> b) -> a -> b
$ [Annotation] -> IRI -> AnnotationValue -> Annotation
Annotation [Annotation]
an IRI
property AnnotationValue
v
parseDataJunction' ::
GA.PrefixMap -> String -> JunctionType -> CharParser st DataRange
parseDataJunction' :: PrefixMap -> String -> JunctionType -> CharParser st DataRange
parseDataJunction' pm :: PrefixMap
pm k :: String
k t :: JunctionType
t = String -> CharParser st DataRange -> CharParser st DataRange
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword String
k (CharParser st DataRange -> CharParser st DataRange)
-> CharParser st DataRange -> CharParser st DataRange
forall a b. (a -> b) -> a -> b
$
JunctionType -> [DataRange] -> DataRange
DataJunction JunctionType
t ([DataRange] -> DataRange)
-> ParsecT String st Identity [DataRange]
-> CharParser st DataRange
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Int
-> CharParser st DataRange
-> ParsecT String st Identity [DataRange]
forall st a. Int -> CharParser st a -> CharParser st [a]
manyN 2 (PrefixMap -> CharParser st DataRange
forall st. PrefixMap -> CharParser st DataRange
parseDataRange PrefixMap
pm)
parseDataJunction :: GA.PrefixMap -> CharParser st DataRange
parseDataJunction :: PrefixMap -> CharParser st DataRange
parseDataJunction pm :: PrefixMap
pm =
PrefixMap -> String -> JunctionType -> CharParser st DataRange
forall st.
PrefixMap -> String -> JunctionType -> CharParser st DataRange
parseDataJunction' PrefixMap
pm "DataUnionOf" JunctionType
UnionOf CharParser st DataRange
-> CharParser st DataRange -> CharParser st DataRange
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> String -> JunctionType -> CharParser st DataRange
forall st.
PrefixMap -> String -> JunctionType -> CharParser st DataRange
parseDataJunction' PrefixMap
pm "DataIntersectionOf" JunctionType
IntersectionOf
parseDataComplementOf :: GA.PrefixMap -> CharParser st DataRange
parseDataComplementOf :: PrefixMap -> CharParser st DataRange
parseDataComplementOf pm :: PrefixMap
pm = String -> CharParser st DataRange -> CharParser st DataRange
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DataComplementOf" (CharParser st DataRange -> CharParser st DataRange)
-> CharParser st DataRange -> CharParser st DataRange
forall a b. (a -> b) -> a -> b
$
DataRange -> DataRange
DataComplementOf (DataRange -> DataRange)
-> CharParser st DataRange -> CharParser st DataRange
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> PrefixMap -> CharParser st DataRange
forall st. PrefixMap -> CharParser st DataRange
parseDataRange PrefixMap
pm
parseDataOneOf :: GA.PrefixMap -> CharParser st DataRange
parseDataOneOf :: PrefixMap -> CharParser st DataRange
parseDataOneOf pm :: PrefixMap
pm = String -> CharParser st DataRange -> CharParser st DataRange
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DataOneOf" (CharParser st DataRange -> CharParser st DataRange)
-> CharParser st DataRange -> CharParser st DataRange
forall a b. (a -> b) -> a -> b
$
[Literal] -> DataRange
DataOneOf ([Literal] -> DataRange)
-> ParsecT String st Identity [Literal] -> CharParser st DataRange
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ParsecT String st Identity Literal
-> ParsecT String st Identity [Literal]
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m [a]
many1 (PrefixMap -> ParsecT String st Identity Literal
forall st. PrefixMap -> CharParser st Literal
parseLiteral PrefixMap
pm)
parseDatatypeResComponent ::
GA.PrefixMap -> CharParser st (ConstrainingFacet, RestrictionValue)
parseDatatypeResComponent :: PrefixMap -> CharParser st (IRI, Literal)
parseDatatypeResComponent pm :: PrefixMap
pm =
(,) (IRI -> Literal -> (IRI, Literal))
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (Literal -> (IRI, Literal))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) ParsecT String st Identity (Literal -> (IRI, Literal))
-> ParsecT String st Identity Literal
-> CharParser st (IRI, Literal)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity Literal
forall st. PrefixMap -> CharParser st Literal
parseLiteral PrefixMap
pm)
parseDatatypeRestriction :: GA.PrefixMap -> CharParser st DataRange
parseDatatypeRestriction :: PrefixMap -> CharParser st DataRange
parseDatatypeRestriction pm :: PrefixMap
pm =
String -> CharParser st DataRange -> CharParser st DataRange
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DatatypeRestriction" (CharParser st DataRange -> CharParser st DataRange)
-> CharParser st DataRange -> CharParser st DataRange
forall a b. (a -> b) -> a -> b
$ do
IRI
dataType <- (PrefixMap -> CharParser st IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)
[(IRI, Literal)]
restrictions <- ParsecT String st Identity (IRI, Literal)
-> ParsecT String st Identity [(IRI, Literal)]
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m [a]
many1 (PrefixMap -> ParsecT String st Identity (IRI, Literal)
forall st. PrefixMap -> CharParser st (IRI, Literal)
parseDatatypeResComponent PrefixMap
pm)
DataRange -> CharParser st DataRange
forall (m :: * -> *) a. Monad m => a -> m a
return (DataRange -> CharParser st DataRange)
-> DataRange -> CharParser st DataRange
forall a b. (a -> b) -> a -> b
$ IRI -> [(IRI, Literal)] -> DataRange
DataType IRI
dataType [(IRI, Literal)]
restrictions
parseDataRange :: GA.PrefixMap -> CharParser st DataRange
parseDataRange :: PrefixMap -> CharParser st DataRange
parseDataRange pm :: PrefixMap
pm =
(PrefixMap -> CharParser st DataRange
forall st. PrefixMap -> CharParser st DataRange
parseDataJunction PrefixMap
pm) CharParser st DataRange
-> CharParser st DataRange -> CharParser st DataRange
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st DataRange
forall st. PrefixMap -> CharParser st DataRange
parseDataComplementOf PrefixMap
pm) CharParser st DataRange
-> CharParser st DataRange -> CharParser st DataRange
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st DataRange
forall st. PrefixMap -> CharParser st DataRange
parseDataOneOf PrefixMap
pm) CharParser st DataRange
-> CharParser st DataRange -> CharParser st DataRange
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st DataRange
forall st. PrefixMap -> CharParser st DataRange
parseDatatypeRestriction PrefixMap
pm) CharParser st DataRange
-> CharParser st DataRange -> CharParser st DataRange
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(IRI -> [(IRI, Literal)] -> DataRange
DataType (IRI -> [(IRI, Literal)] -> DataRange)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity ([(IRI, Literal)] -> DataRange)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) ParsecT String st Identity ([(IRI, Literal)] -> DataRange)
-> ParsecT String st Identity [(IRI, Literal)]
-> CharParser st DataRange
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> [(IRI, Literal)] -> ParsecT String st Identity [(IRI, Literal)]
forall (m :: * -> *) a. Monad m => a -> m a
return []) CharParser st DataRange -> String -> CharParser st DataRange
forall s u (m :: * -> *) a.
ParsecT s u m a -> String -> ParsecT s u m a
<?>
"DataRange"
parseDeclaration :: GA.PrefixMap -> CharParser st Axiom
parseDeclaration :: PrefixMap -> CharParser st Axiom
parseDeclaration pm :: PrefixMap
pm = String -> CharParser st Axiom -> CharParser st Axiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "Declaration" (CharParser st Axiom -> CharParser st Axiom)
-> CharParser st Axiom -> CharParser st Axiom
forall a b. (a -> b) -> a -> b
$ do
[Annotation]
annotations <- ParsecT String st Identity Annotation
-> ParsecT String st Identity [Annotation]
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many (PrefixMap -> ParsecT String st Identity Annotation
forall st. PrefixMap -> CharParser st Annotation
parseAnnotation PrefixMap
pm)
Entity
entity <- (PrefixMap -> CharParser st Entity
forall st. PrefixMap -> CharParser st Entity
parseEntity PrefixMap
pm)
Axiom -> CharParser st Axiom
forall (m :: * -> *) a. Monad m => a -> m a
return (Axiom -> CharParser st Axiom) -> Axiom -> CharParser st Axiom
forall a b. (a -> b) -> a -> b
$ [Annotation] -> Entity -> Axiom
Declaration [Annotation]
annotations Entity
entity
parseObjectIntersectionOf :: GA.PrefixMap -> CharParser st ClassExpression
parseObjectIntersectionOf :: PrefixMap -> CharParser st ClassExpression
parseObjectIntersectionOf pm :: PrefixMap
pm = String
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ObjectIntersectionOf" (CharParser st ClassExpression -> CharParser st ClassExpression)
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$
JunctionType -> [ClassExpression] -> ClassExpression
ObjectJunction JunctionType
IntersectionOf ([ClassExpression] -> ClassExpression)
-> ParsecT String st Identity [ClassExpression]
-> CharParser st ClassExpression
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Int
-> CharParser st ClassExpression
-> ParsecT String st Identity [ClassExpression]
forall st a. Int -> CharParser st a -> CharParser st [a]
manyN 2 (PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm)
parseObjectUnionOf :: GA.PrefixMap -> CharParser st ClassExpression
parseObjectUnionOf :: PrefixMap -> CharParser st ClassExpression
parseObjectUnionOf pm :: PrefixMap
pm = String
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ObjectUnionOf" (CharParser st ClassExpression -> CharParser st ClassExpression)
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$
JunctionType -> [ClassExpression] -> ClassExpression
ObjectJunction JunctionType
UnionOf ([ClassExpression] -> ClassExpression)
-> ParsecT String st Identity [ClassExpression]
-> CharParser st ClassExpression
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Int
-> CharParser st ClassExpression
-> ParsecT String st Identity [ClassExpression]
forall st a. Int -> CharParser st a -> CharParser st [a]
manyN 2 (PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm)
parseObjectComplementOf :: GA.PrefixMap -> CharParser st ClassExpression
parseObjectComplementOf :: PrefixMap -> CharParser st ClassExpression
parseObjectComplementOf pm :: PrefixMap
pm = String
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ObjectComplementOf" (CharParser st ClassExpression -> CharParser st ClassExpression)
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$
ClassExpression -> ClassExpression
ObjectComplementOf (ClassExpression -> ClassExpression)
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm)
parseObjectOneOf :: GA.PrefixMap -> CharParser st ClassExpression
parseObjectOneOf :: PrefixMap -> CharParser st ClassExpression
parseObjectOneOf pm :: PrefixMap
pm = String
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ObjectOneOf" (CharParser st ClassExpression -> CharParser st ClassExpression)
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$
[IRI] -> ClassExpression
ObjectOneOf ([IRI] -> ClassExpression)
-> ParsecT String st Identity [IRI]
-> CharParser st ClassExpression
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ParsecT String st Identity IRI -> ParsecT String st Identity [IRI]
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m [a]
many1 (PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIndividual PrefixMap
pm)
parseObjectProperty :: GA.PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectProperty :: PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectProperty pm :: PrefixMap
pm = IRI -> ObjectPropertyExpression
ObjectProp (IRI -> ObjectPropertyExpression)
-> ParsecT String st Identity IRI
-> CharParser st ObjectPropertyExpression
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)
parseInverseObjectProperty ::
GA.PrefixMap -> CharParser st ObjectPropertyExpression
parseInverseObjectProperty :: PrefixMap -> CharParser st ObjectPropertyExpression
parseInverseObjectProperty pm :: PrefixMap
pm = String
-> CharParser st ObjectPropertyExpression
-> CharParser st ObjectPropertyExpression
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ObjectInverseOf" (CharParser st ObjectPropertyExpression
-> CharParser st ObjectPropertyExpression)
-> CharParser st ObjectPropertyExpression
-> CharParser st ObjectPropertyExpression
forall a b. (a -> b) -> a -> b
$
ObjectPropertyExpression -> ObjectPropertyExpression
ObjectInverseOf (ObjectPropertyExpression -> ObjectPropertyExpression)
-> CharParser st ObjectPropertyExpression
-> CharParser st ObjectPropertyExpression
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (PrefixMap -> CharParser st ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectProperty PrefixMap
pm)
parseObjectPropertyExpression ::
GA.PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression :: PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression pm :: PrefixMap
pm =
(PrefixMap -> CharParser st ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseInverseObjectProperty PrefixMap
pm) CharParser st ObjectPropertyExpression
-> CharParser st ObjectPropertyExpression
-> CharParser st ObjectPropertyExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectProperty PrefixMap
pm) CharParser st ObjectPropertyExpression
-> String -> CharParser st ObjectPropertyExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> String -> ParsecT s u m a
<?>
"ObjectPropertyExpression"
parseObjectSomeValuesFrom :: GA.PrefixMap -> CharParser st ClassExpression
parseObjectSomeValuesFrom :: PrefixMap -> CharParser st ClassExpression
parseObjectSomeValuesFrom pm :: PrefixMap
pm =
String
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ObjectSomeValuesFrom" (CharParser st ClassExpression -> CharParser st ClassExpression)
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$ do
ObjectPropertyExpression
objectPropertyExpr <- (PrefixMap -> CharParser st ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm)
ClassExpression
classExpr <- (PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm)
ClassExpression -> CharParser st ClassExpression
forall (m :: * -> *) a. Monad m => a -> m a
return (ClassExpression -> CharParser st ClassExpression)
-> ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$ QuantifierType
-> ObjectPropertyExpression -> ClassExpression -> ClassExpression
ObjectValuesFrom QuantifierType
SomeValuesFrom ObjectPropertyExpression
objectPropertyExpr ClassExpression
classExpr
parseObjectAllValuesFrom :: GA.PrefixMap -> CharParser st ClassExpression
parseObjectAllValuesFrom :: PrefixMap -> CharParser st ClassExpression
parseObjectAllValuesFrom pm :: PrefixMap
pm =
String
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ObjectAllValuesFrom" (CharParser st ClassExpression -> CharParser st ClassExpression)
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$ do
ObjectPropertyExpression
objectPropertyExpr <- (PrefixMap -> CharParser st ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm)
ClassExpression
classExpr <- (PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm)
ClassExpression -> CharParser st ClassExpression
forall (m :: * -> *) a. Monad m => a -> m a
return (ClassExpression -> CharParser st ClassExpression)
-> ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$ QuantifierType
-> ObjectPropertyExpression -> ClassExpression -> ClassExpression
ObjectValuesFrom QuantifierType
AllValuesFrom ObjectPropertyExpression
objectPropertyExpr ClassExpression
classExpr
parseObjectHasValue :: GA.PrefixMap -> CharParser st ClassExpression
parseObjectHasValue :: PrefixMap -> CharParser st ClassExpression
parseObjectHasValue pm :: PrefixMap
pm = String
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ObjectHasValue" (CharParser st ClassExpression -> CharParser st ClassExpression)
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$ do
ObjectPropertyExpression
objectPropertyExpr <- (PrefixMap -> CharParser st ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm)
IRI
val <- (PrefixMap -> CharParser st IRI
forall st. PrefixMap -> CharParser st IRI
parseIndividual PrefixMap
pm)
ClassExpression -> CharParser st ClassExpression
forall (m :: * -> *) a. Monad m => a -> m a
return (ClassExpression -> CharParser st ClassExpression)
-> ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$ ObjectPropertyExpression -> IRI -> ClassExpression
ObjectHasValue ObjectPropertyExpression
objectPropertyExpr IRI
val
parseObjectHasSelf :: GA.PrefixMap -> CharParser st ClassExpression
parseObjectHasSelf :: PrefixMap -> CharParser st ClassExpression
parseObjectHasSelf pm :: PrefixMap
pm = String
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ObjectHasSelf" (CharParser st ClassExpression -> CharParser st ClassExpression)
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$
ObjectPropertyExpression -> ClassExpression
ObjectHasSelf (ObjectPropertyExpression -> ClassExpression)
-> ParsecT String st Identity ObjectPropertyExpression
-> CharParser st ClassExpression
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (PrefixMap -> ParsecT String st Identity ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm)
parseCardinality' :: CardinalityType
-> String
-> CharParser st a
-> CharParser st b
-> CharParser st (Cardinality a b)
parseCardinality' :: CardinalityType
-> String
-> CharParser st a
-> CharParser st b
-> CharParser st (Cardinality a b)
parseCardinality' c :: CardinalityType
c k :: String
k pa :: CharParser st a
pa pb :: CharParser st b
pb = String
-> CharParser st (Cardinality a b)
-> CharParser st (Cardinality a b)
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword String
k (CharParser st (Cardinality a b)
-> CharParser st (Cardinality a b))
-> CharParser st (Cardinality a b)
-> CharParser st (Cardinality a b)
forall a b. (a -> b) -> a -> b
$ do
Int
n <- CharParser st Int -> CharParser st Int
forall st a. CharParser st a -> CharParser st a
skips (CharParser st Int -> CharParser st Int)
-> CharParser st Int -> CharParser st Int
forall a b. (a -> b) -> a -> b
$ Int -> String -> Int
value 10 (String -> Int)
-> ParsecT String st Identity String -> CharParser st Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ParsecT String st Identity String
forall st. CharParser st String
getNumber
a
objectPropertyExpr <- CharParser st a
pa
Maybe b
classExpr <- CharParser st b -> ParsecT String st Identity (Maybe b)
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m (Maybe a)
optionMaybe CharParser st b
pb
Cardinality a b -> CharParser st (Cardinality a b)
forall (m :: * -> *) a. Monad m => a -> m a
return (Cardinality a b -> CharParser st (Cardinality a b))
-> Cardinality a b -> CharParser st (Cardinality a b)
forall a b. (a -> b) -> a -> b
$ CardinalityType -> Int -> a -> Maybe b -> Cardinality a b
forall a b.
CardinalityType -> Int -> a -> Maybe b -> Cardinality a b
Cardinality CardinalityType
c Int
n a
objectPropertyExpr Maybe b
classExpr
parseObjectCardinality :: GA.PrefixMap -> CharParser st ClassExpression
parseObjectCardinality :: PrefixMap -> CharParser st ClassExpression
parseObjectCardinality pm :: PrefixMap
pm = Cardinality ObjectPropertyExpression ClassExpression
-> ClassExpression
ObjectCardinality (Cardinality ObjectPropertyExpression ClassExpression
-> ClassExpression)
-> ParsecT
String
st
Identity
(Cardinality ObjectPropertyExpression ClassExpression)
-> CharParser st ClassExpression
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (
String
-> CardinalityType
-> ParsecT
String
st
Identity
(Cardinality ObjectPropertyExpression ClassExpression)
forall st.
String
-> CardinalityType
-> CharParser
st (Cardinality ObjectPropertyExpression ClassExpression)
cardinality "ObjectMinCardinality" CardinalityType
MinCardinality ParsecT
String
st
Identity
(Cardinality ObjectPropertyExpression ClassExpression)
-> ParsecT
String
st
Identity
(Cardinality ObjectPropertyExpression ClassExpression)
-> ParsecT
String
st
Identity
(Cardinality ObjectPropertyExpression ClassExpression)
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
String
-> CardinalityType
-> ParsecT
String
st
Identity
(Cardinality ObjectPropertyExpression ClassExpression)
forall st.
String
-> CardinalityType
-> CharParser
st (Cardinality ObjectPropertyExpression ClassExpression)
cardinality "ObjectMaxCardinality" CardinalityType
MaxCardinality ParsecT
String
st
Identity
(Cardinality ObjectPropertyExpression ClassExpression)
-> ParsecT
String
st
Identity
(Cardinality ObjectPropertyExpression ClassExpression)
-> ParsecT
String
st
Identity
(Cardinality ObjectPropertyExpression ClassExpression)
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
String
-> CardinalityType
-> ParsecT
String
st
Identity
(Cardinality ObjectPropertyExpression ClassExpression)
forall st.
String
-> CardinalityType
-> CharParser
st (Cardinality ObjectPropertyExpression ClassExpression)
cardinality "ObjectExactCardinality" CardinalityType
ExactCardinality
)
where cardinality :: String
-> CardinalityType
-> CharParser
st (Cardinality ObjectPropertyExpression ClassExpression)
cardinality s :: String
s t :: CardinalityType
t = CardinalityType
-> String
-> CharParser st ObjectPropertyExpression
-> CharParser st ClassExpression
-> CharParser
st (Cardinality ObjectPropertyExpression ClassExpression)
forall st a b.
CardinalityType
-> String
-> CharParser st a
-> CharParser st b
-> CharParser st (Cardinality a b)
parseCardinality' CardinalityType
t String
s CharParser st ObjectPropertyExpression
forall st. CharParser st ObjectPropertyExpression
a CharParser st ClassExpression
forall st. CharParser st ClassExpression
b
a :: CharParser st ObjectPropertyExpression
a = (PrefixMap -> CharParser st ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm)
b :: CharParser st ClassExpression
b = (PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm)
parseDataCardinality :: GA.PrefixMap -> CharParser st ClassExpression
parseDataCardinality :: PrefixMap -> CharParser st ClassExpression
parseDataCardinality pm :: PrefixMap
pm = Cardinality IRI DataRange -> ClassExpression
DataCardinality (Cardinality IRI DataRange -> ClassExpression)
-> ParsecT String st Identity (Cardinality IRI DataRange)
-> CharParser st ClassExpression
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (
String
-> CardinalityType
-> ParsecT String st Identity (Cardinality IRI DataRange)
forall st.
String
-> CardinalityType -> CharParser st (Cardinality IRI DataRange)
cardinality "DataMinCardinality" CardinalityType
MinCardinality ParsecT String st Identity (Cardinality IRI DataRange)
-> ParsecT String st Identity (Cardinality IRI DataRange)
-> ParsecT String st Identity (Cardinality IRI DataRange)
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
String
-> CardinalityType
-> ParsecT String st Identity (Cardinality IRI DataRange)
forall st.
String
-> CardinalityType -> CharParser st (Cardinality IRI DataRange)
cardinality "DataMaxCardinality" CardinalityType
MaxCardinality ParsecT String st Identity (Cardinality IRI DataRange)
-> ParsecT String st Identity (Cardinality IRI DataRange)
-> ParsecT String st Identity (Cardinality IRI DataRange)
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
String
-> CardinalityType
-> ParsecT String st Identity (Cardinality IRI DataRange)
forall st.
String
-> CardinalityType -> CharParser st (Cardinality IRI DataRange)
cardinality "DataExactCardinality" CardinalityType
ExactCardinality
)
where cardinality :: String
-> CardinalityType -> CharParser st (Cardinality IRI DataRange)
cardinality s :: String
s t :: CardinalityType
t = CardinalityType
-> String
-> CharParser st IRI
-> CharParser st DataRange
-> CharParser st (Cardinality IRI DataRange)
forall st a b.
CardinalityType
-> String
-> CharParser st a
-> CharParser st b
-> CharParser st (Cardinality a b)
parseCardinality' CardinalityType
t String
s CharParser st IRI
forall st. IRIParser st IRI
a CharParser st DataRange
forall st. CharParser st DataRange
b
a :: CharParser st IRI
a = (PrefixMap -> CharParser st IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)
b :: CharParser st DataRange
b = (PrefixMap -> CharParser st DataRange
forall st. PrefixMap -> CharParser st DataRange
parseDataRange PrefixMap
pm)
parseDataSomeValuesFrom :: GA.PrefixMap -> CharParser st ClassExpression
parseDataSomeValuesFrom :: PrefixMap -> CharParser st ClassExpression
parseDataSomeValuesFrom pm :: PrefixMap
pm = String
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DataSomeValuesFrom" (CharParser st ClassExpression -> CharParser st ClassExpression)
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$ do
[IRI]
exprs <- ParsecT String st Identity IRI -> ParsecT String st Identity [IRI]
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m [a]
many1 (CharParser st DataRange
-> ParsecT String st Identity IRI -> ParsecT String st Identity IRI
forall st b a.
CharParser st b -> CharParser st a -> CharParser st a
followedBy
((PrefixMap -> CharParser st DataRange
forall st. PrefixMap -> CharParser st DataRange
parseDataRange PrefixMap
pm))
((PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)))
DataRange
range <- (PrefixMap -> CharParser st DataRange
forall st. PrefixMap -> CharParser st DataRange
parseDataRange PrefixMap
pm)
ClassExpression -> CharParser st ClassExpression
forall (m :: * -> *) a. Monad m => a -> m a
return (ClassExpression -> CharParser st ClassExpression)
-> ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$ QuantifierType -> [IRI] -> DataRange -> ClassExpression
DataValuesFrom QuantifierType
SomeValuesFrom [IRI]
exprs DataRange
range
parseDataAllValuesFrom :: GA.PrefixMap -> CharParser st ClassExpression
parseDataAllValuesFrom :: PrefixMap -> CharParser st ClassExpression
parseDataAllValuesFrom pm :: PrefixMap
pm = String
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DataAllValuesFrom" (CharParser st ClassExpression -> CharParser st ClassExpression)
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$ do
[IRI]
exprs <- ParsecT String st Identity IRI -> ParsecT String st Identity [IRI]
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m [a]
many1 (CharParser st DataRange
-> ParsecT String st Identity IRI -> ParsecT String st Identity IRI
forall st b a.
CharParser st b -> CharParser st a -> CharParser st a
followedBy (PrefixMap -> CharParser st DataRange
forall st. PrefixMap -> CharParser st DataRange
parseDataRange PrefixMap
pm) ((PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)))
DataRange
range <- (PrefixMap -> CharParser st DataRange
forall st. PrefixMap -> CharParser st DataRange
parseDataRange PrefixMap
pm)
ClassExpression -> CharParser st ClassExpression
forall (m :: * -> *) a. Monad m => a -> m a
return (ClassExpression -> CharParser st ClassExpression)
-> ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$ QuantifierType -> [IRI] -> DataRange -> ClassExpression
DataValuesFrom QuantifierType
AllValuesFrom [IRI]
exprs DataRange
range
parseDataHasValue :: GA.PrefixMap -> CharParser st ClassExpression
parseDataHasValue :: PrefixMap -> CharParser st ClassExpression
parseDataHasValue pm :: PrefixMap
pm = String
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DataHasValue" (CharParser st ClassExpression -> CharParser st ClassExpression)
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall a b. (a -> b) -> a -> b
$
IRI -> Literal -> ClassExpression
DataHasValue (IRI -> Literal -> ClassExpression)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (Literal -> ClassExpression)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) ParsecT String st Identity (Literal -> ClassExpression)
-> ParsecT String st Identity Literal
-> CharParser st ClassExpression
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (PrefixMap -> ParsecT String st Identity Literal
forall st. PrefixMap -> CharParser st Literal
parseLiteral PrefixMap
pm)
parseClassExpression :: GA.PrefixMap -> CharParser st ClassExpression
parseClassExpression :: PrefixMap -> CharParser st ClassExpression
parseClassExpression pm :: PrefixMap
pm =
(PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseObjectIntersectionOf PrefixMap
pm) CharParser st ClassExpression
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseObjectUnionOf PrefixMap
pm) CharParser st ClassExpression
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseObjectComplementOf PrefixMap
pm) CharParser st ClassExpression
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseObjectOneOf PrefixMap
pm) CharParser st ClassExpression
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseObjectCardinality PrefixMap
pm) CharParser st ClassExpression
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseObjectSomeValuesFrom PrefixMap
pm) CharParser st ClassExpression
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseObjectAllValuesFrom PrefixMap
pm) CharParser st ClassExpression
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseObjectHasValue PrefixMap
pm) CharParser st ClassExpression
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseObjectHasSelf PrefixMap
pm) CharParser st ClassExpression
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseDataSomeValuesFrom PrefixMap
pm) CharParser st ClassExpression
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseDataAllValuesFrom PrefixMap
pm) CharParser st ClassExpression
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseDataHasValue PrefixMap
pm) CharParser st ClassExpression
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseDataCardinality PrefixMap
pm) CharParser st ClassExpression
-> CharParser st ClassExpression -> CharParser st ClassExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(IRI -> ClassExpression
Expression (IRI -> ClassExpression)
-> ParsecT String st Identity IRI -> CharParser st ClassExpression
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)) CharParser st ClassExpression
-> String -> CharParser st ClassExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> String -> ParsecT s u m a
<?>
"ClassExpression"
parseSubClassOf :: GA.PrefixMap -> CharParser st ClassAxiom
parseSubClassOf :: PrefixMap -> CharParser st ClassAxiom
parseSubClassOf pm :: PrefixMap
pm = String -> CharParser st ClassAxiom -> CharParser st ClassAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "SubClassOf" (CharParser st ClassAxiom -> CharParser st ClassAxiom)
-> CharParser st ClassAxiom -> CharParser st ClassAxiom
forall a b. (a -> b) -> a -> b
$ do
[Annotation]
annotations <- ParsecT String st Identity Annotation
-> ParsecT String st Identity [Annotation]
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many (PrefixMap -> ParsecT String st Identity Annotation
forall st. PrefixMap -> CharParser st Annotation
parseAnnotation PrefixMap
pm)
ClassExpression
subClassExpression <- (PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm)
ClassExpression
superClassExpression <- (PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm)
ClassAxiom -> CharParser st ClassAxiom
forall (m :: * -> *) a. Monad m => a -> m a
return (ClassAxiom -> CharParser st ClassAxiom)
-> ClassAxiom -> CharParser st ClassAxiom
forall a b. (a -> b) -> a -> b
$ [Annotation] -> ClassExpression -> ClassExpression -> ClassAxiom
SubClassOf [Annotation]
annotations ClassExpression
subClassExpression ClassExpression
superClassExpression
parseEquivalentClasses :: GA.PrefixMap -> CharParser st ClassAxiom
parseEquivalentClasses :: PrefixMap -> CharParser st ClassAxiom
parseEquivalentClasses pm :: PrefixMap
pm = String -> CharParser st ClassAxiom -> CharParser st ClassAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "EquivalentClasses" (CharParser st ClassAxiom -> CharParser st ClassAxiom)
-> CharParser st ClassAxiom -> CharParser st ClassAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> [ClassExpression] -> ClassAxiom
EquivalentClasses ([Annotation] -> [ClassExpression] -> ClassAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity ([ClassExpression] -> ClassAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT String st Identity ([ClassExpression] -> ClassAxiom)
-> ParsecT String st Identity [ClassExpression]
-> CharParser st ClassAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
Int
-> CharParser st ClassExpression
-> ParsecT String st Identity [ClassExpression]
forall st a. Int -> CharParser st a -> CharParser st [a]
manyN 2 (PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm)
parseDisjointClasses :: GA.PrefixMap -> CharParser st ClassAxiom
parseDisjointClasses :: PrefixMap -> CharParser st ClassAxiom
parseDisjointClasses pm :: PrefixMap
pm = String -> CharParser st ClassAxiom -> CharParser st ClassAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DisjointClasses" (CharParser st ClassAxiom -> CharParser st ClassAxiom)
-> CharParser st ClassAxiom -> CharParser st ClassAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> [ClassExpression] -> ClassAxiom
DisjointClasses ([Annotation] -> [ClassExpression] -> ClassAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity ([ClassExpression] -> ClassAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT String st Identity ([ClassExpression] -> ClassAxiom)
-> ParsecT String st Identity [ClassExpression]
-> CharParser st ClassAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
Int
-> CharParser st ClassExpression
-> ParsecT String st Identity [ClassExpression]
forall st a. Int -> CharParser st a -> CharParser st [a]
manyN 2 (PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm)
parseDisjointUnion :: GA.PrefixMap -> CharParser st ClassAxiom
parseDisjointUnion :: PrefixMap -> CharParser st ClassAxiom
parseDisjointUnion pm :: PrefixMap
pm = String -> CharParser st ClassAxiom -> CharParser st ClassAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DisjointUnion" (CharParser st ClassAxiom -> CharParser st ClassAxiom)
-> CharParser st ClassAxiom -> CharParser st ClassAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> IRI -> [ClassExpression] -> ClassAxiom
DisjointUnion ([Annotation] -> IRI -> [ClassExpression] -> ClassAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT
String st Identity (IRI -> [ClassExpression] -> ClassAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT String st Identity (IRI -> [ClassExpression] -> ClassAxiom)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity ([ClassExpression] -> ClassAxiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) ParsecT String st Identity ([ClassExpression] -> ClassAxiom)
-> ParsecT String st Identity [ClassExpression]
-> CharParser st ClassAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
Int
-> CharParser st ClassExpression
-> ParsecT String st Identity [ClassExpression]
forall st a. Int -> CharParser st a -> CharParser st [a]
manyN 2 (PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm)
parseClassAxiom :: GA.PrefixMap -> CharParser st Axiom
parseClassAxiom :: PrefixMap -> CharParser st Axiom
parseClassAxiom pm :: PrefixMap
pm = ClassAxiom -> Axiom
ClassAxiom (ClassAxiom -> Axiom)
-> ParsecT String st Identity ClassAxiom -> CharParser st Axiom
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (
(PrefixMap -> ParsecT String st Identity ClassAxiom
forall st. PrefixMap -> CharParser st ClassAxiom
parseSubClassOf PrefixMap
pm) ParsecT String st Identity ClassAxiom
-> ParsecT String st Identity ClassAxiom
-> ParsecT String st Identity ClassAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity ClassAxiom
forall st. PrefixMap -> CharParser st ClassAxiom
parseEquivalentClasses PrefixMap
pm) ParsecT String st Identity ClassAxiom
-> ParsecT String st Identity ClassAxiom
-> ParsecT String st Identity ClassAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity ClassAxiom
forall st. PrefixMap -> CharParser st ClassAxiom
parseDisjointClasses PrefixMap
pm) ParsecT String st Identity ClassAxiom
-> ParsecT String st Identity ClassAxiom
-> ParsecT String st Identity ClassAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity ClassAxiom
forall st. PrefixMap -> CharParser st ClassAxiom
parseDisjointUnion PrefixMap
pm) ParsecT String st Identity ClassAxiom
-> String -> ParsecT String st Identity ClassAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> String -> ParsecT s u m a
<?> "ClassAxiom"
)
parseEquivalentObjectProperties ::
GA.PrefixMap -> CharParser st ObjectPropertyAxiom
parseEquivalentObjectProperties :: PrefixMap -> CharParser st ObjectPropertyAxiom
parseEquivalentObjectProperties pm :: PrefixMap
pm =
String
-> CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "EquivalentObjectProperties" (CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom)
-> CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> [ObjectPropertyExpression] -> ObjectPropertyAxiom
EquivalentObjectProperties ([Annotation] -> [ObjectPropertyExpression] -> ObjectPropertyAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT
String
st
Identity
([ObjectPropertyExpression] -> ObjectPropertyAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT
String
st
Identity
([ObjectPropertyExpression] -> ObjectPropertyAxiom)
-> ParsecT String st Identity [ObjectPropertyExpression]
-> CharParser st ObjectPropertyAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
Int
-> CharParser st ObjectPropertyExpression
-> ParsecT String st Identity [ObjectPropertyExpression]
forall st a. Int -> CharParser st a -> CharParser st [a]
manyN 2 (PrefixMap -> CharParser st ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm)
parseDisjointObjectProperties ::
GA.PrefixMap -> CharParser st ObjectPropertyAxiom
parseDisjointObjectProperties :: PrefixMap -> CharParser st ObjectPropertyAxiom
parseDisjointObjectProperties pm :: PrefixMap
pm =
String
-> CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DisjointObjectProperties" (CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom)
-> CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> [ObjectPropertyExpression] -> ObjectPropertyAxiom
DisjointObjectProperties ([Annotation] -> [ObjectPropertyExpression] -> ObjectPropertyAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT
String
st
Identity
([ObjectPropertyExpression] -> ObjectPropertyAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT
String
st
Identity
([ObjectPropertyExpression] -> ObjectPropertyAxiom)
-> ParsecT String st Identity [ObjectPropertyExpression]
-> CharParser st ObjectPropertyAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
Int
-> CharParser st ObjectPropertyExpression
-> ParsecT String st Identity [ObjectPropertyExpression]
forall st a. Int -> CharParser st a -> CharParser st [a]
manyN 2 (PrefixMap -> CharParser st ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm)
parseObjectPropertyDomain :: GA.PrefixMap -> CharParser st ObjectPropertyAxiom
parseObjectPropertyDomain :: PrefixMap -> CharParser st ObjectPropertyAxiom
parseObjectPropertyDomain pm :: PrefixMap
pm =
String
-> CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ObjectPropertyDomain" (CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom)
-> CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation]
-> ObjectPropertyExpression
-> ClassExpression
-> ObjectPropertyAxiom
ObjectPropertyDomain ([Annotation]
-> ObjectPropertyExpression
-> ClassExpression
-> ObjectPropertyAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT
String
st
Identity
(ObjectPropertyExpression
-> ClassExpression -> ObjectPropertyAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT
String
st
Identity
(ObjectPropertyExpression
-> ClassExpression -> ObjectPropertyAxiom)
-> ParsecT String st Identity ObjectPropertyExpression
-> ParsecT
String st Identity (ClassExpression -> ObjectPropertyAxiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm) ParsecT String st Identity (ClassExpression -> ObjectPropertyAxiom)
-> ParsecT String st Identity ClassExpression
-> CharParser st ObjectPropertyAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm)
parseObjectPropertyRange ::
GA.PrefixMap -> CharParser st ObjectPropertyAxiom
parseObjectPropertyRange :: PrefixMap -> CharParser st ObjectPropertyAxiom
parseObjectPropertyRange pm :: PrefixMap
pm =
String
-> CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ObjectPropertyRange" (CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom)
-> CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation]
-> ObjectPropertyExpression
-> ClassExpression
-> ObjectPropertyAxiom
ObjectPropertyRange ([Annotation]
-> ObjectPropertyExpression
-> ClassExpression
-> ObjectPropertyAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT
String
st
Identity
(ObjectPropertyExpression
-> ClassExpression -> ObjectPropertyAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT
String
st
Identity
(ObjectPropertyExpression
-> ClassExpression -> ObjectPropertyAxiom)
-> ParsecT String st Identity ObjectPropertyExpression
-> ParsecT
String st Identity (ClassExpression -> ObjectPropertyAxiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm) ParsecT String st Identity (ClassExpression -> ObjectPropertyAxiom)
-> ParsecT String st Identity ClassExpression
-> CharParser st ObjectPropertyAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm)
parseInverseObjectProperties ::
GA.PrefixMap -> CharParser st ObjectPropertyAxiom
parseInverseObjectProperties :: PrefixMap -> CharParser st ObjectPropertyAxiom
parseInverseObjectProperties pm :: PrefixMap
pm =
String
-> CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "InverseObjectProperties" (CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom)
-> CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation]
-> ObjectPropertyExpression
-> ObjectPropertyExpression
-> ObjectPropertyAxiom
InverseObjectProperties ([Annotation]
-> ObjectPropertyExpression
-> ObjectPropertyExpression
-> ObjectPropertyAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT
String
st
Identity
(ObjectPropertyExpression
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT
String
st
Identity
(ObjectPropertyExpression
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> ParsecT String st Identity ObjectPropertyExpression
-> ParsecT
String
st
Identity
(ObjectPropertyExpression -> ObjectPropertyAxiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm) ParsecT
String
st
Identity
(ObjectPropertyExpression -> ObjectPropertyAxiom)
-> ParsecT String st Identity ObjectPropertyExpression
-> CharParser st ObjectPropertyAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm)
parseObjectPropertyExpressionChain ::
GA.PrefixMap -> CharParser st PropertyExpressionChain
parseObjectPropertyExpressionChain :: PrefixMap -> CharParser st [ObjectPropertyExpression]
parseObjectPropertyExpressionChain pm :: PrefixMap
pm =
String
-> CharParser st [ObjectPropertyExpression]
-> CharParser st [ObjectPropertyExpression]
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ObjectPropertyChain" (CharParser st [ObjectPropertyExpression]
-> CharParser st [ObjectPropertyExpression])
-> CharParser st [ObjectPropertyExpression]
-> CharParser st [ObjectPropertyExpression]
forall a b. (a -> b) -> a -> b
$
ParsecT String st Identity ObjectPropertyExpression
-> CharParser st [ObjectPropertyExpression]
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m [a]
many1 (PrefixMap -> ParsecT String st Identity ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm)
parseSubObjectPropertyExpression ::
GA.PrefixMap -> CharParser st SubObjectPropertyExpression
parseSubObjectPropertyExpression :: PrefixMap -> CharParser st SubObjectPropertyExpression
parseSubObjectPropertyExpression pm :: PrefixMap
pm =
[ObjectPropertyExpression] -> SubObjectPropertyExpression
SubObjPropExpr_exprchain ([ObjectPropertyExpression] -> SubObjectPropertyExpression)
-> ParsecT String st Identity [ObjectPropertyExpression]
-> CharParser st SubObjectPropertyExpression
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (PrefixMap -> ParsecT String st Identity [ObjectPropertyExpression]
forall st. PrefixMap -> CharParser st [ObjectPropertyExpression]
parseObjectPropertyExpressionChain PrefixMap
pm) CharParser st SubObjectPropertyExpression
-> CharParser st SubObjectPropertyExpression
-> CharParser st SubObjectPropertyExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
ObjectPropertyExpression -> SubObjectPropertyExpression
SubObjPropExpr_obj (ObjectPropertyExpression -> SubObjectPropertyExpression)
-> ParsecT String st Identity ObjectPropertyExpression
-> CharParser st SubObjectPropertyExpression
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (PrefixMap -> ParsecT String st Identity ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm) CharParser st SubObjectPropertyExpression
-> String -> CharParser st SubObjectPropertyExpression
forall s u (m :: * -> *) a.
ParsecT s u m a -> String -> ParsecT s u m a
<?>
"SubObjectPropertyExpression"
parseSubObjectPropertyOf ::
GA.PrefixMap -> CharParser st ObjectPropertyAxiom
parseSubObjectPropertyOf :: PrefixMap -> CharParser st ObjectPropertyAxiom
parseSubObjectPropertyOf pm :: PrefixMap
pm = String
-> CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "SubObjectPropertyOf" (CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom)
-> CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation]
-> SubObjectPropertyExpression
-> ObjectPropertyExpression
-> ObjectPropertyAxiom
SubObjectPropertyOf ([Annotation]
-> SubObjectPropertyExpression
-> ObjectPropertyExpression
-> ObjectPropertyAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT
String
st
Identity
(SubObjectPropertyExpression
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT
String
st
Identity
(SubObjectPropertyExpression
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> ParsecT String st Identity SubObjectPropertyExpression
-> ParsecT
String
st
Identity
(ObjectPropertyExpression -> ObjectPropertyAxiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity SubObjectPropertyExpression
forall st. PrefixMap -> CharParser st SubObjectPropertyExpression
parseSubObjectPropertyExpression PrefixMap
pm) ParsecT
String
st
Identity
(ObjectPropertyExpression -> ObjectPropertyAxiom)
-> ParsecT String st Identity ObjectPropertyExpression
-> CharParser st ObjectPropertyAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm)
parseCOPA :: GA.PrefixMap -> (
AxiomAnnotations -> ObjectPropertyExpression -> ObjectPropertyAxiom
) -> String -> CharParser st ObjectPropertyAxiom
parseCOPA :: PrefixMap
-> ([Annotation]
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> String
-> CharParser st ObjectPropertyAxiom
parseCOPA pm :: PrefixMap
pm c :: [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
c s :: String
s = String
-> CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword String
s (CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom)
-> CharParser st ObjectPropertyAxiom
-> CharParser st ObjectPropertyAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
c ([Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT
String
st
Identity
(ObjectPropertyExpression -> ObjectPropertyAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT
String
st
Identity
(ObjectPropertyExpression -> ObjectPropertyAxiom)
-> ParsecT String st Identity ObjectPropertyExpression
-> CharParser st ObjectPropertyAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm)
parseObjectPropertyAxiom :: GA.PrefixMap -> CharParser st Axiom
parseObjectPropertyAxiom :: PrefixMap -> CharParser st Axiom
parseObjectPropertyAxiom pm :: PrefixMap
pm = ObjectPropertyAxiom -> Axiom
ObjectPropertyAxiom (ObjectPropertyAxiom -> Axiom)
-> ParsecT String st Identity ObjectPropertyAxiom
-> CharParser st Axiom
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (
(PrefixMap -> ParsecT String st Identity ObjectPropertyAxiom
forall st. PrefixMap -> CharParser st ObjectPropertyAxiom
parseSubObjectPropertyOf PrefixMap
pm) ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity ObjectPropertyAxiom
forall st. PrefixMap -> CharParser st ObjectPropertyAxiom
parseEquivalentObjectProperties PrefixMap
pm) ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity ObjectPropertyAxiom
forall st. PrefixMap -> CharParser st ObjectPropertyAxiom
parseDisjointObjectProperties PrefixMap
pm) ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity ObjectPropertyAxiom
forall st. PrefixMap -> CharParser st ObjectPropertyAxiom
parseObjectPropertyDomain PrefixMap
pm) ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity ObjectPropertyAxiom
forall st. PrefixMap -> CharParser st ObjectPropertyAxiom
parseObjectPropertyRange PrefixMap
pm) ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity ObjectPropertyAxiom
forall st. PrefixMap -> CharParser st ObjectPropertyAxiom
parseInverseObjectProperties PrefixMap
pm) ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap
-> ([Annotation]
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> String
-> ParsecT String st Identity ObjectPropertyAxiom
forall st.
PrefixMap
-> ([Annotation]
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> String
-> CharParser st ObjectPropertyAxiom
parseCOPA PrefixMap
pm [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
FunctionalObjectProperty "FunctionalObjectProperty" ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap
-> ([Annotation]
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> String
-> ParsecT String st Identity ObjectPropertyAxiom
forall st.
PrefixMap
-> ([Annotation]
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> String
-> CharParser st ObjectPropertyAxiom
parseCOPA PrefixMap
pm [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
InverseFunctionalObjectProperty
"InverseFunctionalObjectProperty" ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap
-> ([Annotation]
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> String
-> ParsecT String st Identity ObjectPropertyAxiom
forall st.
PrefixMap
-> ([Annotation]
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> String
-> CharParser st ObjectPropertyAxiom
parseCOPA PrefixMap
pm [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
ReflexiveObjectProperty "ReflexiveObjectProperty" ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap
-> ([Annotation]
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> String
-> ParsecT String st Identity ObjectPropertyAxiom
forall st.
PrefixMap
-> ([Annotation]
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> String
-> CharParser st ObjectPropertyAxiom
parseCOPA PrefixMap
pm [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
IrreflexiveObjectProperty "IrreflexiveObjectProperty" ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap
-> ([Annotation]
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> String
-> ParsecT String st Identity ObjectPropertyAxiom
forall st.
PrefixMap
-> ([Annotation]
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> String
-> CharParser st ObjectPropertyAxiom
parseCOPA PrefixMap
pm [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
SymmetricObjectProperty "SymmetricObjectProperty" ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap
-> ([Annotation]
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> String
-> ParsecT String st Identity ObjectPropertyAxiom
forall st.
PrefixMap
-> ([Annotation]
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> String
-> CharParser st ObjectPropertyAxiom
parseCOPA PrefixMap
pm [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
AsymmetricObjectProperty "AsymmetricObjectProperty" ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
-> ParsecT String st Identity ObjectPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap
-> ([Annotation]
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> String
-> ParsecT String st Identity ObjectPropertyAxiom
forall st.
PrefixMap
-> ([Annotation]
-> ObjectPropertyExpression -> ObjectPropertyAxiom)
-> String
-> CharParser st ObjectPropertyAxiom
parseCOPA PrefixMap
pm [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
TransitiveObjectProperty "TransitiveObjectProperty" ParsecT String st Identity ObjectPropertyAxiom
-> String -> ParsecT String st Identity ObjectPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> String -> ParsecT s u m a
<?>
"ObjectPropertyAxiom"
)
parseSubDataPropertyOf :: GA.PrefixMap -> CharParser st DataPropertyAxiom
parseSubDataPropertyOf :: PrefixMap -> CharParser st DataPropertyAxiom
parseSubDataPropertyOf pm :: PrefixMap
pm = String
-> CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "SubDataPropertyOf" (CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom)
-> CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> IRI -> IRI -> DataPropertyAxiom
SubDataPropertyOf ([Annotation] -> IRI -> IRI -> DataPropertyAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity (IRI -> IRI -> DataPropertyAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm ParsecT String st Identity (IRI -> IRI -> DataPropertyAxiom)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (IRI -> DataPropertyAxiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) ParsecT String st Identity (IRI -> DataPropertyAxiom)
-> ParsecT String st Identity IRI
-> CharParser st DataPropertyAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)
parseEquivalentDataProperties :: GA.PrefixMap -> CharParser st DataPropertyAxiom
parseEquivalentDataProperties :: PrefixMap -> CharParser st DataPropertyAxiom
parseEquivalentDataProperties pm :: PrefixMap
pm =
String
-> CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "EquivalentDataProperties" (CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom)
-> CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> [IRI] -> DataPropertyAxiom
EquivalentDataProperties ([Annotation] -> [IRI] -> DataPropertyAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity ([IRI] -> DataPropertyAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT String st Identity ([IRI] -> DataPropertyAxiom)
-> ParsecT String st Identity [IRI]
-> CharParser st DataPropertyAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
Int -> CharParser st IRI -> ParsecT String st Identity [IRI]
forall st a. Int -> CharParser st a -> CharParser st [a]
manyN 2 (PrefixMap -> CharParser st IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)
parseDisjointDataProperties :: GA.PrefixMap -> CharParser st DataPropertyAxiom
parseDisjointDataProperties :: PrefixMap -> CharParser st DataPropertyAxiom
parseDisjointDataProperties pm :: PrefixMap
pm =
String
-> CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DisjointDataProperties" (CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom)
-> CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> [IRI] -> DataPropertyAxiom
DisjointDataProperties ([Annotation] -> [IRI] -> DataPropertyAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity ([IRI] -> DataPropertyAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm ParsecT String st Identity ([IRI] -> DataPropertyAxiom)
-> ParsecT String st Identity [IRI]
-> CharParser st DataPropertyAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
Int -> CharParser st IRI -> ParsecT String st Identity [IRI]
forall st a. Int -> CharParser st a -> CharParser st [a]
manyN 2 (PrefixMap -> CharParser st IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)
parseDataPropertyDomain :: GA.PrefixMap -> CharParser st DataPropertyAxiom
parseDataPropertyDomain :: PrefixMap -> CharParser st DataPropertyAxiom
parseDataPropertyDomain pm :: PrefixMap
pm =
String
-> CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DataPropertyDomain" (CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom)
-> CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> IRI -> ClassExpression -> DataPropertyAxiom
DataPropertyDomain ([Annotation] -> IRI -> ClassExpression -> DataPropertyAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT
String st Identity (IRI -> ClassExpression -> DataPropertyAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm ParsecT
String st Identity (IRI -> ClassExpression -> DataPropertyAxiom)
-> ParsecT String st Identity IRI
-> ParsecT
String st Identity (ClassExpression -> DataPropertyAxiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) ParsecT String st Identity (ClassExpression -> DataPropertyAxiom)
-> ParsecT String st Identity ClassExpression
-> CharParser st DataPropertyAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
PrefixMap -> ParsecT String st Identity ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm
parseDataPropertyRange :: GA.PrefixMap -> CharParser st DataPropertyAxiom
parseDataPropertyRange :: PrefixMap -> CharParser st DataPropertyAxiom
parseDataPropertyRange pm :: PrefixMap
pm =
String
-> CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DataPropertyRange" (CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom)
-> CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> IRI -> DataRange -> DataPropertyAxiom
DataPropertyRange ([Annotation] -> IRI -> DataRange -> DataPropertyAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT
String st Identity (IRI -> DataRange -> DataPropertyAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm ParsecT String st Identity (IRI -> DataRange -> DataPropertyAxiom)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (DataRange -> DataPropertyAxiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) ParsecT String st Identity (DataRange -> DataPropertyAxiom)
-> ParsecT String st Identity DataRange
-> CharParser st DataPropertyAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
PrefixMap -> ParsecT String st Identity DataRange
forall st. PrefixMap -> CharParser st DataRange
parseDataRange PrefixMap
pm
parseFunctionalDataProperty :: GA.PrefixMap -> CharParser st DataPropertyAxiom
parseFunctionalDataProperty :: PrefixMap -> CharParser st DataPropertyAxiom
parseFunctionalDataProperty pm :: PrefixMap
pm =
String
-> CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "FunctionalDataProperty" (CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom)
-> CharParser st DataPropertyAxiom
-> CharParser st DataPropertyAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> IRI -> DataPropertyAxiom
FunctionalDataProperty ([Annotation] -> IRI -> DataPropertyAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity (IRI -> DataPropertyAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm ParsecT String st Identity (IRI -> DataPropertyAxiom)
-> ParsecT String st Identity IRI
-> CharParser st DataPropertyAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)
parseDataPropertyAxiom :: GA.PrefixMap -> CharParser st Axiom
parseDataPropertyAxiom :: PrefixMap -> CharParser st Axiom
parseDataPropertyAxiom pm :: PrefixMap
pm = DataPropertyAxiom -> Axiom
DataPropertyAxiom (DataPropertyAxiom -> Axiom)
-> ParsecT String st Identity DataPropertyAxiom
-> CharParser st Axiom
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (
PrefixMap -> ParsecT String st Identity DataPropertyAxiom
forall st. PrefixMap -> CharParser st DataPropertyAxiom
parseSubDataPropertyOf PrefixMap
pm ParsecT String st Identity DataPropertyAxiom
-> ParsecT String st Identity DataPropertyAxiom
-> ParsecT String st Identity DataPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> ParsecT String st Identity DataPropertyAxiom
forall st. PrefixMap -> CharParser st DataPropertyAxiom
parseEquivalentDataProperties PrefixMap
pm ParsecT String st Identity DataPropertyAxiom
-> ParsecT String st Identity DataPropertyAxiom
-> ParsecT String st Identity DataPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> ParsecT String st Identity DataPropertyAxiom
forall st. PrefixMap -> CharParser st DataPropertyAxiom
parseDisjointDataProperties PrefixMap
pm ParsecT String st Identity DataPropertyAxiom
-> ParsecT String st Identity DataPropertyAxiom
-> ParsecT String st Identity DataPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> ParsecT String st Identity DataPropertyAxiom
forall st. PrefixMap -> CharParser st DataPropertyAxiom
parseDataPropertyDomain PrefixMap
pm ParsecT String st Identity DataPropertyAxiom
-> ParsecT String st Identity DataPropertyAxiom
-> ParsecT String st Identity DataPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> ParsecT String st Identity DataPropertyAxiom
forall st. PrefixMap -> CharParser st DataPropertyAxiom
parseDataPropertyRange PrefixMap
pm ParsecT String st Identity DataPropertyAxiom
-> ParsecT String st Identity DataPropertyAxiom
-> ParsecT String st Identity DataPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> ParsecT String st Identity DataPropertyAxiom
forall st. PrefixMap -> CharParser st DataPropertyAxiom
parseFunctionalDataProperty PrefixMap
pm ParsecT String st Identity DataPropertyAxiom
-> String -> ParsecT String st Identity DataPropertyAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> String -> ParsecT s u m a
<?>
"DataPropertyAxiom"
)
parseDataTypeDefinition :: GA.PrefixMap -> CharParser st Axiom
parseDataTypeDefinition :: PrefixMap -> CharParser st Axiom
parseDataTypeDefinition pm :: PrefixMap
pm = String -> CharParser st Axiom -> CharParser st Axiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DatatypeDefinition" (CharParser st Axiom -> CharParser st Axiom)
-> CharParser st Axiom -> CharParser st Axiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> IRI -> DataRange -> Axiom
DatatypeDefinition ([Annotation] -> IRI -> DataRange -> Axiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity (IRI -> DataRange -> Axiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm ParsecT String st Identity (IRI -> DataRange -> Axiom)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (DataRange -> Axiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) ParsecT String st Identity (DataRange -> Axiom)
-> ParsecT String st Identity DataRange -> CharParser st Axiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
PrefixMap -> ParsecT String st Identity DataRange
forall st. PrefixMap -> CharParser st DataRange
parseDataRange PrefixMap
pm
skipChar :: Char -> CharParser st ()
skipChar :: Char -> CharParser st ()
skipChar = ParsecT String st Identity Char -> CharParser st ()
forall (m :: * -> *) a. Monad m => m a -> m ()
forget (ParsecT String st Identity Char -> CharParser st ())
-> (Char -> ParsecT String st Identity Char)
-> Char
-> CharParser st ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ParsecT String st Identity Char -> ParsecT String st Identity Char
forall st a. CharParser st a -> CharParser st a
skips (ParsecT String st Identity Char
-> ParsecT String st Identity Char)
-> (Char -> ParsecT String st Identity Char)
-> Char
-> ParsecT String st Identity Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Char -> ParsecT String st Identity Char
forall s (m :: * -> *) u.
Stream s m Char =>
Char -> ParsecT s u m Char
char
parensP :: CharParser st a -> CharParser st a
parensP :: CharParser st a -> CharParser st a
parensP = ParsecT String st Identity ()
-> ParsecT String st Identity ()
-> CharParser st a
-> CharParser st a
forall s (m :: * -> *) t u open close a.
Stream s m t =>
ParsecT s u m open
-> ParsecT s u m close -> ParsecT s u m a -> ParsecT s u m a
between (Char -> ParsecT String st Identity ()
forall st. Char -> CharParser st ()
skipChar '(') (Char -> ParsecT String st Identity ()
forall st. Char -> CharParser st ()
skipChar ')')
parseHasKey :: GA.PrefixMap -> CharParser st Axiom
parseHasKey :: PrefixMap -> CharParser st Axiom
parseHasKey pm :: PrefixMap
pm = String -> CharParser st Axiom -> CharParser st Axiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "HasKey" (CharParser st Axiom -> CharParser st Axiom)
-> CharParser st Axiom -> CharParser st Axiom
forall a b. (a -> b) -> a -> b
$ do
[Annotation]
annotations <- (PrefixMap -> CharParser st [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm)
ClassExpression
classExpr <- (PrefixMap -> CharParser st ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm)
[ObjectPropertyExpression]
objectPropertyExprs <- CharParser st [ObjectPropertyExpression]
-> CharParser st [ObjectPropertyExpression]
forall st a. CharParser st a -> CharParser st a
parensP (CharParser st [ObjectPropertyExpression]
-> CharParser st [ObjectPropertyExpression])
-> CharParser st [ObjectPropertyExpression]
-> CharParser st [ObjectPropertyExpression]
forall a b. (a -> b) -> a -> b
$ ParsecT String st Identity ObjectPropertyExpression
-> CharParser st [ObjectPropertyExpression]
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many (PrefixMap -> ParsecT String st Identity ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm)
[IRI]
dataPropertyExprs <- CharParser st [IRI] -> CharParser st [IRI]
forall st a. CharParser st a -> CharParser st a
parensP (CharParser st [IRI] -> CharParser st [IRI])
-> CharParser st [IRI] -> CharParser st [IRI]
forall a b. (a -> b) -> a -> b
$ ParsecT String st Identity IRI -> CharParser st [IRI]
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many (PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)
Axiom -> CharParser st Axiom
forall (m :: * -> *) a. Monad m => a -> m a
return (Axiom -> CharParser st Axiom) -> Axiom -> CharParser st Axiom
forall a b. (a -> b) -> a -> b
$ [Annotation]
-> ClassExpression -> [ObjectPropertyExpression] -> [IRI] -> Axiom
HasKey [Annotation]
annotations ClassExpression
classExpr [ObjectPropertyExpression]
objectPropertyExprs [IRI]
dataPropertyExprs
parseSameIndividual :: GA.PrefixMap -> CharParser st Assertion
parseSameIndividual :: PrefixMap -> CharParser st Assertion
parseSameIndividual pm :: PrefixMap
pm = String -> CharParser st Assertion -> CharParser st Assertion
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "SameIndividual" (CharParser st Assertion -> CharParser st Assertion)
-> CharParser st Assertion -> CharParser st Assertion
forall a b. (a -> b) -> a -> b
$
[Annotation] -> [IRI] -> Assertion
SameIndividual ([Annotation] -> [IRI] -> Assertion)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity ([IRI] -> Assertion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT String st Identity ([IRI] -> Assertion)
-> ParsecT String st Identity [IRI] -> CharParser st Assertion
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
Int -> CharParser st IRI -> ParsecT String st Identity [IRI]
forall st a. Int -> CharParser st a -> CharParser st [a]
manyN 2 (PrefixMap -> CharParser st IRI
forall st. PrefixMap -> CharParser st IRI
parseIndividual PrefixMap
pm)
parseDifferentIndividuals :: GA.PrefixMap -> CharParser st Assertion
parseDifferentIndividuals :: PrefixMap -> CharParser st Assertion
parseDifferentIndividuals pm :: PrefixMap
pm = String -> CharParser st Assertion -> CharParser st Assertion
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DifferentIndividuals" (CharParser st Assertion -> CharParser st Assertion)
-> CharParser st Assertion -> CharParser st Assertion
forall a b. (a -> b) -> a -> b
$
[Annotation] -> [IRI] -> Assertion
DifferentIndividuals ([Annotation] -> [IRI] -> Assertion)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity ([IRI] -> Assertion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT String st Identity ([IRI] -> Assertion)
-> ParsecT String st Identity [IRI] -> CharParser st Assertion
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
Int -> CharParser st IRI -> ParsecT String st Identity [IRI]
forall st a. Int -> CharParser st a -> CharParser st [a]
manyN 2 (PrefixMap -> CharParser st IRI
forall st. PrefixMap -> CharParser st IRI
parseIndividual PrefixMap
pm)
parseClassAssertion :: GA.PrefixMap -> CharParser st Assertion
parseClassAssertion :: PrefixMap -> CharParser st Assertion
parseClassAssertion pm :: PrefixMap
pm = String -> CharParser st Assertion -> CharParser st Assertion
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ClassAssertion" (CharParser st Assertion -> CharParser st Assertion)
-> CharParser st Assertion -> CharParser st Assertion
forall a b. (a -> b) -> a -> b
$
[Annotation] -> ClassExpression -> IRI -> Assertion
ClassAssertion ([Annotation] -> ClassExpression -> IRI -> Assertion)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity (ClassExpression -> IRI -> Assertion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT String st Identity (ClassExpression -> IRI -> Assertion)
-> ParsecT String st Identity ClassExpression
-> ParsecT String st Identity (IRI -> Assertion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm) ParsecT String st Identity (IRI -> Assertion)
-> ParsecT String st Identity IRI -> CharParser st Assertion
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIndividual PrefixMap
pm)
parseObjectPropertyAssertion :: GA.PrefixMap -> CharParser st Assertion
parseObjectPropertyAssertion :: PrefixMap -> CharParser st Assertion
parseObjectPropertyAssertion pm :: PrefixMap
pm =
String -> CharParser st Assertion -> CharParser st Assertion
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ObjectPropertyAssertion" (CharParser st Assertion -> CharParser st Assertion)
-> CharParser st Assertion -> CharParser st Assertion
forall a b. (a -> b) -> a -> b
$
[Annotation] -> ObjectPropertyExpression -> IRI -> IRI -> Assertion
ObjectPropertyAssertion ([Annotation]
-> ObjectPropertyExpression -> IRI -> IRI -> Assertion)
-> ParsecT String st Identity [Annotation]
-> ParsecT
String
st
Identity
(ObjectPropertyExpression -> IRI -> IRI -> Assertion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT
String
st
Identity
(ObjectPropertyExpression -> IRI -> IRI -> Assertion)
-> ParsecT String st Identity ObjectPropertyExpression
-> ParsecT String st Identity (IRI -> IRI -> Assertion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm) ParsecT String st Identity (IRI -> IRI -> Assertion)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (IRI -> Assertion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIndividual PrefixMap
pm) ParsecT String st Identity (IRI -> Assertion)
-> ParsecT String st Identity IRI -> CharParser st Assertion
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIndividual PrefixMap
pm)
parseNegativeObjectPropertyAssertion :: GA.PrefixMap -> CharParser st Assertion
parseNegativeObjectPropertyAssertion :: PrefixMap -> CharParser st Assertion
parseNegativeObjectPropertyAssertion pm :: PrefixMap
pm =
String -> CharParser st Assertion -> CharParser st Assertion
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "NegativeObjectPropertyAssertion" (CharParser st Assertion -> CharParser st Assertion)
-> CharParser st Assertion -> CharParser st Assertion
forall a b. (a -> b) -> a -> b
$
[Annotation] -> ObjectPropertyExpression -> IRI -> IRI -> Assertion
NegativeObjectPropertyAssertion ([Annotation]
-> ObjectPropertyExpression -> IRI -> IRI -> Assertion)
-> ParsecT String st Identity [Annotation]
-> ParsecT
String
st
Identity
(ObjectPropertyExpression -> IRI -> IRI -> Assertion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT
String
st
Identity
(ObjectPropertyExpression -> IRI -> IRI -> Assertion)
-> ParsecT String st Identity ObjectPropertyExpression
-> ParsecT String st Identity (IRI -> IRI -> Assertion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm) ParsecT String st Identity (IRI -> IRI -> Assertion)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (IRI -> Assertion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIndividual PrefixMap
pm) ParsecT String st Identity (IRI -> Assertion)
-> ParsecT String st Identity IRI -> CharParser st Assertion
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIndividual PrefixMap
pm)
parseDataPropertyAssertion :: GA.PrefixMap -> CharParser st Assertion
parseDataPropertyAssertion :: PrefixMap -> CharParser st Assertion
parseDataPropertyAssertion pm :: PrefixMap
pm =
String -> CharParser st Assertion -> CharParser st Assertion
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DataPropertyAssertion" (CharParser st Assertion -> CharParser st Assertion)
-> CharParser st Assertion -> CharParser st Assertion
forall a b. (a -> b) -> a -> b
$
[Annotation] -> IRI -> IRI -> Literal -> Assertion
DataPropertyAssertion ([Annotation] -> IRI -> IRI -> Literal -> Assertion)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity (IRI -> IRI -> Literal -> Assertion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT String st Identity (IRI -> IRI -> Literal -> Assertion)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (IRI -> Literal -> Assertion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) ParsecT String st Identity (IRI -> Literal -> Assertion)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (Literal -> Assertion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIndividual PrefixMap
pm) ParsecT String st Identity (Literal -> Assertion)
-> ParsecT String st Identity Literal -> CharParser st Assertion
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity Literal
forall st. PrefixMap -> CharParser st Literal
parseLiteral PrefixMap
pm)
parseNegativeDataPropertyAssertion :: GA.PrefixMap -> CharParser st Assertion
parseNegativeDataPropertyAssertion :: PrefixMap -> CharParser st Assertion
parseNegativeDataPropertyAssertion pm :: PrefixMap
pm =
String -> CharParser st Assertion -> CharParser st Assertion
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "NegativeDataPropertyAssertion" (CharParser st Assertion -> CharParser st Assertion)
-> CharParser st Assertion -> CharParser st Assertion
forall a b. (a -> b) -> a -> b
$
[Annotation] -> IRI -> IRI -> Literal -> Assertion
NegativeDataPropertyAssertion ([Annotation] -> IRI -> IRI -> Literal -> Assertion)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity (IRI -> IRI -> Literal -> Assertion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT String st Identity (IRI -> IRI -> Literal -> Assertion)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (IRI -> Literal -> Assertion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) ParsecT String st Identity (IRI -> Literal -> Assertion)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (Literal -> Assertion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIndividual PrefixMap
pm) ParsecT String st Identity (Literal -> Assertion)
-> ParsecT String st Identity Literal -> CharParser st Assertion
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity Literal
forall st. PrefixMap -> CharParser st Literal
parseLiteral PrefixMap
pm)
parseAssertion :: GA.PrefixMap -> CharParser st Axiom
parseAssertion :: PrefixMap -> CharParser st Axiom
parseAssertion pm :: PrefixMap
pm = Assertion -> Axiom
Assertion (Assertion -> Axiom)
-> ParsecT String st Identity Assertion -> CharParser st Axiom
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (
(PrefixMap -> ParsecT String st Identity Assertion
forall st. PrefixMap -> CharParser st Assertion
parseSameIndividual PrefixMap
pm) ParsecT String st Identity Assertion
-> ParsecT String st Identity Assertion
-> ParsecT String st Identity Assertion
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity Assertion
forall st. PrefixMap -> CharParser st Assertion
parseDifferentIndividuals PrefixMap
pm) ParsecT String st Identity Assertion
-> ParsecT String st Identity Assertion
-> ParsecT String st Identity Assertion
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity Assertion
forall st. PrefixMap -> CharParser st Assertion
parseClassAssertion PrefixMap
pm) ParsecT String st Identity Assertion
-> ParsecT String st Identity Assertion
-> ParsecT String st Identity Assertion
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity Assertion
forall st. PrefixMap -> CharParser st Assertion
parseObjectPropertyAssertion PrefixMap
pm) ParsecT String st Identity Assertion
-> ParsecT String st Identity Assertion
-> ParsecT String st Identity Assertion
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity Assertion
forall st. PrefixMap -> CharParser st Assertion
parseNegativeObjectPropertyAssertion PrefixMap
pm) ParsecT String st Identity Assertion
-> ParsecT String st Identity Assertion
-> ParsecT String st Identity Assertion
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity Assertion
forall st. PrefixMap -> CharParser st Assertion
parseDataPropertyAssertion PrefixMap
pm) ParsecT String st Identity Assertion
-> ParsecT String st Identity Assertion
-> ParsecT String st Identity Assertion
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity Assertion
forall st. PrefixMap -> CharParser st Assertion
parseNegativeDataPropertyAssertion PrefixMap
pm)
)
parseAnnotationAssertion :: GA.PrefixMap -> CharParser st AnnotationAxiom
parseAnnotationAssertion :: PrefixMap -> CharParser st AnnotationAxiom
parseAnnotationAssertion pm :: PrefixMap
pm = String
-> CharParser st AnnotationAxiom -> CharParser st AnnotationAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "AnnotationAssertion" (CharParser st AnnotationAxiom -> CharParser st AnnotationAxiom)
-> CharParser st AnnotationAxiom -> CharParser st AnnotationAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation]
-> IRI -> AnnotationSubject -> AnnotationValue -> AnnotationAxiom
AnnotationAssertion ([Annotation]
-> IRI -> AnnotationSubject -> AnnotationValue -> AnnotationAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT
String
st
Identity
(IRI -> AnnotationSubject -> AnnotationValue -> AnnotationAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT
String
st
Identity
(IRI -> AnnotationSubject -> AnnotationValue -> AnnotationAxiom)
-> ParsecT String st Identity IRI
-> ParsecT
String
st
Identity
(AnnotationSubject -> AnnotationValue -> AnnotationAxiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) ParsecT
String
st
Identity
(AnnotationSubject -> AnnotationValue -> AnnotationAxiom)
-> ParsecT String st Identity AnnotationSubject
-> ParsecT String st Identity (AnnotationValue -> AnnotationAxiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity AnnotationSubject
forall st. PrefixMap -> CharParser st AnnotationSubject
parseAnnotationSubject PrefixMap
pm) ParsecT String st Identity (AnnotationValue -> AnnotationAxiom)
-> ParsecT String st Identity AnnotationValue
-> CharParser st AnnotationAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity AnnotationValue
forall st. PrefixMap -> CharParser st AnnotationValue
parseAnnotationValue PrefixMap
pm)
parseSubAnnotationPropertyOf :: GA.PrefixMap -> CharParser st AnnotationAxiom
parseSubAnnotationPropertyOf :: PrefixMap -> CharParser st AnnotationAxiom
parseSubAnnotationPropertyOf pm :: PrefixMap
pm =
String
-> CharParser st AnnotationAxiom -> CharParser st AnnotationAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "SubAnnotationPropertyOf" (CharParser st AnnotationAxiom -> CharParser st AnnotationAxiom)
-> CharParser st AnnotationAxiom -> CharParser st AnnotationAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> IRI -> IRI -> AnnotationAxiom
SubAnnotationPropertyOf ([Annotation] -> IRI -> IRI -> AnnotationAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity (IRI -> IRI -> AnnotationAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT String st Identity (IRI -> IRI -> AnnotationAxiom)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (IRI -> AnnotationAxiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) ParsecT String st Identity (IRI -> AnnotationAxiom)
-> ParsecT String st Identity IRI -> CharParser st AnnotationAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)
parseAnnotationPropertyDomain :: GA.PrefixMap -> CharParser st AnnotationAxiom
parseAnnotationPropertyDomain :: PrefixMap -> CharParser st AnnotationAxiom
parseAnnotationPropertyDomain pm :: PrefixMap
pm =
String
-> CharParser st AnnotationAxiom -> CharParser st AnnotationAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "AnnotationPropertyDomain" (CharParser st AnnotationAxiom -> CharParser st AnnotationAxiom)
-> CharParser st AnnotationAxiom -> CharParser st AnnotationAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> IRI -> IRI -> AnnotationAxiom
AnnotationPropertyDomain ([Annotation] -> IRI -> IRI -> AnnotationAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity (IRI -> IRI -> AnnotationAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT String st Identity (IRI -> IRI -> AnnotationAxiom)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (IRI -> AnnotationAxiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) ParsecT String st Identity (IRI -> AnnotationAxiom)
-> ParsecT String st Identity IRI -> CharParser st AnnotationAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)
parseAnnotationPropertyRange :: GA.PrefixMap -> CharParser st AnnotationAxiom
parseAnnotationPropertyRange :: PrefixMap -> CharParser st AnnotationAxiom
parseAnnotationPropertyRange pm :: PrefixMap
pm =
String
-> CharParser st AnnotationAxiom -> CharParser st AnnotationAxiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "AnnotationPropertyRange" (CharParser st AnnotationAxiom -> CharParser st AnnotationAxiom)
-> CharParser st AnnotationAxiom -> CharParser st AnnotationAxiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> IRI -> IRI -> AnnotationAxiom
AnnotationPropertyRange ([Annotation] -> IRI -> IRI -> AnnotationAxiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity (IRI -> IRI -> AnnotationAxiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm) ParsecT String st Identity (IRI -> IRI -> AnnotationAxiom)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (IRI -> AnnotationAxiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) ParsecT String st Identity (IRI -> AnnotationAxiom)
-> ParsecT String st Identity IRI -> CharParser st AnnotationAxiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
(PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)
parseAnnotationAxiom :: GA.PrefixMap -> CharParser st Axiom
parseAnnotationAxiom :: PrefixMap -> CharParser st Axiom
parseAnnotationAxiom pm :: PrefixMap
pm = AnnotationAxiom -> Axiom
AnnotationAxiom (AnnotationAxiom -> Axiom)
-> ParsecT String st Identity AnnotationAxiom
-> CharParser st Axiom
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (
(PrefixMap -> ParsecT String st Identity AnnotationAxiom
forall st. PrefixMap -> CharParser st AnnotationAxiom
parseAnnotationAssertion PrefixMap
pm) ParsecT String st Identity AnnotationAxiom
-> ParsecT String st Identity AnnotationAxiom
-> ParsecT String st Identity AnnotationAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity AnnotationAxiom
forall st. PrefixMap -> CharParser st AnnotationAxiom
parseSubAnnotationPropertyOf PrefixMap
pm) ParsecT String st Identity AnnotationAxiom
-> ParsecT String st Identity AnnotationAxiom
-> ParsecT String st Identity AnnotationAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity AnnotationAxiom
forall st. PrefixMap -> CharParser st AnnotationAxiom
parseAnnotationPropertyDomain PrefixMap
pm) ParsecT String st Identity AnnotationAxiom
-> ParsecT String st Identity AnnotationAxiom
-> ParsecT String st Identity AnnotationAxiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> ParsecT String st Identity AnnotationAxiom
forall st. PrefixMap -> CharParser st AnnotationAxiom
parseAnnotationPropertyRange PrefixMap
pm)
)
parseIndividualArg :: GA.PrefixMap -> CharParser st IndividualArg
parseIndividualArg :: PrefixMap -> CharParser st IndividualArg
parseIndividualArg pm :: PrefixMap
pm =
IRI -> IndividualArg
IVar (IRI -> IndividualArg)
-> ParsecT String st Identity IRI -> CharParser st IndividualArg
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String
-> ParsecT String st Identity IRI -> ParsecT String st Identity IRI
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "Variable" (PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) CharParser st IndividualArg
-> CharParser st IndividualArg -> CharParser st IndividualArg
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
IRI -> IndividualArg
IArg (IRI -> IndividualArg)
-> ParsecT String st Identity IRI -> CharParser st IndividualArg
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseAnonymousIndividual PrefixMap
pm
parseDataArg :: GA.PrefixMap -> CharParser st DataArg
parseDataArg :: PrefixMap -> CharParser st DataArg
parseDataArg pm :: PrefixMap
pm =
IRI -> DataArg
DVar (IRI -> DataArg)
-> ParsecT String st Identity IRI -> CharParser st DataArg
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String
-> ParsecT String st Identity IRI -> ParsecT String st Identity IRI
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "Variable" (PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm) CharParser st DataArg
-> CharParser st DataArg -> CharParser st DataArg
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
Literal -> DataArg
DArg (Literal -> DataArg)
-> ParsecT String st Identity Literal -> CharParser st DataArg
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> PrefixMap -> ParsecT String st Identity Literal
forall st. PrefixMap -> CharParser st Literal
parseLiteral PrefixMap
pm
parseClassAtom :: GA.PrefixMap -> CharParser st Atom
parseClassAtom :: PrefixMap -> CharParser st Atom
parseClassAtom pm :: PrefixMap
pm = String -> CharParser st Atom -> CharParser st Atom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ClassAtom" (CharParser st Atom -> CharParser st Atom)
-> CharParser st Atom -> CharParser st Atom
forall a b. (a -> b) -> a -> b
$
ClassExpression -> IndividualArg -> Atom
ClassAtom (ClassExpression -> IndividualArg -> Atom)
-> ParsecT String st Identity ClassExpression
-> ParsecT String st Identity (IndividualArg -> Atom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> PrefixMap -> ParsecT String st Identity ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm ParsecT String st Identity (IndividualArg -> Atom)
-> ParsecT String st Identity IndividualArg -> CharParser st Atom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> PrefixMap -> ParsecT String st Identity IndividualArg
forall st. PrefixMap -> CharParser st IndividualArg
parseIndividualArg PrefixMap
pm
parseDataRangeAtom :: GA.PrefixMap -> CharParser st Atom
parseDataRangeAtom :: PrefixMap -> CharParser st Atom
parseDataRangeAtom pm :: PrefixMap
pm = String -> CharParser st Atom -> CharParser st Atom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DataRangeAtom" (CharParser st Atom -> CharParser st Atom)
-> CharParser st Atom -> CharParser st Atom
forall a b. (a -> b) -> a -> b
$
DataRange -> DataArg -> Atom
DataRangeAtom (DataRange -> DataArg -> Atom)
-> ParsecT String st Identity DataRange
-> ParsecT String st Identity (DataArg -> Atom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> PrefixMap -> ParsecT String st Identity DataRange
forall st. PrefixMap -> CharParser st DataRange
parseDataRange PrefixMap
pm ParsecT String st Identity (DataArg -> Atom)
-> ParsecT String st Identity DataArg -> CharParser st Atom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> PrefixMap -> ParsecT String st Identity DataArg
forall st. PrefixMap -> CharParser st DataArg
parseDataArg PrefixMap
pm
parseObjectPropertyAtom :: GA.PrefixMap -> CharParser st Atom
parseObjectPropertyAtom :: PrefixMap -> CharParser st Atom
parseObjectPropertyAtom pm :: PrefixMap
pm = String -> CharParser st Atom -> CharParser st Atom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ObjectPropertyAtom" (CharParser st Atom -> CharParser st Atom)
-> CharParser st Atom -> CharParser st Atom
forall a b. (a -> b) -> a -> b
$
ObjectPropertyExpression -> IndividualArg -> IndividualArg -> Atom
ObjectPropertyAtom (ObjectPropertyExpression
-> IndividualArg -> IndividualArg -> Atom)
-> ParsecT String st Identity ObjectPropertyExpression
-> ParsecT
String st Identity (IndividualArg -> IndividualArg -> Atom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
PrefixMap -> ParsecT String st Identity ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm ParsecT String st Identity (IndividualArg -> IndividualArg -> Atom)
-> ParsecT String st Identity IndividualArg
-> ParsecT String st Identity (IndividualArg -> Atom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
PrefixMap -> ParsecT String st Identity IndividualArg
forall st. PrefixMap -> CharParser st IndividualArg
parseIndividualArg PrefixMap
pm ParsecT String st Identity (IndividualArg -> Atom)
-> ParsecT String st Identity IndividualArg -> CharParser st Atom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
PrefixMap -> ParsecT String st Identity IndividualArg
forall st. PrefixMap -> CharParser st IndividualArg
parseIndividualArg PrefixMap
pm
parseDataPropertyAtom :: GA.PrefixMap -> CharParser st Atom
parseDataPropertyAtom :: PrefixMap -> CharParser st Atom
parseDataPropertyAtom pm :: PrefixMap
pm = String -> CharParser st Atom -> CharParser st Atom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DataPropertyAtom" (CharParser st Atom -> CharParser st Atom)
-> CharParser st Atom -> CharParser st Atom
forall a b. (a -> b) -> a -> b
$
IRI -> IndividualArg -> DataArg -> Atom
DataPropertyAtom (IRI -> IndividualArg -> DataArg -> Atom)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (IndividualArg -> DataArg -> Atom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm ParsecT String st Identity (IndividualArg -> DataArg -> Atom)
-> ParsecT String st Identity IndividualArg
-> ParsecT String st Identity (DataArg -> Atom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
PrefixMap -> ParsecT String st Identity IndividualArg
forall st. PrefixMap -> CharParser st IndividualArg
parseIndividualArg PrefixMap
pm ParsecT String st Identity (DataArg -> Atom)
-> ParsecT String st Identity DataArg -> CharParser st Atom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
PrefixMap -> ParsecT String st Identity DataArg
forall st. PrefixMap -> CharParser st DataArg
parseDataArg PrefixMap
pm
parseBuiltInAtom :: GA.PrefixMap -> CharParser st Atom
parseBuiltInAtom :: PrefixMap -> CharParser st Atom
parseBuiltInAtom pm :: PrefixMap
pm = String -> CharParser st Atom -> CharParser st Atom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "BuiltInAtom" (CharParser st Atom -> CharParser st Atom)
-> CharParser st Atom -> CharParser st Atom
forall a b. (a -> b) -> a -> b
$
IRI -> [DataArg] -> Atom
BuiltInAtom (IRI -> [DataArg] -> Atom)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity ([DataArg] -> Atom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm ParsecT String st Identity ([DataArg] -> Atom)
-> ParsecT String st Identity [DataArg] -> CharParser st Atom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ParsecT String st Identity DataArg
-> ParsecT String st Identity [DataArg]
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m [a]
many1 (PrefixMap -> ParsecT String st Identity DataArg
forall st. PrefixMap -> CharParser st DataArg
parseDataArg PrefixMap
pm)
parseSameIndividualAtom :: GA.PrefixMap -> CharParser st Atom
parseSameIndividualAtom :: PrefixMap -> CharParser st Atom
parseSameIndividualAtom pm :: PrefixMap
pm = String -> CharParser st Atom -> CharParser st Atom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "SameIndividualAtom" (CharParser st Atom -> CharParser st Atom)
-> CharParser st Atom -> CharParser st Atom
forall a b. (a -> b) -> a -> b
$
IndividualArg -> IndividualArg -> Atom
SameIndividualAtom (IndividualArg -> IndividualArg -> Atom)
-> ParsecT String st Identity IndividualArg
-> ParsecT String st Identity (IndividualArg -> Atom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> PrefixMap -> ParsecT String st Identity IndividualArg
forall st. PrefixMap -> CharParser st IndividualArg
parseIndividualArg PrefixMap
pm ParsecT String st Identity (IndividualArg -> Atom)
-> ParsecT String st Identity IndividualArg -> CharParser st Atom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> PrefixMap -> ParsecT String st Identity IndividualArg
forall st. PrefixMap -> CharParser st IndividualArg
parseIndividualArg PrefixMap
pm
parseDifferentIndividualsAtom :: GA.PrefixMap -> CharParser st Atom
parseDifferentIndividualsAtom :: PrefixMap -> CharParser st Atom
parseDifferentIndividualsAtom pm :: PrefixMap
pm = String -> CharParser st Atom -> CharParser st Atom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DifferentIndividualsAtom" (CharParser st Atom -> CharParser st Atom)
-> CharParser st Atom -> CharParser st Atom
forall a b. (a -> b) -> a -> b
$
IndividualArg -> IndividualArg -> Atom
DifferentIndividualsAtom (IndividualArg -> IndividualArg -> Atom)
-> ParsecT String st Identity IndividualArg
-> ParsecT String st Identity (IndividualArg -> Atom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> PrefixMap -> ParsecT String st Identity IndividualArg
forall st. PrefixMap -> CharParser st IndividualArg
parseIndividualArg PrefixMap
pm ParsecT String st Identity (IndividualArg -> Atom)
-> ParsecT String st Identity IndividualArg -> CharParser st Atom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> PrefixMap -> ParsecT String st Identity IndividualArg
forall st. PrefixMap -> CharParser st IndividualArg
parseIndividualArg PrefixMap
pm
parseAtom :: GA.PrefixMap -> CharParser st Atom
parseAtom :: PrefixMap -> CharParser st Atom
parseAtom pm :: PrefixMap
pm =
PrefixMap -> CharParser st Atom
forall st. PrefixMap -> CharParser st Atom
parseClassAtom PrefixMap
pm CharParser st Atom -> CharParser st Atom -> CharParser st Atom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> CharParser st Atom
forall st. PrefixMap -> CharParser st Atom
parseDataRangeAtom PrefixMap
pm CharParser st Atom -> CharParser st Atom -> CharParser st Atom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> CharParser st Atom
forall st. PrefixMap -> CharParser st Atom
parseObjectPropertyAtom PrefixMap
pm CharParser st Atom -> CharParser st Atom -> CharParser st Atom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> CharParser st Atom
forall st. PrefixMap -> CharParser st Atom
parseDataPropertyAtom PrefixMap
pm CharParser st Atom -> CharParser st Atom -> CharParser st Atom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> CharParser st Atom
forall st. PrefixMap -> CharParser st Atom
parseBuiltInAtom PrefixMap
pmCharParser st Atom -> CharParser st Atom -> CharParser st Atom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> CharParser st Atom
forall st. PrefixMap -> CharParser st Atom
parseSameIndividualAtom PrefixMap
pm CharParser st Atom -> CharParser st Atom -> CharParser st Atom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
PrefixMap -> CharParser st Atom
forall st. PrefixMap -> CharParser st Atom
parseDifferentIndividualsAtom PrefixMap
pm CharParser st Atom -> String -> CharParser st Atom
forall s u (m :: * -> *) a.
ParsecT s u m a -> String -> ParsecT s u m a
<?>
"Atom"
parseBody :: GA.PrefixMap -> CharParser st Body
parseBody :: PrefixMap -> CharParser st Body
parseBody pm :: PrefixMap
pm = do
String -> CharParser st Body -> CharParser st Body
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "Body" (CharParser st Body -> CharParser st Body)
-> CharParser st Body -> CharParser st Body
forall a b. (a -> b) -> a -> b
$ ParsecT String st Identity Atom -> CharParser st Body
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many (PrefixMap -> ParsecT String st Identity Atom
forall st. PrefixMap -> CharParser st Atom
parseAtom PrefixMap
pm)
parseHead :: GA.PrefixMap -> CharParser st Body
parseHead :: PrefixMap -> CharParser st Body
parseHead pm :: PrefixMap
pm = do
String -> CharParser st Body -> CharParser st Body
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "Head" (CharParser st Body -> CharParser st Body)
-> CharParser st Body -> CharParser st Body
forall a b. (a -> b) -> a -> b
$ ParsecT String st Identity Atom -> CharParser st Body
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many (PrefixMap -> ParsecT String st Identity Atom
forall st. PrefixMap -> CharParser st Atom
parseAtom PrefixMap
pm)
parseDLSafeRule :: GA.PrefixMap -> CharParser st Rule
parseDLSafeRule :: PrefixMap -> CharParser st Rule
parseDLSafeRule pm :: PrefixMap
pm = String -> CharParser st Rule -> CharParser st Rule
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DLSafeRule" (CharParser st Rule -> CharParser st Rule)
-> CharParser st Rule -> CharParser st Rule
forall a b. (a -> b) -> a -> b
$
[Annotation] -> Body -> Body -> Rule
DLSafeRule ([Annotation] -> Body -> Body -> Rule)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity (Body -> Body -> Rule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm ParsecT String st Identity (Body -> Body -> Rule)
-> ParsecT String st Identity Body
-> ParsecT String st Identity (Body -> Rule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
PrefixMap -> ParsecT String st Identity Body
forall st. PrefixMap -> CharParser st Body
parseBody PrefixMap
pm ParsecT String st Identity (Body -> Rule)
-> ParsecT String st Identity Body -> CharParser st Rule
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
PrefixMap -> ParsecT String st Identity Body
forall st. PrefixMap -> CharParser st Body
parseHead PrefixMap
pm
parseDGClassAtom :: GA.PrefixMap -> CharParser st DGAtom
parseDGClassAtom :: PrefixMap -> CharParser st DGAtom
parseDGClassAtom pm :: PrefixMap
pm = String -> CharParser st DGAtom -> CharParser st DGAtom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ClassAtom" (CharParser st DGAtom -> CharParser st DGAtom)
-> CharParser st DGAtom -> CharParser st DGAtom
forall a b. (a -> b) -> a -> b
$
ClassExpression -> IndividualArg -> DGAtom
DGClassAtom (ClassExpression -> IndividualArg -> DGAtom)
-> ParsecT String st Identity ClassExpression
-> ParsecT String st Identity (IndividualArg -> DGAtom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> PrefixMap -> ParsecT String st Identity ClassExpression
forall st. PrefixMap -> CharParser st ClassExpression
parseClassExpression PrefixMap
pm ParsecT String st Identity (IndividualArg -> DGAtom)
-> ParsecT String st Identity IndividualArg -> CharParser st DGAtom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> PrefixMap -> ParsecT String st Identity IndividualArg
forall st. PrefixMap -> CharParser st IndividualArg
parseIndividualArg PrefixMap
pm
parseDGObjectPropertyAtom :: GA.PrefixMap -> CharParser st DGAtom
parseDGObjectPropertyAtom :: PrefixMap -> CharParser st DGAtom
parseDGObjectPropertyAtom pm :: PrefixMap
pm = String -> CharParser st DGAtom -> CharParser st DGAtom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "ObjectPropertyAtom" (CharParser st DGAtom -> CharParser st DGAtom)
-> CharParser st DGAtom -> CharParser st DGAtom
forall a b. (a -> b) -> a -> b
$
ObjectPropertyExpression
-> IndividualArg -> IndividualArg -> DGAtom
DGObjectPropertyAtom (ObjectPropertyExpression
-> IndividualArg -> IndividualArg -> DGAtom)
-> ParsecT String st Identity ObjectPropertyExpression
-> ParsecT
String st Identity (IndividualArg -> IndividualArg -> DGAtom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
PrefixMap -> ParsecT String st Identity ObjectPropertyExpression
forall st. PrefixMap -> CharParser st ObjectPropertyExpression
parseObjectPropertyExpression PrefixMap
pm ParsecT
String st Identity (IndividualArg -> IndividualArg -> DGAtom)
-> ParsecT String st Identity IndividualArg
-> ParsecT String st Identity (IndividualArg -> DGAtom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
PrefixMap -> ParsecT String st Identity IndividualArg
forall st. PrefixMap -> CharParser st IndividualArg
parseIndividualArg PrefixMap
pm ParsecT String st Identity (IndividualArg -> DGAtom)
-> ParsecT String st Identity IndividualArg -> CharParser st DGAtom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
PrefixMap -> ParsecT String st Identity IndividualArg
forall st. PrefixMap -> CharParser st IndividualArg
parseIndividualArg PrefixMap
pm
parseDGAtom :: GA.PrefixMap -> CharParser st DGAtom
parseDGAtom :: PrefixMap -> CharParser st DGAtom
parseDGAtom pm :: PrefixMap
pm = PrefixMap -> CharParser st DGAtom
forall st. PrefixMap -> CharParser st DGAtom
parseDGClassAtom PrefixMap
pm CharParser st DGAtom
-> CharParser st DGAtom -> CharParser st DGAtom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|> PrefixMap -> CharParser st DGAtom
forall st. PrefixMap -> CharParser st DGAtom
parseDGObjectPropertyAtom PrefixMap
pm
parseDGBody :: GA.PrefixMap -> CharParser st DGBody
parseDGBody :: PrefixMap -> CharParser st DGBody
parseDGBody pm :: PrefixMap
pm = String -> CharParser st DGBody -> CharParser st DGBody
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "Body" (CharParser st DGBody -> CharParser st DGBody)
-> CharParser st DGBody -> CharParser st DGBody
forall a b. (a -> b) -> a -> b
$ ParsecT String st Identity DGAtom -> CharParser st DGBody
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many (PrefixMap -> ParsecT String st Identity DGAtom
forall st. PrefixMap -> CharParser st DGAtom
parseDGAtom PrefixMap
pm)
parseDGHead :: GA.PrefixMap -> CharParser st DGHead
parseDGHead :: PrefixMap -> CharParser st DGBody
parseDGHead pm :: PrefixMap
pm = String -> CharParser st DGBody -> CharParser st DGBody
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "Head" (CharParser st DGBody -> CharParser st DGBody)
-> CharParser st DGBody -> CharParser st DGBody
forall a b. (a -> b) -> a -> b
$ ParsecT String st Identity DGAtom -> CharParser st DGBody
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many (PrefixMap -> ParsecT String st Identity DGAtom
forall st. PrefixMap -> CharParser st DGAtom
parseDGAtom PrefixMap
pm)
parseDGRule :: GA.PrefixMap -> CharParser st Rule
parseDGRule :: PrefixMap -> CharParser st Rule
parseDGRule pm :: PrefixMap
pm = String -> CharParser st Rule -> CharParser st Rule
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DescriptionGraphRule" (CharParser st Rule -> CharParser st Rule)
-> CharParser st Rule -> CharParser st Rule
forall a b. (a -> b) -> a -> b
$
[Annotation] -> DGBody -> DGBody -> Rule
DGRule ([Annotation] -> DGBody -> DGBody -> Rule)
-> ParsecT String st Identity [Annotation]
-> ParsecT String st Identity (DGBody -> DGBody -> Rule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm ParsecT String st Identity (DGBody -> DGBody -> Rule)
-> ParsecT String st Identity DGBody
-> ParsecT String st Identity (DGBody -> Rule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> PrefixMap -> ParsecT String st Identity DGBody
forall st. PrefixMap -> CharParser st DGBody
parseDGBody PrefixMap
pm ParsecT String st Identity (DGBody -> Rule)
-> ParsecT String st Identity DGBody -> CharParser st Rule
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> PrefixMap -> ParsecT String st Identity DGBody
forall st. PrefixMap -> CharParser st DGBody
parseDGHead PrefixMap
pm
parseRule :: GA.PrefixMap -> CharParser st Axiom
parseRule :: PrefixMap -> CharParser st Axiom
parseRule pm :: PrefixMap
pm = Rule -> Axiom
Rule (Rule -> Axiom)
-> ParsecT String st Identity Rule -> CharParser st Axiom
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (PrefixMap -> ParsecT String st Identity Rule
forall st. PrefixMap -> CharParser st Rule
parseDLSafeRule PrefixMap
pm ParsecT String st Identity Rule
-> ParsecT String st Identity Rule
-> ParsecT String st Identity Rule
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|> PrefixMap -> ParsecT String st Identity Rule
forall st. PrefixMap -> CharParser st Rule
parseDGRule PrefixMap
pm)
parseDGNodeAssertion :: GA.PrefixMap -> CharParser st DGNodeAssertion
parseDGNodeAssertion :: PrefixMap -> CharParser st DGNodeAssertion
parseDGNodeAssertion pm :: PrefixMap
pm = String
-> CharParser st DGNodeAssertion -> CharParser st DGNodeAssertion
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "NodeAssertion" (CharParser st DGNodeAssertion -> CharParser st DGNodeAssertion)
-> CharParser st DGNodeAssertion -> CharParser st DGNodeAssertion
forall a b. (a -> b) -> a -> b
$
IRI -> IRI -> DGNodeAssertion
DGNodeAssertion (IRI -> IRI -> DGNodeAssertion)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (IRI -> DGNodeAssertion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm ParsecT String st Identity (IRI -> DGNodeAssertion)
-> ParsecT String st Identity IRI -> CharParser st DGNodeAssertion
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm
parseDGNodes :: GA.PrefixMap -> CharParser st DGNodes
parseDGNodes :: PrefixMap -> CharParser st DGNodes
parseDGNodes pm :: PrefixMap
pm = String -> CharParser st DGNodes -> CharParser st DGNodes
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "Nodes" (CharParser st DGNodes -> CharParser st DGNodes)
-> CharParser st DGNodes -> CharParser st DGNodes
forall a b. (a -> b) -> a -> b
$
ParsecT String st Identity DGNodeAssertion -> CharParser st DGNodes
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m [a]
many1 (PrefixMap -> ParsecT String st Identity DGNodeAssertion
forall st. PrefixMap -> CharParser st DGNodeAssertion
parseDGNodeAssertion PrefixMap
pm)
parseDGEdgeAssertion :: GA.PrefixMap -> CharParser st DGEdgeAssertion
parseDGEdgeAssertion :: PrefixMap -> CharParser st DGEdgeAssertion
parseDGEdgeAssertion pm :: PrefixMap
pm = String
-> CharParser st DGEdgeAssertion -> CharParser st DGEdgeAssertion
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "EdgeAssertion" (CharParser st DGEdgeAssertion -> CharParser st DGEdgeAssertion)
-> CharParser st DGEdgeAssertion -> CharParser st DGEdgeAssertion
forall a b. (a -> b) -> a -> b
$
IRI -> IRI -> IRI -> DGEdgeAssertion
DGEdgeAssertion (IRI -> IRI -> IRI -> DGEdgeAssertion)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (IRI -> IRI -> DGEdgeAssertion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm ParsecT String st Identity (IRI -> IRI -> DGEdgeAssertion)
-> ParsecT String st Identity IRI
-> ParsecT String st Identity (IRI -> DGEdgeAssertion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm ParsecT String st Identity (IRI -> DGEdgeAssertion)
-> ParsecT String st Identity IRI -> CharParser st DGEdgeAssertion
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm
parseDGEdes :: GA.PrefixMap -> CharParser st DGEdges
parseDGEdes :: PrefixMap -> CharParser st DGEdges
parseDGEdes pm :: PrefixMap
pm = String -> CharParser st DGEdges -> CharParser st DGEdges
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "Edges" (CharParser st DGEdges -> CharParser st DGEdges)
-> CharParser st DGEdges -> CharParser st DGEdges
forall a b. (a -> b) -> a -> b
$
ParsecT String st Identity DGEdgeAssertion -> CharParser st DGEdges
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m [a]
many1 (PrefixMap -> ParsecT String st Identity DGEdgeAssertion
forall st. PrefixMap -> CharParser st DGEdgeAssertion
parseDGEdgeAssertion PrefixMap
pm)
parseMainClasses :: GA.PrefixMap -> CharParser st MainClasses
parseMainClasses :: PrefixMap -> CharParser st [IRI]
parseMainClasses pm :: PrefixMap
pm = String -> CharParser st [IRI] -> CharParser st [IRI]
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "MainClasses" (CharParser st [IRI] -> CharParser st [IRI])
-> CharParser st [IRI] -> CharParser st [IRI]
forall a b. (a -> b) -> a -> b
$
ParsecT String st Identity IRI -> CharParser st [IRI]
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m [a]
many1 (PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)
parseDGAxiom :: GA.PrefixMap -> CharParser st Axiom
parseDGAxiom :: PrefixMap -> CharParser st Axiom
parseDGAxiom pm :: PrefixMap
pm = String -> CharParser st Axiom -> CharParser st Axiom
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "DescriptionGraph" (CharParser st Axiom -> CharParser st Axiom)
-> CharParser st Axiom -> CharParser st Axiom
forall a b. (a -> b) -> a -> b
$
[Annotation] -> IRI -> DGNodes -> DGEdges -> [IRI] -> Axiom
DGAxiom ([Annotation] -> IRI -> DGNodes -> DGEdges -> [IRI] -> Axiom)
-> ParsecT String st Identity [Annotation]
-> ParsecT
String st Identity (IRI -> DGNodes -> DGEdges -> [IRI] -> Axiom)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
PrefixMap -> ParsecT String st Identity [Annotation]
forall st. PrefixMap -> CharParser st [Annotation]
parseAnnotations PrefixMap
pm ParsecT
String st Identity (IRI -> DGNodes -> DGEdges -> [IRI] -> Axiom)
-> ParsecT String st Identity IRI
-> ParsecT
String st Identity (DGNodes -> DGEdges -> [IRI] -> Axiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm ParsecT String st Identity (DGNodes -> DGEdges -> [IRI] -> Axiom)
-> ParsecT String st Identity DGNodes
-> ParsecT String st Identity (DGEdges -> [IRI] -> Axiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
PrefixMap -> ParsecT String st Identity DGNodes
forall st. PrefixMap -> CharParser st DGNodes
parseDGNodes PrefixMap
pm ParsecT String st Identity (DGEdges -> [IRI] -> Axiom)
-> ParsecT String st Identity DGEdges
-> ParsecT String st Identity ([IRI] -> Axiom)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
PrefixMap -> ParsecT String st Identity DGEdges
forall st. PrefixMap -> CharParser st DGEdges
parseDGEdes PrefixMap
pm ParsecT String st Identity ([IRI] -> Axiom)
-> ParsecT String st Identity [IRI] -> CharParser st Axiom
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*>
PrefixMap -> ParsecT String st Identity [IRI]
forall st. PrefixMap -> CharParser st [IRI]
parseMainClasses PrefixMap
pm
parseAxiom :: GA.PrefixMap -> CharParser st Axiom
parseAxiom :: PrefixMap -> CharParser st Axiom
parseAxiom pm :: PrefixMap
pm =
(PrefixMap -> CharParser st Axiom
forall st. PrefixMap -> CharParser st Axiom
parseDeclaration PrefixMap
pm) CharParser st Axiom -> CharParser st Axiom -> CharParser st Axiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st Axiom
forall st. PrefixMap -> CharParser st Axiom
parseClassAxiom PrefixMap
pm) CharParser st Axiom -> CharParser st Axiom -> CharParser st Axiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st Axiom
forall st. PrefixMap -> CharParser st Axiom
parseObjectPropertyAxiom PrefixMap
pm) CharParser st Axiom -> CharParser st Axiom -> CharParser st Axiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st Axiom
forall st. PrefixMap -> CharParser st Axiom
parseDataPropertyAxiom PrefixMap
pm) CharParser st Axiom -> CharParser st Axiom -> CharParser st Axiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st Axiom
forall st. PrefixMap -> CharParser st Axiom
parseDataTypeDefinition PrefixMap
pm) CharParser st Axiom -> CharParser st Axiom -> CharParser st Axiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st Axiom
forall st. PrefixMap -> CharParser st Axiom
parseHasKey PrefixMap
pm) CharParser st Axiom -> CharParser st Axiom -> CharParser st Axiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st Axiom
forall st. PrefixMap -> CharParser st Axiom
parseAssertion PrefixMap
pm) CharParser st Axiom -> CharParser st Axiom -> CharParser st Axiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st Axiom
forall st. PrefixMap -> CharParser st Axiom
parseAnnotationAxiom PrefixMap
pm) CharParser st Axiom -> CharParser st Axiom -> CharParser st Axiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st Axiom
forall st. PrefixMap -> CharParser st Axiom
parseRule PrefixMap
pm) CharParser st Axiom -> CharParser st Axiom -> CharParser st Axiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
(PrefixMap -> CharParser st Axiom
forall st. PrefixMap -> CharParser st Axiom
parseDGAxiom PrefixMap
pm) CharParser st Axiom -> String -> CharParser st Axiom
forall s u (m :: * -> *) a.
ParsecT s u m a -> String -> ParsecT s u m a
<?>
"Axiom"
parseOntology :: GA.PrefixMap -> CharParser st Ontology
parseOntology :: PrefixMap -> CharParser st Ontology
parseOntology pm :: PrefixMap
pm =
let parseIriIfNotImportOrAxiomOrAnnotation :: ParsecT String u Identity (Maybe IRI)
parseIriIfNotImportOrAxiomOrAnnotation =
([CharParser u ()] -> CharParser u ()
forall st a. [CharParser st a] -> CharParser st a
arbitraryLookaheadOption [
ParsecT String u Identity IRI -> CharParser u ()
forall (m :: * -> *) a. Monad m => m a -> m ()
forget (PrefixMap -> ParsecT String u Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseDirectlyImportsDocument PrefixMap
pm),
ParsecT String u Identity Annotation -> CharParser u ()
forall (m :: * -> *) a. Monad m => m a -> m ()
forget (PrefixMap -> ParsecT String u Identity Annotation
forall st. PrefixMap -> CharParser st Annotation
parseAnnotation PrefixMap
pm),
ParsecT String u Identity Axiom -> CharParser u ()
forall (m :: * -> *) a. Monad m => m a -> m ()
forget (PrefixMap -> ParsecT String u Identity Axiom
forall st. PrefixMap -> CharParser st Axiom
parseAxiom PrefixMap
pm)
] CharParser u ()
-> ParsecT String u Identity (Maybe IRI)
-> ParsecT String u Identity (Maybe IRI)
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ParsecT String u Identity (Maybe IRI)
forall st a. CharParser st (Maybe a)
never) ParsecT String u Identity (Maybe IRI)
-> ParsecT String u Identity (Maybe IRI)
-> ParsecT String u Identity (Maybe IRI)
forall s u (m :: * -> *) a.
ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
<|>
ParsecT String u Identity IRI
-> ParsecT String u Identity (Maybe IRI)
forall s (m :: * -> *) t u a.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m (Maybe a)
optionMaybe (PrefixMap -> ParsecT String u Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseIRI PrefixMap
pm)
in
String -> CharParser st Ontology -> CharParser st Ontology
forall st a. String -> CharParser st a -> CharParser st a
parseEnclosedWithKeyword "Ontology" (CharParser st Ontology -> CharParser st Ontology)
-> CharParser st Ontology -> CharParser st Ontology
forall a b. (a -> b) -> a -> b
$ do
Maybe IRI
ontologyIri <- ParsecT String st Identity (Maybe IRI)
forall u. ParsecT String u Identity (Maybe IRI)
parseIriIfNotImportOrAxiomOrAnnotation
Maybe IRI
versionIri <- ParsecT String st Identity (Maybe IRI)
forall u. ParsecT String u Identity (Maybe IRI)
parseIriIfNotImportOrAxiomOrAnnotation
[IRI]
imports <- ParsecT String st Identity IRI -> ParsecT String st Identity [IRI]
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many (PrefixMap -> ParsecT String st Identity IRI
forall st. PrefixMap -> CharParser st IRI
parseDirectlyImportsDocument PrefixMap
pm)
[Annotation]
annotations <- ParsecT String st Identity Annotation
-> ParsecT String st Identity [Annotation]
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many (PrefixMap -> ParsecT String st Identity Annotation
forall st. PrefixMap -> CharParser st Annotation
parseAnnotation PrefixMap
pm)
[Axiom]
axs <- ParsecT String st Identity Axiom
-> ParsecT String st Identity [Axiom]
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many (PrefixMap -> ParsecT String st Identity Axiom
forall st. PrefixMap -> CharParser st Axiom
parseAxiom PrefixMap
pm)
Ontology -> CharParser st Ontology
forall (m :: * -> *) a. Monad m => a -> m a
return (Ontology -> CharParser st Ontology)
-> Ontology -> CharParser st Ontology
forall a b. (a -> b) -> a -> b
$ Maybe IRI
-> Maybe IRI -> [IRI] -> [Annotation] -> [Axiom] -> Ontology
Ontology Maybe IRI
ontologyIri Maybe IRI
versionIri ([IRI]
imports) [Annotation]
annotations [Axiom]
axs
parseOntologyDocument :: GA.PrefixMap -> CharParser st OntologyDocument
parseOntologyDocument :: PrefixMap -> CharParser st OntologyDocument
parseOntologyDocument gapm :: PrefixMap
gapm = do
CharParser st ()
forall st. GenParser Char st ()
skips'
[(String, IRI)]
prefixes <- ParsecT String st Identity (String, IRI)
-> ParsecT String st Identity [(String, IRI)]
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
many ParsecT String st Identity (String, IRI)
forall st. CharParser st (String, IRI)
parsePrefixDeclaration
let pm :: PrefixMap
pm = PrefixMap -> PrefixMap -> PrefixMap
forall k a. Ord k => Map k a -> Map k a -> Map k a
union PrefixMap
gapm ([(String, IRI)] -> PrefixMap
forall k a. Ord k => [(k, a)] -> Map k a
fromList [(String, IRI)]
prefixes)
Ontology
onto <- PrefixMap -> CharParser st Ontology
forall st. PrefixMap -> CharParser st Ontology
parseOntology PrefixMap
pm
OntologyDocument -> CharParser st OntologyDocument
forall (m :: * -> *) a. Monad m => a -> m a
return (OntologyDocument -> CharParser st OntologyDocument)
-> OntologyDocument -> CharParser st OntologyDocument
forall a b. (a -> b) -> a -> b
$ OntologyMetadata -> PrefixMap -> Ontology -> OntologyDocument
OntologyDocument (OntologySyntaxType -> OntologyMetadata
OntologyMetadata OntologySyntaxType
AS) PrefixMap
pm Ontology
onto