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-Inferred |
MMiSSOntology provides the abstract data type for an Ontology
- 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
- data InsertMode
- data OntoObjectType
- data ClassType
- weither :: (String -> b) -> (a -> b) -> WithError a -> b
- fromWithError :: Monad 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
type ClassGraph = Gr (String, String, OntoObjectType) String
type ObjectName = String
type SuperClass = String
type DefaultText = String
type Cardinality = String
data RelationProperty
fromWithError :: Monad m => WithError a -> m a
convert to another monad
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
inserts a new Relation into the Ontology. It throws an error if the relation name already exists.
insertRelationType :: MMiSSOntology -> RelName -> ClassName -> ClassName -> WithError MMiSSOntology
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
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]
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
getRelationNames :: MMiSSOntology -> [String]
gselName :: String -> ClassGraph -> [Context (String, String, OntoObjectType) String]
gselType :: (OntoObjectType -> Bool) -> ClassGraph -> [Context (String, String, OntoObjectType) String]
findLNode :: ClassGraph -> String -> Maybe Node