Hets - the Heterogeneous Tool Set

Copyright(c) Uni Bremen 2004-2007
LicenseGPLv2 or higher, see LICENSE.txt
Maintainerluecke@informatik.uni-bremen.de
Stabilityprovisional
Portabilitynon-portable (imports Control.Monad.Error)
Safe HaskellSafe

Taxonomy.MMiSSOntology

Description

MMiSSOntology provides the abstract data type for an Ontology

Synopsis

Documentation

type ClassName = String 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 #

type SuperRel = String Source #

type RelName = String Source #

data InsertMode Source #

Constructors

AutoInsert 
ThrowError 

Instances

Eq InsertMode Source # 

Methods

(==) :: InsertMode -> InsertMode -> Bool

(/=) :: InsertMode -> InsertMode -> Bool

Read InsertMode Source # 

Methods

readsPrec :: Int -> ReadS InsertMode

readList :: ReadS [InsertMode]

readPrec :: ReadPrec InsertMode

readListPrec :: ReadPrec [InsertMode]

Show InsertMode Source # 

Methods

showsPrec :: Int -> InsertMode -> ShowS

show :: InsertMode -> String

showList :: [InsertMode] -> ShowS

data ClassType Source #

Constructors

SubSort 
Predicate 

Instances

Eq ClassType Source # 

Methods

(==) :: ClassType -> ClassType -> Bool

(/=) :: ClassType -> ClassType -> Bool

Read ClassType Source # 

Methods

readsPrec :: Int -> ReadS ClassType

readList :: ReadS [ClassType]

readPrec :: ReadPrec ClassType

readListPrec :: ReadPrec [ClassType]

Show ClassType Source # 

Methods

showsPrec :: Int -> ClassType -> ShowS

show :: ClassType -> String

showList :: [ClassType] -> ShowS

weither :: (String -> b) -> (a -> b) -> WithError a -> b Source #

like either

fromWithError :: Monad m => WithError a -> m a Source #

convert to another monad

type WithError = Either String 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.

hasError :: String -> WithError a 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 #