ontopoly.model
Class AssociationField

java.lang.Object
  extended by ontopoly.model.Topic
      extended by ontopoly.model.AssociationField

public class AssociationField
extends Topic

Represents an association field.


Constructor Summary
AssociationField(TopicIF topic, TopicMap tm)
           
AssociationField(TopicIF topic, TopicMap tm, AssociationType associationType)
           
 
Method Summary
 boolean equals(java.lang.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.
 java.util.Collection<RoleField> getDeclaredByFields()
          Gets the role fields that are assigned to this association field.
 java.util.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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssociationField

public AssociationField(TopicIF topic,
                        TopicMap tm)

AssociationField

public AssociationField(TopicIF topic,
                        TopicMap tm,
                        AssociationType associationType)
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class Topic

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 java.util.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.

Overrides:
remove in class Topic
Parameters:
listener - listener that gets call back from the deleting this topic, and any dependencies.p

getDeclaredByFields

public java.util.Collection<RoleField> getDeclaredByFields()
Gets the role fields that are assigned to this association field.

Returns:
Collection of RoleField


Copyright © 2000-2012 Ontopia.