org.jscience.sociology
Class Role

java.lang.Object
  extended by org.jscience.sociology.Role
All Implemented Interfaces:
Named
Direct Known Subclasses:
Citizen, Defendant, EconomicAgent, Hobbyist, Locutor, Member, Patient, Plaintiff, ResponsibleIndividual, Subject, Voter, Witness

public class Role
extends java.lang.Object
implements Named

A class representing the current behavior/relation a Person has with its environment. Usually in pairs, for example client (student, customer, patient...) and server (teacher, waiter, doctor...) or triplets client, server and supervisor (administrator, manager...). There is sometimes another role which is not part of the process itself: the observer (narrator, passive audience...). Several other roles may be considered although you should try to fit them in the above categories when possible: mediator, slave... Think for example about all the roles of the individual that are in a theater: producer, director, actors, technicians, public... You may want not to assign the default roles but reproduce a more complex environment although you may not apply some models on them.


Field Summary
static int CLIENT
          DOCUMENT ME!
static int OBSERVER
          DOCUMENT ME!
static int SERVER
          DOCUMENT ME!
static int SUPERVISOR
          DOCUMENT ME!
 
Constructor Summary
Role(Individual individual, java.lang.String name, Situation situation, int kind)
          Creates a new Role object.
Role(java.lang.String name, int kind)
          Creates a new Role object.
 
Method Summary
 Individual getIndividual()
          DOCUMENT ME!
 int getKind()
          DOCUMENT ME!
 java.lang.String getName()
          DOCUMENT ME!
 Situation getSituation()
          DOCUMENT ME!
protected  void setSituation(Situation situation)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLIENT

public static final int CLIENT
DOCUMENT ME!

See Also:
Constant Field Values

SERVER

public static final int SERVER
DOCUMENT ME!

See Also:
Constant Field Values

SUPERVISOR

public static final int SUPERVISOR
DOCUMENT ME!

See Also:
Constant Field Values

OBSERVER

public static final int OBSERVER
DOCUMENT ME!

See Also:
Constant Field Values
Constructor Detail

Role

public Role(Individual individual,
            java.lang.String name,
            Situation situation,
            int kind)
Creates a new Role object.

Parameters:
individual - DOCUMENT ME!
name - DOCUMENT ME!
situation - DOCUMENT ME!
kind - DOCUMENT ME!

Role

public Role(java.lang.String name,
            int kind)
Creates a new Role object.

Parameters:
name - DOCUMENT ME!
kind - DOCUMENT ME!
Method Detail

getIndividual

public Individual getIndividual()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getName

public java.lang.String getName()
DOCUMENT ME!

Specified by:
getName in interface Named
Returns:
DOCUMENT ME!

getSituation

public Situation getSituation()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setSituation

protected void setSituation(Situation situation)
DOCUMENT ME!

Parameters:
situation - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

getKind

public int getKind()
DOCUMENT ME!

Returns:
DOCUMENT ME!