Package ontopoly.model
Class AssociationField
- java.lang.Object
-
- ontopoly.model.Topic
-
- ontopoly.model.AssociationField
-
public class AssociationField extends Topic
Represents an association field.
-
-
Constructor Summary
Constructors Constructor Description AssociationField(TopicIF topic, TopicMap tm)
AssociationField(TopicIF topic, TopicMap tm, AssociationType associationType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
getArity()
Returns the arity of the association field, i.e.AssociationType
getAssociationType()
Gets the association type that is assigned to this association field.Collection<RoleField>
getDeclaredByFields()
Gets the role fields that are assigned to this association field.List<RoleField>
getFieldsForRoles()
Returns the fields for the roles in this association type.void
remove(LifeCycleListener listener)
Removes the topic from the topic map.-
Methods inherited from class ontopoly.model.Topic
addTopicType, copyCharacteristics, findDependentObjects, getDependentObjects, getFieldInstances, getFieldInstances, getId, getMostSpecificTopicType, getName, getTopicIF, getTopicMap, getTopicTypes, hashCode, isAssociationType, isFieldDefinition, isInstanceOf, isInstanceOf, isNameType, isOccurrenceType, isOntologyTopic, isOntologyType, isPrivateSystemTopic, isPublicSystemTopic, isRoleType, isSystemTopic, isTopicMap, isTopicType, removeTopicType, toString
-
-
-
-
Constructor Detail
-
AssociationField
public AssociationField(TopicIF topic, TopicMap tm, AssociationType associationType)
-
-
Method Detail
-
getAssociationType
public AssociationType getAssociationType()
Gets the association type that is assigned to this association field.- Returns:
- the association type.
-
getArity
public int getArity()
Returns the arity of the association field, i.e. the number of roles that can be played.- Returns:
- integer representing the number of allowed roles.
-
getFieldsForRoles
public List<RoleField> getFieldsForRoles()
Returns the fields for the roles in this association type.- Returns:
- List of RoleField objects
-
remove
public void remove(LifeCycleListener listener)
Description copied from class:Topic
Removes the topic from the topic map.
-
getDeclaredByFields
public Collection<RoleField> getDeclaredByFields()
Gets the role fields that are assigned to this association field.- Returns:
- Collection of RoleField
-
-