Package ontopoly.model
Class AssociationType
- java.lang.Object
-
- ontopoly.model.Topic
-
- ontopoly.model.AbstractTypingTopic
-
- ontopoly.model.AssociationType
-
public class AssociationType extends AbstractTypingTopic
Represents an association type.
-
-
Constructor Summary
Constructors Constructor Description AssociationType(TopicIF currTopic, TopicMap tm)
Creates a new AssociationType object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Collection<RoleField>
getDeclaredByFields()
Returns the field definitions that are declared for this typing topic.List<RoleType>
getDeclaredRoleTypes()
Returns all role types that have been declared for this association type.LocatorIF
getLocatorIF()
Gets the LocatorIF for this typing topic.Collection<List<RoleType>>
getUsedRoleTypeCombinations()
Returns a collection of lists that contain the role type combinations that have been used in actual associations.boolean
isHierarchical()
Tests whether this association type is hierarchical.boolean
isSymmetric()
Indicates whether the association type is symmetric.void
transformInstances(List<RoleType> roleTypesFrom, List<RoleType> roleTypesTo)
Transforms associations from the role types of the given form to the new one as given.-
Methods inherited from class ontopoly.model.AbstractTypingTopic
isHidden, isReadOnly
-
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, remove, removeTopicType, toString
-
-
-
-
Method Detail
-
getLocatorIF
public LocatorIF getLocatorIF()
Description copied from class:AbstractTypingTopic
Gets the LocatorIF for this typing topic. The locator is the PSI used by the ontology topic map model.p- Specified by:
getLocatorIF
in classAbstractTypingTopic
- Returns:
- the LocatorIF for this typing topic.
-
isSymmetric
public boolean isSymmetric()
Indicates whether the association type is symmetric.
-
isHierarchical
public boolean isHierarchical()
Tests whether this association type is hierarchical.- Returns:
- true if this is association type is hierarchical.
-
getDeclaredByFields
public Collection<RoleField> getDeclaredByFields()
Description copied from class:AbstractTypingTopic
Returns the field definitions that are declared for this typing topic.- Specified by:
getDeclaredByFields
in classAbstractTypingTopic
- Returns:
- a list of FieldDefinitions.
-
getDeclaredRoleTypes
public List<RoleType> getDeclaredRoleTypes()
Returns all role types that have been declared for this association type.- Returns:
- list of role types
-
getUsedRoleTypeCombinations
public Collection<List<RoleType>> getUsedRoleTypeCombinations()
Returns a collection of lists that contain the role type combinations that have been used in actual associations. The RoleTypes are sorted by object id.- Returns:
- Collection
- >
-
transformInstances
public void transformInstances(List<RoleType> roleTypesFrom, List<RoleType> roleTypesTo)
Transforms associations from the role types of the given form to the new one as given.- Parameters:
roleTypesFrom
- list of role types that should match existing associationsroleTypesTo
- list of role types to which the associations should be changed
-
-