Copyright | (c) Uni Bremen 2004-2007 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | luecke@informatik.uni-bremen.de |
Stability | provisional |
Portability | non-portable (imports Control.Monad.Error) |
Safe Haskell | Safe |
Taxonomy.MMiSSOntology
Description
MMiSSOntology provides the abstract data type for an Ontology
Synopsis
- data MMiSSOntology
- type ClassName = String
- type ClassGraph = Gr (String, String, OntoObjectType) String
- type ObjectName = String
- type SuperClass = String
- type DefaultText = String
- type Cardinality = String
- type SuperRel = String
- type RelName = String
- data RelationProperty
- = InversOf String
- | Functional
- data InsertMode
- data OntoObjectType
- data ClassType
- weither :: (String -> b) -> (a -> b) -> WithError a -> b
- fromWithError :: MonadFail m => WithError a -> m a
- type WithError = Either String
- emptyMMiSSOntology :: String -> InsertMode -> MMiSSOntology
- insertClass :: MMiSSOntology -> ClassName -> DefaultText -> [SuperClass] -> Maybe ClassType -> WithError MMiSSOntology
- insertObject :: MMiSSOntology -> ObjectName -> DefaultText -> ClassName -> WithError MMiSSOntology
- insertBaseRelation :: MMiSSOntology -> RelName -> DefaultText -> Maybe SuperRel -> Maybe Cardinality -> WithError MMiSSOntology
- insertRelationType :: MMiSSOntology -> RelName -> ClassName -> ClassName -> WithError MMiSSOntology
- insertLink :: MMiSSOntology -> String -> String -> String -> WithError MMiSSOntology
- isComplete :: MMiSSOntology -> [String]
- exportOWL :: MMiSSOntology -> String
- getOntologyName :: MMiSSOntology -> String
- getRelationNames :: MMiSSOntology -> [String]
- getClassGraph :: MMiSSOntology -> ClassGraph
- getRelationGraph :: MMiSSOntology -> Gr String String
- hasError :: String -> WithError a
- hasValue :: a -> WithError a
- gselName :: String -> ClassGraph -> [Context (String, String, OntoObjectType) String]
- gselType :: (OntoObjectType -> Bool) -> ClassGraph -> [Context (String, String, OntoObjectType) String]
- findLNode :: ClassGraph -> String -> Maybe Node
Documentation
data MMiSSOntology Source #
type ClassGraph = Gr (String, String, OntoObjectType) String Source #
type ObjectName = String Source #
type SuperClass = String Source #
type DefaultText = String Source #
type Cardinality = String Source #
data RelationProperty Source #
Constructors
InversOf String | |
Functional |
Instances
Eq RelationProperty Source # | |
Defined in Taxonomy.MMiSSOntology Methods (==) :: RelationProperty -> RelationProperty -> Bool (/=) :: RelationProperty -> RelationProperty -> Bool | |
Read RelationProperty Source # | |
Defined in Taxonomy.MMiSSOntology Methods readsPrec :: Int -> ReadS RelationProperty readList :: ReadS [RelationProperty] readPrec :: ReadPrec RelationProperty readListPrec :: ReadPrec [RelationProperty] | |
Show RelationProperty Source # | |
Defined in Taxonomy.MMiSSOntology Methods showsPrec :: Int -> RelationProperty -> ShowS show :: RelationProperty -> String showList :: [RelationProperty] -> ShowS |
data InsertMode Source #
Constructors
AutoInsert | |
ThrowError |
Instances
Eq InsertMode Source # | |
Defined in Taxonomy.MMiSSOntology | |
Read InsertMode Source # | |
Defined in Taxonomy.MMiSSOntology Methods readsPrec :: Int -> ReadS InsertMode readList :: ReadS [InsertMode] readPrec :: ReadPrec InsertMode readListPrec :: ReadPrec [InsertMode] | |
Show InsertMode Source # | |
Defined in Taxonomy.MMiSSOntology Methods showsPrec :: Int -> InsertMode -> ShowS show :: InsertMode -> String showList :: [InsertMode] -> ShowS |
data OntoObjectType Source #
Constructors
OntoClass | |
OntoObject | |
OntoPredicate |
Instances
Eq OntoObjectType Source # | |
Defined in Common.Taxonomy Methods (==) :: OntoObjectType -> OntoObjectType -> Bool (/=) :: OntoObjectType -> OntoObjectType -> Bool | |
Show OntoObjectType Source # | |
Defined in Common.Taxonomy Methods showsPrec :: Int -> OntoObjectType -> ShowS show :: OntoObjectType -> String showList :: [OntoObjectType] -> ShowS |
fromWithError :: MonadFail m => WithError a -> m a Source #
convert to another monad
emptyMMiSSOntology :: String -> InsertMode -> MMiSSOntology Source #
insertClass :: MMiSSOntology -> ClassName -> DefaultText -> [SuperClass] -> Maybe ClassType -> WithError MMiSSOntology Source #
insertObject :: MMiSSOntology -> ObjectName -> DefaultText -> ClassName -> WithError MMiSSOntology Source #
insertBaseRelation :: MMiSSOntology -> RelName -> DefaultText -> Maybe SuperRel -> Maybe Cardinality -> WithError MMiSSOntology Source #
inserts a new Relation into the Ontology. It throws an error if the relation name already exists.
insertRelationType :: MMiSSOntology -> RelName -> ClassName -> ClassName -> WithError MMiSSOntology Source #
inserts a new RelationType declaration into the Ontology. It throws an error if the relation name doesn't exist.
insertLink :: MMiSSOntology -> String -> String -> String -> WithError MMiSSOntology Source #
inserts a new link of type RelationName between the two given objects. Throws an error if RelationName, SourceObject or TargetObject doesn't exist.
isComplete :: MMiSSOntology -> [String] Source #
is checking ontologies which have been created in AutoInsert
mode. For these ontologies there could be classes and relations
that were inserted automatically rather than defined properly
via insertClass or insertRelation. If the InsertMode of the
provided ontology is ThrowError
returns an empty list. If
there are no classes or relations with AutoInserted mark returns
also an empty list, otherwise it returns a list of error
messages stating, which class or which relation definition is
missing.
exportOWL :: MMiSSOntology -> String Source #
getOntologyName :: MMiSSOntology -> String Source #
getRelationNames :: MMiSSOntology -> [String] Source #
getRelationGraph :: MMiSSOntology -> Gr String String Source #
gselName :: String -> ClassGraph -> [Context (String, String, OntoObjectType) String] Source #
gselType :: (OntoObjectType -> Bool) -> ClassGraph -> [Context (String, String, OntoObjectType) String] Source #
findLNode :: ClassGraph -> String -> Maybe Node Source #