de.uka.ipd.consensus.foundation.schema
Interface Concept

All Superinterfaces:
Commentatable, Comparable, Createable, Rateable, Serializable, Versionable
All Known Subinterfaces:
Association, Attribute, Topic
All Known Implementing Classes:
AssociationImpl, AttributeImpl, TM4JTopicWrapper, TopicImpl

public interface Concept
extends Versionable, Commentatable, Rateable, Createable, Serializable, Comparable

This is the superinterface of the main elements of the ontology: topics, associations and attributes.

Version:
2006-06-14
Author:
Thomas Much

Method Summary
 String getId()
          Returns the concept's unique id that was either computed automatically or given explicitely at creation time.
 String getName()
          Returns the concept's name.
 boolean isOfType(Topic type)
          Checks if this concept is of the given type.
 void setName(User setter, String name)
          Changes the concept's name.
 
Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Versionable
getVersion
 
Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Commentatable
getComment, setComment
 
Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Rateable
addRating, getAverageRatingValue, getRating, getRatings, getRatingsCount
 
Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Createable
getCreator
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getId

public String getId()
Returns the concept's unique id that was either computed automatically or given explicitely at creation time.

Specified by:
getId in interface Rateable
Returns:
the id (never empty, never null)
See Also:
OntologyManager.createTopic(User, String, String, Topic), OntologyManager.createAssociation(User, String, String, Topic), OntologyManager.createAttribute(User, String, String, String, Topic)

getName

public String getName()
Returns the concept's name.

Returns:
the name of the concept (may be the empty string, but never null)

setName

public void setName(User setter,
                    String name)
             throws OntologyManagerException,
                    DynamicRightsManagerException
Changes the concept's name.

Parameters:
setter - the user who wants to change the name
name - the new name
Throws:
OntologyManagerException - if the name could not be changed
DynamicRightsManagerException - if the user is not allowed to change the name

isOfType

public boolean isOfType(Topic type)
Checks if this concept is of the given type.

Parameters:
type - the type topic, including null for typeless concepts
Returns:
true if the concept is of the specified type, false otherwise