public class AssociationBuilder extends Object
Modifier and Type | Field and Description |
---|---|
protected TopicIF |
assoctype |
protected TopicMapBuilderIF |
builder |
protected TopicIF |
role1type |
protected TopicIF |
role2type |
protected TopicIF |
role3type |
protected TopicIF |
role4type |
protected Collection<TopicIF> |
scope |
protected TopicMapIF |
topicmap |
Constructor and Description |
---|
AssociationBuilder(TopicIF assoctype,
TopicIF roletype)
PUBLIC: Creates a new AssociationBuilder for unary associations.
|
AssociationBuilder(TopicIF assoctype,
TopicIF role1type,
TopicIF role2type)
PUBLIC: Creates a new AssociationBuilder for binary associations.
|
AssociationBuilder(TopicIF assoctype,
TopicIF role1type,
TopicIF role2type,
TopicIF role3type)
PUBLIC: Creates a new AssociationBuilder for ternary associations.
|
AssociationBuilder(TopicIF assoctype,
TopicIF role1type,
TopicIF role2type,
TopicIF role3type,
TopicIF role4type)
PUBLIC: Creates a new AssociationBuilder for quad associations.
|
Modifier and Type | Method and Description |
---|---|
TopicIF |
getAssociationType()
PUBLIC: Returns the type of associations the builder creates.
|
Collection<TopicIF> |
getScope()
PUBLIC: Returns the scope added to all associations created by
this builder.
|
AssociationIF |
makeAssociation(TopicIF player)
PUBLIC: Create a unary association of the configured type, where
player is the role player.
|
AssociationIF |
makeAssociation(TopicIF player1,
TopicIF player2)
PUBLIC: Create a binary association of the configured type, where
player1 plays the first role and player2 the second.
|
AssociationIF |
makeAssociation(TopicIF player1,
TopicIF player2,
TopicIF player3)
PUBLIC: Create a ternary association of the configured type, where
player1 plays the first role, player2 the second, and player3 the
third.
|
AssociationIF |
makeAssociation(TopicIF player1,
TopicIF player2,
TopicIF player3,
TopicIF player4)
PUBLIC: Create a quad association of the configured type, where
player1 plays the first role, and player2 the second, and player3
the third, and player4 the fourth.
|
void |
setScope(Collection<TopicIF> scope)
PUBLIC: Sets the scope added to all associations created by
this builder.
|
protected TopicMapIF topicmap
protected TopicMapBuilderIF builder
protected TopicIF assoctype
protected TopicIF role1type
protected TopicIF role2type
protected TopicIF role3type
protected TopicIF role4type
protected Collection<TopicIF> scope
public AssociationBuilder(TopicIF assoctype, TopicIF roletype)
assoctype
- The type of the created associationsroletype
- The role type.public AssociationBuilder(TopicIF assoctype, TopicIF role1type, TopicIF role2type)
assoctype
- The type of the created associationsrole1type
- The first role type.role2type
- The second role type.public AssociationBuilder(TopicIF assoctype, TopicIF role1type, TopicIF role2type, TopicIF role3type)
assoctype
- The type of the created associationsrole1type
- The first role type.role2type
- The second role type.role3type
- The third role type.public AssociationBuilder(TopicIF assoctype, TopicIF role1type, TopicIF role2type, TopicIF role3type, TopicIF role4type)
assoctype
- The type of the created associationsrole1type
- The first role type.role2type
- The second role type.role3type
- The third role type.role4type
- The fourth role type.public Collection<TopicIF> getScope()
public void setScope(Collection<TopicIF> scope)
public AssociationIF makeAssociation(TopicIF player)
public AssociationIF makeAssociation(TopicIF player1, TopicIF player2)
public AssociationIF makeAssociation(TopicIF player1, TopicIF player2, TopicIF player3)
IllegalArgumentException
- if the builder is only configured
for binary associations.public AssociationIF makeAssociation(TopicIF player1, TopicIF player2, TopicIF player3, TopicIF player4)
IllegalArgumentException
- if the builder is only configured
for binary or ternary associations.public TopicIF getAssociationType()