|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.topicmaps.utils.AssociationBuilder
public class AssociationBuilder
PUBLIC: A helper class that makes it easier to build associations.
Field Summary | |
---|---|
protected TopicIF |
assoctype
|
protected TopicMapBuilderIF |
builder
|
protected TopicIF |
role1type
|
protected TopicIF |
role2type
|
protected TopicIF |
role3type
|
protected TopicIF |
role4type
|
protected java.util.Collection |
scope
|
protected TopicMapIF |
topicmap
|
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
TopicIF |
getAssociationType()
PUBLIC: Returns the type of associations the builder creates. |
java.util.Collection |
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(java.util.Collection scope)
PUBLIC: Sets the scope added to all associations created by this builder. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected TopicMapIF topicmap
protected TopicMapBuilderIF builder
protected TopicIF assoctype
protected TopicIF role1type
protected TopicIF role2type
protected TopicIF role3type
protected TopicIF role4type
protected java.util.Collection scope
Constructor Detail |
---|
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.Method Detail |
---|
public java.util.Collection getScope()
public void setScope(java.util.Collection scope)
public AssociationIF makeAssociation(TopicIF player)
public AssociationIF makeAssociation(TopicIF player1, TopicIF player2)
public AssociationIF makeAssociation(TopicIF player1, TopicIF player2, TopicIF player3)
java.lang.IllegalArgumentException
- if the builder is only configured
for binary associations.public AssociationIF makeAssociation(TopicIF player1, TopicIF player2, TopicIF player3, TopicIF player4)
java.lang.IllegalArgumentException
- if the builder is only configured
for binary or ternary associations.public TopicIF getAssociationType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |