Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.tm4j.topicmap
Interface Member  view Member download Member.java

All Superinterfaces:
TopicMapObject

public interface Member
extends TopicMapObject

Represents a member of an association. Members may be typed by a single topic (the roleSpec property) and are defined by zero or more topics. Note that in this definition, members are exclusively defined by Topics — implementations must ensure that when processing XTM documents, the following rules are obeyed while parsing a <member> element:


Method Summary
 void addPlayer(Topic player)
          Adds a topic as a player, meaning one of the topics that define this member.
 Association getParent()
          Returns the association to which the Member belongs.
 java.util.Collection getPlayers()
          Returns an unmodifiable collection of the Topics which are players of this Member.
 Topic getRoleSpec()
          Returns the topic which defines the type of this Member.
 void removePlayer(Topic player)
          Removes the specified topic from the list of players of this Member object.
 void setPlayers(Topic[] players)
          Sets the collection of Topics which are players of this Member.
 void setRoleSpec(Topic roleSpec)
          Sets the topic which defines the type of this Member.
 
Methods inherited from interface org.tm4j.topicmap.TopicMapObject
addMultiValuePropertyChangeListener, addMultiValuePropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, destroy, fireMultiValuePropertyChange, fireMultiValuePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getID, getResourceLocator, getTopicMap, removeMultiValuePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setID, setResourceLocator
 

Method Detail

getParent

public Association getParent()
Returns the association to which the Member belongs.


getRoleSpec

public Topic getRoleSpec()
Returns the topic which defines the type of this Member.


setRoleSpec

public void setRoleSpec(Topic roleSpec)
                 throws java.beans.PropertyVetoException
Sets the topic which defines the type of this Member. If the Member already has a type defined, then the existing type is replaced by the new one.


addPlayer

public void addPlayer(Topic player)
               throws java.beans.PropertyVetoException
Adds a topic as a player, meaning one of the topics that define this member. A topic may be a player in multiple Members of multiple Associations.


removePlayer

public void removePlayer(Topic player)
                  throws java.beans.PropertyVetoException
Removes the specified topic from the list of players of this Member object. If the specified Topic is not in the list of players for this Member object, then this method has no effect.


getPlayers

public java.util.Collection getPlayers()
Returns an unmodifiable collection of the Topics which are players of this Member.


setPlayers

public void setPlayers(Topic[] players)
                throws java.beans.PropertyVetoException
Sets the collection of Topics which are players of this Member. The specified array replaces all the existing players of this Member.