|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The EvolutionManager is responsible for major or destructive changes and keeping the ontology consistent.
The EvolutionManager implementation can be configured with the key cf.evolutionmanager
in the ConsensusFoundation.properties
configuration file. It's an optional component.
The implementation is loaded by the ConsensusFoundation
constructor. For successful instantiation,
the EvolutionManager implementation must provide a default constructor without arguments.
ConsensusFoundation
,
OntologyManager
Method Summary | |
void |
addEvolutionListener(EvolutionListener listener)
Registers a new EvolutionListener. |
void |
deleteAssociation(User user,
Association assoc)
Deletes an association and all dependant elements (e.g. topics, if it makes sense). |
void |
deleteAttribute(User user,
Topic topic,
Attribute attr)
Deletes an attribute (and all dependant elements if there are any). |
void |
deleteTopic(User user,
Topic topic)
Deletes a topic and all dependant elements (attributes and, if it makes sense, associations), but not the subtopics of the topic. |
void |
deleteTopicAndSubtopics(User user,
Topic topic)
Deletes a topic and all dependant elements, including the subtopics of the topic. |
void |
init(Properties config,
LoggingManager logging,
UserManager users,
OntologyManager ontology)
This method is called by the ConsensusFoundation constructor to initialize the EvolutionManager. |
Topic |
makeClass(User user,
Topic instance)
Converts an instance topic into a class topic. |
Topic |
makeInstance(User user,
Topic cls)
Converts an instance topic into a class topic. |
Topic |
mergeTopics(User user,
Topic topic1,
Topic topic2)
Merges two topics. |
void |
removeEvolutionListener(EvolutionListener listener)
Removes an EvolutionListener, if it is registered with the EvolutionManager (otherwise this call is ignored). |
Methods inherited from interface de.uka.ipd.consensus.foundation.ConsensusFoundationModule |
getConsensusFoundationManager, getVersion, initCompleted, shutdown |
Method Detail |
public void init(Properties config, LoggingManager logging, UserManager users, OntologyManager ontology) throws Exception
This method is called by the ConsensusFoundation
constructor to initialize the EvolutionManager.
config
- all entries from ConsensusFoundation.properties
logging
- the successfully initialized LoggingManager instanceusers
- the the successfully initialized UserManager instanceontology
- the the successfully initialized OntologyManager instance
Exception
- if any error occurs (startup of the application is aborted in this case)ConsensusFoundation.ConsensusFoundation()
public void deleteTopic(User user, Topic topic) throws EvolutionManagerException, DynamicRightsManagerException
user
- the user who wants to delete the topictopic
- the topic to be deleted
EvolutionManagerException
- if the topic could not be deleted
DynamicRightsManagerException
- if the user is not allowed to delete the topic
UnsupportedOperationException
- if the implementation does not support deletion of topicsTopic.isClassTopic()
,
DynamicRightsManager.mayDeleteTopic(User, Topic)
,
OntologyManager.deleteTopic(Topic)
,
deleteTopicAndSubtopics(User, Topic)
public void deleteTopicAndSubtopics(User user, Topic topic) throws EvolutionManagerException, DynamicRightsManagerException
user
- the user who wants to delete the topictopic
- the topic to be deleted
EvolutionManagerException
- if the topic and its subtopics could not be deleted
DynamicRightsManagerException
- if the user is not allowed to delete the topic and its subtopics
UnsupportedOperationException
- if the implementation does not support deletion of topicsDynamicRightsManager.mayDeleteTopic(User, Topic)
,
OntologyManager.deleteTopic(Topic)
,
deleteTopic(User, Topic)
public void deleteAssociation(User user, Association assoc) throws EvolutionManagerException, DynamicRightsManagerException
user
- the user who wants to delete the associationassoc
- the association to be deleted
EvolutionManagerException
- if the association could not be deleted
DynamicRightsManagerException
- if the user is not allowed to delete the association
UnsupportedOperationException
- if the implementation does not support deletion of associationsDynamicRightsManager.mayDeleteAssociation(User, Association)
,
OntologyManager.deleteAssociation(Association)
public void deleteAttribute(User user, Topic topic, Attribute attr) throws EvolutionManagerException, DynamicRightsManagerException
user
- the user who wants to delete the attributetopic
- the topic from which the attribute will be removedattr
- the attribute to be deleted
EvolutionManagerException
- if the attribute could not be deleted
DynamicRightsManagerException
- if the user is not allowed to delete the attribute
UnsupportedOperationException
- if the implementation does not support deletion of attributesOntologyManager.deleteAttribute(Attribute)
public Topic mergeTopics(User user, Topic topic1, Topic topic2) throws EvolutionManagerException, DynamicRightsManagerException
Note that the topic returned is not necessarily one of the argument topics. An implementation may decide to return a newly created topic.
user
- the user who wants to merge the topicstopic1
- the first topic to be mergedtopic2
- the second topic to be merged
EvolutionManagerException
- if the two topics could not be merged
DynamicRightsManagerException
- if the user is not allowed to merge the topics
UnsupportedOperationException
- if the implementation does not support merging of topicsDynamicRightsManager.mayMergeTopics(User, Topic, Topic)
public Topic makeClass(User user, Topic instance) throws EvolutionManagerException, DynamicRightsManagerException
user
- the user who wants to convert the topic into a class topicinstance
- the instance topic to be converted
EvolutionManagerException
- if the instance topic could not be converted into a class topic
DynamicRightsManagerException
- if the user is not allowed to convert the topic
UnsupportedOperationException
- if the implementation does not support changing a topic's class flagTopic.isClassTopic()
public Topic makeInstance(User user, Topic cls) throws EvolutionManagerException, DynamicRightsManagerException
This is more than just calling Topic.setClassTopic()
since the implementation has to take care
what happens with subclasses of the class topic.
user
- the user who wants to convert the topic into an instance topiccls
- the class topic to be converted
EvolutionManagerException
- if the class topic could not be converted into an instance topic
DynamicRightsManagerException
- if the user is not allowed to convert the topic
UnsupportedOperationException
- if the implementation does not support changing a topic's class flagTopic.isClassTopic()
public void addEvolutionListener(EvolutionListener listener)
listener
- the EvolutionListener to be addedpublic void removeEvolutionListener(EvolutionListener listener)
listener
- the EvolutionListener to be removed
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |