|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nite.gui.util.AgentConfiguration
public class AgentConfiguration
An agent configuration contains two-dimensional matrices that map agent positions in a media signal to agent names. There is one matrix for each signal. Signals are identified by a name and they represent recorded video or audio for a meeting with multiple agents. With a fixed set of agents, each video shows a particular configuration of agent positions.
Used mostly in video labeler. see constructor for more information
Constructor Summary | |
---|---|
AgentConfiguration(NOMWriteCorpus corpus,
java.lang.String obsName)
Constructs a new agent configuration. |
Method Summary | |
---|---|
java.awt.Point |
findAgent(java.lang.String signal,
java.lang.String agent)
Returns the position of an agent in the matrix for the specified signal. |
java.lang.String |
getAgentAt(java.lang.String signal,
int x,
int y)
Returns the name of the agent at the specified position in the matrix for the specified signal. |
java.awt.Dimension |
getDimension(java.lang.String signal)
Returns the dimension of the agent matrix for the specified signal. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AgentConfiguration(NOMWriteCorpus corpus, java.lang.String obsName)
Constructs a new agent configuration. This constructor searches the participant-config elements for the specified observation in the specified corpus. A participant-config element specifies a signal name and a configuration that consists of one list of visible agents and one list of invisible agents. For example the configuration string [p3,p1][p2,p0] means that agents p3 and p1 are visible (from left to right) and agents p2 and p0 are invisible, but from the current point of view p2 is at the left of p0. Either list may be empty. For instance in the audio signal, no agent is visible and no order can be defined, so the configuration would be [][p0,p1,p2,p3].
All configurations are parsed into a matrix, so they can be displayed in a grid. Each element in a matrix contains the name of an agent or a null value. If the number of visible and invisible agents are equal, the resulting matrix is obvious (the visible agents in the first row, the invisible agents in the second row). If the numbers or not equals, the agents in the shortest row will be centred and there will be null values at the left and the right of the row. If one of the lists is empty, the resulting matrix will contain only one row.
This constructor also creates a default configuration, which is used if no agent configuration is defined for some signal. The default configuration contains just one row with the names of all agents in alphabetical order.
Any errors are printed to the standard output.
corpus
- the corpusobsName
- the observation nameMethod Detail |
---|
public java.awt.Dimension getDimension(java.lang.String signal)
Returns the dimension of the agent matrix for the specified signal.
signal
- a signal name
public java.lang.String getAgentAt(java.lang.String signal, int x, int y)
Returns the name of the agent at the specified position in the matrix for the specified signal.
signal
- a signal namex
- the column position in the matrixy
- the row position in the matrix
public java.awt.Point findAgent(java.lang.String signal, java.lang.String agent)
Returns the position of an agent in the matrix for the specified signal.
signal
- a signal nameagent
- an agent name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |