|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.tm4j.topicmap.unified.UnifiedTopicMapObject
org.tm4j.topicmap.unified.UnifiedScopedObject
org.tm4j.topicmap.unified.UnifiedAssociation
Wrapper class around an object implementing the Association interface. This wrapper enforces a read-only interface and returns UnifiedTopic and UnifiedMember instances from the get...() methods.
| Field Summary |
| Fields inherited from class org.tm4j.topicmap.unified.UnifiedTopicMapObject |
m_tm |
| Constructor Summary | |
UnifiedAssociation(UnifiedTopicMap tm,
Association base)
|
|
| Method Summary | |
void |
addMember(Member m)
Adds a new Member to the association. |
Member |
createMember(java.lang.String id)
Creates a new Member and adds it to this Association. |
Member |
createMember(java.lang.String id,
Locator resourceLoc,
Topic roleSpec,
java.util.Collection players)
Creates a new Member and adds it to this Association. |
java.util.Collection |
getMembers()
Returns the Members that the Association contains. |
java.util.Collection |
getMembersOfRole(Topic roleSpec)
Returns the Member objects which play the specified role in this association. |
TopicMap |
getParent()
Returns the TopicMap object which contains this Association object. |
Topic |
getType()
Gets the Topic defining the type of the Association. |
boolean |
isOfType(Topic type)
Determines whether the type of the association is described by type. |
void |
removeMember(Member m)
Removes a member from this association. |
void |
setMembers(Member[] m)
Defines the member constructs which are members of this association. |
void |
setType(Topic t)
Sets the Topic defining the type of this Association. |
| Methods inherited from class org.tm4j.topicmap.unified.UnifiedScopedObject |
addTheme, dispose, getScope, inScope, inScope, removeTheme, setScope |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.tm4j.topicmap.Association |
dispose |
| Methods inherited from interface org.tm4j.topicmap.ScopedObject |
addTheme, getScope, inScope, inScope, removeTheme, setScope |
| Constructor Detail |
public UnifiedAssociation(UnifiedTopicMap tm,
Association base)
| Method Detail |
public java.util.Collection getMembersOfRole(Topic roleSpec)
Association
getMembersOfRole in interface AssociationroleSpec - The Topic specifying the role that the returned Members must play.
public TopicMap getParent()
Association
getParent in interface Associationpublic Topic getType()
Association
getType in interface Associationnull is returned.public boolean isOfType(Topic type)
Associationtype.
isOfType in interface Associationtrue if the type of this Association is defined by the topic
type, false otherwise.public java.util.Collection getMembers()
Association
getMembers in interface AssociationMember objects
defining the members of this Association.
If no members are currently defined for this
association, the returned collection is empty;
it is never null.public void addMember(Member m)
AssociationIf member is a member of another association, then
it will be removed from that association and added to this association.
If member is a member of this association already,
then this method has no effect.
addMember in interface Associationm - The Member to be added.public void setMembers(Member[] m)
Association
setMembers in interface Associationm - the new set of members to be part of
this association. If this is null,
all the existing members of this association
are removed.public Member createMember(java.lang.String id)
Association
createMember in interface Associationid - the unique ID to be assigned to the newly created Member object. If
null, then the back-end will assign a unique ID to the object.
public Member createMember(java.lang.String id,
Locator resourceLoc,
Topic roleSpec,
java.util.Collection players)
throws DuplicateObjectIDException,
java.beans.PropertyVetoException,
DuplicateResourceLocatorException
Association
createMember in interface Associationid - the unique ID to be assigned to the newly created Member object. If
this parameter is null, then the back-end will assign a unique ID to
the object.resourceLoc - the address of the syntactic element that caused the creation
of this Member (e.g. the address of the XTM member element). This parameter
may be null for Member objects not created from syntactic elements or created
from syntactic elements with no address.roleSpec - the topic which defines the role played in the association. This parameter
may be null for a Member which plays no defined role in the association.players - the role players. This parameter must be a Collection of Topics.
DuplicateObjectIDException
java.beans.PropertyVetoException
DuplicateResourceLocatorExceptionpublic void removeMember(Member m)
Association
removeMember in interface Associationm - The member to be removed.public void setType(Topic t)
Association
setType in interface Associationt - The Topic to define the type of the association.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||