|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface repesents a topic, the main element of the ontology.
OntologyManager.createTopic(User, String, String, Topic)
,
OntologyManager.createClassTopic(User, String, String, Topic)
,
OntologyManager.createInternalTopic(User, String, String, Topic)
Method Summary | |
Occurrence |
addOccurrence(User adder,
String data,
Topic type)
Creates an occurrence for this topic with the given type and value (data). |
SuperSubclass |
addSuperclass(User adder,
Topic cls)
Adds a superclass to this topic. |
Synonym |
addSynonym(User adder,
Topic synonym)
Adds another topic as a synonym to this topic (and vice versa). |
TypeInstance |
addType(User adder,
Topic type)
Adds a type to this topic. |
Collection |
getAssociations(User user)
Returns a collection of Association objects in which this topic plays a role. |
Collection |
getInstances(User user)
Returns a collection of TypeInstance objects containing the instances of this type (class) topic. |
Occurrence |
getOccurrence(User user,
String id)
Queries an occurrence of this topic with the given id. |
Collection |
getOccurrences(Topic type)
Returns a collection of all Occurrence objects of a certain type for this topic. |
Collection |
getOccurrences(User user)
Returns a collection of all Occurrence objects for this topic. |
Collection |
getSubclasses(User user)
Returns a collection of SuperSubclass objects containing the subclasses of this class topic. |
SuperSubclass |
getSuperclass(User user,
String id)
Queries a superclass of this topic with the given id. |
Collection |
getSuperclasses(User user)
Returns a collection of SuperSubclass objects containing the superclasses of this class topic. |
Synonym |
getSynonym(User user,
String id)
Queries a synonym of this topic with the given id. |
Collection |
getSynonyms(User user)
Returns a collection of all Synonym objects for this topic. |
TypeInstance |
getType(User user,
String id)
Queries a type with the given id of this instance topic. |
Collection |
getTypes(User user)
Returns a collection of TypeInstance objects containing the types of this instance topic. |
boolean |
isClassTopic()
Checks if this topic is a class topic. |
boolean |
isSynonymous(Topic topic)
Checks if the given topic is synonymous with this topic. |
void |
removeOccurrence(User remover,
Occurrence occ)
Removes an occurrence from this topic. |
void |
removeSuperclass(User remover,
Topic cls)
Removes a superclass from this class topic. |
void |
removeSynonym(User remover,
Topic synonym)
Removes a synonymous topic from this topic (and vice versa). |
void |
removeType(User remover,
Topic type)
Removes a type from this topic. |
void |
setClassTopic(boolean isclass)
Controls the class flag, i.e. if the topic is a class or an instance topic. |
Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Concept |
getId, getName, isOfType, setName |
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 |
Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Attributeable |
addAttribute, getAttribute, getAttributes, getAttributes, removeAttribute |
Method Detail |
public Collection getAssociations(User user)
user
- the user who wants to see the associations
null
Association
,
DynamicRightsManager.mayViewAssociation(User, Association)
,
QueryEngine.getAssociations(User, Topic)
public TypeInstance getType(User user, String id)
user
- the user who wants to see the typeid
- the queried id
null
if there's no type with the given idDynamicRightsManager.mayViewTopic(User, Topic)
,
getSuperclass(User, String)
public Collection getTypes(User user)
user
- the user who wants to see the types
null
TypeInstance
,
DynamicRightsManager.mayViewTopic(User, Topic)
,
QueryEngine.getTypes(User, Topic)
,
getSuperclasses(User)
public Collection getInstances(User user)
user
- the user who wants to see the instances
null
TypeInstance
,
DynamicRightsManager.mayViewTopic(User, Topic)
,
QueryEngine.getInstances(User, Topic)
,
isClassTopic()
,
getSubclasses(User)
public TypeInstance addType(User adder, Topic type) throws OntologyManagerException, DynamicRightsManagerException
adder
- the user who wants to add the typetype
- the type topic to be added (must not be null
)
OntologyManagerException
- if the type could not be added
DynamicRightsManagerException
- if the user is not allowed to add a typeisClassTopic()
,
DynamicRightsManager.mayAddType(User, Topic)
,
addSuperclass(User, Topic)
public void removeType(User remover, Topic type) throws OntologyManagerException, DynamicRightsManagerException
remover
- the user who wants to remove the typetype
- the type to be removed
OntologyManagerException
- if the type could not be removed
DynamicRightsManagerException
- if the user is not allowed to remove the typeTypeInstance
,
DynamicRightsManager.mayRemoveType(User, TypeInstance)
,
removeSuperclass(User, Topic)
public Occurrence addOccurrence(User adder, String data, Topic type) throws OntologyManagerException, DynamicRightsManagerException
adder
- the user who wants to create the occurrencedata
- the value of the occurrence (null
is treated as the empty string)type
- the type of the occurrence, including null
for a typeless occurrence
OntologyManagerException
- if a new occurrence could not be created
DynamicRightsManagerException
- if the user is not allowed to create occurrencesisClassTopic()
,
DynamicRightsManager.mayChangeOccurrence(User)
public void removeOccurrence(User remover, Occurrence occ) throws OntologyManagerException, DynamicRightsManagerException
remover
- the user who wants to remove the occurrence.occ
- the occurrence to be removed
OntologyManagerException
- if the occurrence could not be removed
DynamicRightsManagerException
- if the user is not allowed to remove occurrencesDynamicRightsManager.mayChangeOccurrence(User)
public Collection getOccurrences(User user)
user
- the user who wants to see the occurrences.
null
Occurrence
,
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getOccurrences(Topic type)
type
- the type of the occurrences
null
Occurrence
public Occurrence getOccurrence(User user, String id)
user
- the user who wants to see the occurrenceid
- the queried id
null
if there's no occurrence with the given id for this topicOccurrence.getId()
,
DynamicRightsManager.mayViewTopic(User, Topic)
public Synonym addSynonym(User adder, Topic synonym) throws OntologyManagerException, DynamicRightsManagerException
adder
- the user who wants to add the synonymsynonym
- the synonymous topic to be added (not null
, not this topic itself)
OntologyManagerException
- if the synonymous topic could not be added
DynamicRightsManagerException
- if the user is not allowed to add synonymsDynamicRightsManager.mayAddSynonym(User, Topic)
public void removeSynonym(User remover, Topic synonym) throws OntologyManagerException, DynamicRightsManagerException
remover
- the user who wants to remove the synonymous topicsynonym
- the synonymous topic to be removed
OntologyManagerException
- if the synonymous topic could not be removed
DynamicRightsManagerException
- if the user is not allowed to remove the synonymous topicSynonym
,
DynamicRightsManager.mayRemoveSynonym(User, Synonym)
public Collection getSynonyms(User user)
user
- the user who wants to see the synonyms
null
Synonym
,
DynamicRightsManager.mayViewTopic(User, Topic)
public Synonym getSynonym(User user, String id)
user
- the user who wants to see the synonymid
- the queried id
null
if there's no synonym with the given idDynamicRightsManager.mayViewTopic(User, Topic)
public boolean isSynonymous(Topic topic)
topic
- the topic in question
true
if the two topics are synonymous, false
otherwisepublic SuperSubclass getSuperclass(User user, String id)
null
is returned.
user
- the user who wants to see the superclassid
- the queried id
null
if there's no superclass with the given idDynamicRightsManager.mayViewTopic(User, Topic)
,
isClassTopic()
,
getType(User, String)
public Collection getSuperclasses(User user)
user
- the user who wants to see the superclasses
null
SuperSubclass
,
DynamicRightsManager.mayViewTopic(User, Topic)
,
QueryEngine.getSuperclasses(User, Topic)
,
getTypes(User)
public Collection getSubclasses(User user)
user
- the user who wants to see the subclasses
null
SuperSubclass
,
DynamicRightsManager.mayViewTopic(User, Topic)
,
QueryEngine.getSubclasses(User, Topic)
,
getInstances(User)
public SuperSubclass addSuperclass(User adder, Topic cls) throws OntologyManagerException, DynamicRightsManagerException
adder
- the user who wants to add the superclasscls
- the superclass topic to be added (must not be null
)
OntologyManagerException
- if the superclass could not be added
DynamicRightsManagerException
- if the user is not allowed to add a superclass
UnsupportedOperationException
- if the implementation does not support classesisClassTopic()
,
DynamicRightsManager.mayAddClass(User, Topic)
,
addType(User, Topic)
public void removeSuperclass(User remover, Topic cls) throws OntologyManagerException, DynamicRightsManagerException
remover
- the user who wants to remove the superclasscls
- the superclass topic to be removed
OntologyManagerException
- if the superclass could not be removed
DynamicRightsManagerException
- if the user is not allowed to remove the superclass
UnsupportedOperationException
- if the implementation does not support classesisClassTopic()
,
DynamicRightsManager.mayRemoveClass(User, SuperSubclass)
,
removeType(User, Topic)
public void setClassTopic(boolean isclass) throws OntologyManagerException
Controls the class flag, i.e. if the topic is a class or an instance topic.
You can use this method explicitely if the implementation is not configured to use classes, but usually you'll let the implementation decide which topics are classes by how the topics are created.
isclass
- true
if the topic shall be a class topic, false
if it shall be an instance topic
OntologyManagerException
- if the class flag could not be changedOntologyManager.createClassTopic(User, String, String, Topic)
,
isClassTopic()
public boolean isClassTopic()
true
if this topic is a class topic, false
otherwisesetClassTopic(boolean)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |