Sublogic.hs revision 0c3badd7ad83eb89f64ef5ed1122c4fa856fb45d
e9458b1a7a19a63aa4c179f9ab20f4d50681c168Jens ElknerModule : $Header$
77998f1139e55978f6288e905cd16565f2e20298Andy GimblettCopyright : (c) Dominik Luecke, Felix Gabriel Mance
77998f1139e55978f6288e905cd16565f2e20298Andy GimblettLicense : GPLv2 or higher, see LICENSE.txt
77998f1139e55978f6288e905cd16565f2e20298Andy GimblettMaintainer : f.mance@jacobs-university.de
77998f1139e55978f6288e905cd16565f2e20298Andy GimblettStability : provisional
77998f1139e55978f6288e905cd16565f2e20298Andy GimblettPortability : portable
77998f1139e55978f6288e905cd16565f2e20298Andy GimblettHere is the place where the class Logic is instantiated for OWL2 DL.
77998f1139e55978f6288e905cd16565f2e20298Andy Gimblett ( OWLSub (..)
77998f1139e55978f6288e905cd16565f2e20298Andy Gimblett , NumberRestrictions (..)
77998f1139e55978f6288e905cd16565f2e20298Andy Gimblett , OWLDatatypes (..)
77998f1139e55978f6288e905cd16565f2e20298Andy Gimblett , printXSDName
c052e3ee4a53ee3a2da829aa142fd596ef6c9e3dAndy Gimblettimport qualified Data.Set as Set
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroederdata NumberRestrictions = None | Unqualified | Qualified
77998f1139e55978f6288e905cd16565f2e20298Andy Gimblett deriving (Show, Eq, Ord)
5fdf8899e78fea735c30253322eb7715646317e4Andy Gimblettdata OWLDatatypes = OWLDATA | OWLString |
77998f1139e55978f6288e905cd16565f2e20298Andy Gimblett OWLnormalizedString |
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder OWLBoolean | OWLDecimal | OWLFloat | OWLDouble |
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder OWLInteger | OWLnonNegativeInteger | OWLpositiveInteger |
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder OWLnonPositiveInteger | OWLnegativeInteger
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder deriving (Show, Eq, Ord, Enum, Bounded)
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von SchroederowlDatatypes :: [OWLDatatypes]
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von SchroederowlDatatypes = [minBound .. maxBound]
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von SchroederprintXSDName :: Show a => a -> String
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von SchroederprintXSDName dt =
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder drop 3 $ show dt
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroederdata OWLSub = OWLSub
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder numberRestrictions :: NumberRestrictions
5858e6262048894b0e933b547852f04aed009b58Andy Gimblett , nominals :: Bool
77998f1139e55978f6288e905cd16565f2e20298Andy Gimblett , inverseRoles :: Bool
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder , roleTransitivity :: Bool
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder , roleHierarchy :: Bool
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder , complexRoleInclusions :: Bool
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder , addFeatures :: Bool
06dd4e7c29f33f6122a910719e3bd9062256e397Andy Gimblett , datatype :: Set.Set OWLDatatypes
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder } deriving (Show, Eq, Ord)
, datatype = Set.fromList owlDatatypes
, datatype = Set.empty
, datatype = Set.union (datatype sl1)
++ let ds = datatype sl in if Set.null ds then "" else
++ (let ts = Set.filter (/= OWLDATA) ds
in if Set.null ts then "" else
++ (if ds == Set.fromList owlDatatypes then "-" else
intercalate "|" $ map printXSDName $ Set.toList ts)
requireDatatype sl = sl {datatype = Set.union (datatype sl)
$ Set.singleton OWLDATA}
in Set.fromList $ OWLDATA
_ -> Set.singleton OWLDATA }
if Set.size (dataProperties sig) == 0
&& Set.size (datatypes sig) == 0
if datatype s == Set.empty
datatypes = Set.empty
, dataProperties = Set.empty