1060N/ADescription : Comorphism from OWL 1.1 to DL
1060N/ACopyright : (c) Uni Bremen 2007
1060N/AMaintainer : luecke@informatik.uni-bremen.de
1060N/Aa not yet implemented comorphism
3831N/Adata OWL2DL = OWL2DL deriving Show
3831N/A OntologyFile -- Basic spec domain
3831N/A Sentence -- sentence domain
3831N/A () -- symbol map items domain
3842N/A OWL_Morphism -- morphism domain
3831N/A ProofTree -- proof tree codomain
RawDLSymbol -- raw_symbol
sourceSublogic OWL2DL = ()
mapSublogic OWL2DL _ = Just ()
map_theory OWL2DL = mapTheory
map_morphism = mapDefaultMorphism
qNameToId = stringToId . localPart
mapTheory :: (
OWL.Sign, [Named Sentence])
-> Result (
DL.Sign, [Named DLBasicItem])
mapTheory (osign, sens) = do
cs =
Set.map qNameToId $ concepts osign
ps =
Set.map qNameToId $ datatypes osign
ds =
Set.map (QualDataProp . qNameToId) $ dataValuedRoles osign
os =
Set.map (QualObjProp . qNameToId) $ indValuedRoles osign
ns <- mapM (mapNamedM mapSenM) sens
{ classes =
Set.union cs $ classes emptyDLSig
, objectProps =
Set.union os $ objectProps emptyDLSig
getAxiom :: Sentence -> Axiom
toDLJunction :: JunctionType -> DLConcept -> DLConcept -> Range -> DLConcept
toDLJunction ty = case ty of
toConcept :: Description -> Result DLConcept
OWLClass curi -> return $ DLClassId (qNameToId curi) nullRange
ObjectJunction ty ds | not $ null ds -> do
return $ foldr1 (\ c1 c2 -> toDLJunction ty c1 c2 nullRange) cs
ObjectComplementOf d -> do
return $ DLNot c nullRange
ObjectOneOf is -> return $ DLOneOf (map qNameToId is) nullRange
ObjectAllValuesFrom ope d
ObjectSomeValuesFrom ope d
ObjectMinCardinality c ope md
ObjectMaxCardinality c ope md
ObjectExactCardinality c ope md
DataAllValuesFrom dpe dpes dr
DataSomeValuesFrom dpe dpes dr
DataMinCardinality c dpe mdr
DataMaxCardinality c dpe mdr
DataExactCardinality c dpe mdr
mapSenM :: Sentence -> Result DLBasicItem
PlainAxiom _ paxiom -> case paxiom of
SubClassOf sub super -> case sub of
return $ DLClass (qNameToId curi)
[DLSubClassof [c] nullRange] Nothing nullRange
EquivOrDisjointClasses ty (cl : cs) -> case cl of
return $ DLClass (qNameToId curi)
Equivalent -> DLEquivalentTo
Disjoint -> DLDisjointWith) es nullRange] Nothing nullRange
DisjointUnion _as OwlClassURI ds ->
SubObjectPropertyOf _as subOpe ope ->
EquivalentObjectProperties _as opes ->
DisjointObjectProperties _as opes ->
ObjectPropertyDomain _as ope d ->
ObjectPropertyRange _as ope d ->
InverseObjectProperties _as ope ope ->
FunctionalObjectProperty _as ope ->
InverseFunctionalObjectProperty _as ope ->
ReflexiveObjectProperty _as ope ->
IrreflexiveObjectProperty _as ope ->
SymmetricObjectProperty _as ope ->
AntisymmetricObjectProperty _as ope ->
TransitiveObjectProperty _as ope ->
SubDataPropertyOf _as dpe dpe ->
EquivalentDataProperties _as dpes ->
DisjointDataProperties _as dpes ->
DataPropertyDomain _as dpe d ->
DataPropertyRange _as dpe dr ->
FunctionalDataProperty _as dpe ->
DifferentIndividuals _as is ->
ClassAssertion _as i d ->
ObjectPropertyAssertion _as ope si ti ->
NegativeObjectPropertyAssertion _as ope si ti ->
DataPropertyAssertion _as dpe si tv ->
NegativeDataPropertyAssertion _as dpe si tv ->