Package ontopoly.model
Class Topic
java.lang.Object
ontopoly.model.Topic
- Direct Known Subclasses:
AbstractTypingTopic,AssociationField,Cardinality,CreateAction,DataType,EditMode,FieldDefinition,FieldsView,InterfaceControl
INTERNAL: Common superclass for all topics, like instances, association
types, topic types, role types, etc. FIXME: Should there be another subtype
for isHidden, isReadOnly etc?
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTopicType(TopicType type) Adds the topic type to the list of topic types that topic is a direct instance of.booleanprotected voidfindDependentObjects(Collection<Topic> alreadyKnownDependentObjects) Find all objects that are dependent on this topic and that should be removed if this topic is removed.getFieldInstances(TopicType topicType) getFieldInstances(TopicType topicType, FieldsView fieldsView) getId()Gets the id of this topic.getMostSpecificTopicType(TopicType topicType) Given the topic type, find the subtype that is the specific type of this topic.getName()Gets the unscoped name of the topic.Gets the topicIF object of this topic.Gets the topicMap this topic belongs to.Returns the topic types of which this topic is a direct instance.inthashCode()booleanTests whether this topic is an association type.booleanTests whether this topic is a field definition or an association field.booleanisInstanceOf(LocatorIF psi) booleanisInstanceOf(Topic type) booleanTests whether this topic is a name type.booleanTests whether this topic is an occurrence type.booleanTests whether this topic is an instance of an ontology type, i.e. an instance of topic type, name type, occurrence type, association type or role type.booleanTests whether this topic is an ontology type, i.e. topic type, name type, occurrence type, association type or role type.booleanbooleanbooleanTests whether this topic is a role type.booleanTests whether this topic is a system topic type.booleanTests whether this topic is a topic map.booleanTests whether this topic is a topic type.voidremove(LifeCycleListener listener) Removes the topic from the topic map.voidremoveTopicType(TopicType type) Removes the topic type from the list of topic types that topic is a direct instance of.toString()
-
Constructor Details
-
Topic
Constructor.- Parameters:
topicIF- the TopicIF object associated with this topic.tm- the TopicMap this topic belongs to.
-
-
Method Details
-
getId
Gets the id of this topic.- Returns:
- the id of this topic.
-
getTopicIF
Gets the topicIF object of this topic.- Returns:
- the topicIF object of this topic.
-
getTopicMap
Gets the topicMap this topic belongs to.- Returns:
- the topicMap this topic belongs to.
-
getName
Gets the unscoped name of the topic.- Returns:
- the unscoped name of the topic or null if no name has been set.
-
isTopicMap
public boolean isTopicMap()Tests whether this topic is a topic map.- Returns:
- true if this is a topic map.
-
isTopicType
public boolean isTopicType()Tests whether this topic is a topic type.- Returns:
- true if this is a topic type.
-
isNameType
public boolean isNameType()Tests whether this topic is a name type.- Returns:
- true if this is a name type.
-
isOccurrenceType
public boolean isOccurrenceType()Tests whether this topic is an occurrence type.- Returns:
- true if this is an occurrence type.
-
isAssociationType
public boolean isAssociationType()Tests whether this topic is an association type.- Returns:
- true if this is an association type.
-
isRoleType
public boolean isRoleType()Tests whether this topic is a role type.- Returns:
- true if this is a role type.
-
isFieldDefinition
public boolean isFieldDefinition()Tests whether this topic is a field definition or an association field.- Returns:
- true if this is a role type.
-
isSystemTopic
public boolean isSystemTopic()Tests whether this topic is a system topic type.- Returns:
- true if this is a system topic type.
-
isPrivateSystemTopic
public boolean isPrivateSystemTopic() -
isPublicSystemTopic
public boolean isPublicSystemTopic() -
isOntologyTopic
public boolean isOntologyTopic()Tests whether this topic is an instance of an ontology type, i.e. an instance of topic type, name type, occurrence type, association type or role type.- Returns:
- true if this is an instance of an ontology type.
-
isOntologyType
public boolean isOntologyType()Tests whether this topic is an ontology type, i.e. topic type, name type, occurrence type, association type or role type.- Returns:
- true if this is an ontology type.
-
getMostSpecificTopicType
Given the topic type, find the subtype that is the specific type of this topic. The topic type given is usually a super type of the specific type. If null is returned then the topic type is not a super type of this topic.- Parameters:
topicType- the super type of this topic- Returns:
- the most specific type of this type, or null if there is none.
-
getTopicTypes
Returns the topic types of which this topic is a direct instance. -
addTopicType
Adds the topic type to the list of topic types that topic is a direct instance of. -
removeTopicType
Removes the topic type from the list of topic types that topic is a direct instance of. -
getFieldInstances
-
getFieldInstances
-
remove
Removes the topic from the topic map.- Parameters:
listener- listener that gets call back from the deleting this topic, and any dependencies.p
-
getDependentObjects
-
findDependentObjects
Find all objects that are dependent on this topic and that should be removed if this topic is removed. At the moment a dependent object is an object that is associated to this topic through a role field that has on:create-only-mode enabled. The dependencies are transitive. -
equals
-
hashCode
public int hashCode() -
toString
-
copyCharacteristics
-
isInstanceOf
-
isInstanceOf
-