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 RelationProperty Source #

Constructors

InversOf String 
Functional 

Instances

Instances details
Eq RelationProperty Source # 
Instance details

Defined in Taxonomy.MMiSSOntology

Read RelationProperty Source # 
Instance details

Defined in Taxonomy.MMiSSOntology

Show RelationProperty Source # 
Instance details

Defined in Taxonomy.MMiSSOntology

Methods

showsPrec :: Int -> RelationProperty -> ShowS

show :: RelationProperty -> String

showList :: [RelationProperty] -> ShowS

data InsertMode Source #

Constructors

AutoInsert 
ThrowError 

Instances

Instances details
Eq InsertMode Source # 
Instance details

Defined in Taxonomy.MMiSSOntology

Methods

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

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

Read InsertMode Source # 
Instance details

Defined in Taxonomy.MMiSSOntology

Methods

readsPrec :: Int -> ReadS InsertMode

readList :: ReadS [InsertMode]

readPrec :: ReadPrec InsertMode

readListPrec :: ReadPrec [InsertMode]

Show InsertMode Source # 
Instance details

Defined in Taxonomy.MMiSSOntology

Methods

showsPrec :: Int -> InsertMode -> ShowS

show :: InsertMode -> String

showList :: [InsertMode] -> ShowS

data OntoObjectType Source #

Instances

Instances details
Eq OntoObjectType Source # 
Instance details

Defined in Common.Taxonomy

Show OntoObjectType Source # 
Instance details

Defined in Common.Taxonomy

Methods

showsPrec :: Int -> OntoObjectType -> ShowS

show :: OntoObjectType -> String

showList :: [OntoObjectType] -> ShowS

data ClassType Source #

Constructors

SubSort 
Predicate 

Instances

Instances details
Eq ClassType Source # 
Instance details

Defined in Taxonomy.MMiSSOntology

Methods

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

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

Read ClassType Source # 
Instance details

Defined in Taxonomy.MMiSSOntology

Methods

readsPrec :: Int -> ReadS ClassType

readList :: ReadS [ClassType]

readPrec :: ReadPrec ClassType

readListPrec :: ReadPrec [ClassType]

Show ClassType Source # 
Instance details

Defined in Taxonomy.MMiSSOntology

Methods

showsPrec :: Int -> ClassType -> ShowS

show :: ClassType -> String

showList :: [ClassType] -> ShowS

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

like either

fromWithError :: MonadFail 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 #