de.cesr.sesamgim.context
Class GGroupContext<AgentType extends GimMilieuAgent<?>>

java.lang.Object
  extended by java.util.AbstractCollection<T>
      extended by repast.simphony.context.AbstractContext<T>
          extended by repast.simphony.context.SmallDefaultContext<T>
              extended by repast.simphony.context.DefaultContext<AgentType>
                  extended by de.cesr.sesamgim.context.GGroupContext<AgentType>
All Implemented Interfaces:
GimGroupContext<AgentType>, Iterable<AgentType>, Collection<AgentType>, repast.simphony.context.Context<AgentType>, repast.simphony.context.ContextListener, repast.simphony.context.RepastElement

public class GGroupContext<AgentType extends GimMilieuAgent<?>>
extends repast.simphony.context.DefaultContext<AgentType>
implements GimGroupContext<AgentType>

SesamGIM - Geographical Initialisation for Milieu Agents Note: The super-context may be other than GimMarketCellContext now even if naming still suggests GimMarketCellContext.


Field Summary
protected  com.vividsolutions.jts.geom.Point geoCentre
           
protected static Logger logger
          Logger
static int nextId
           
 
Fields inherited from class repast.simphony.context.SmallDefaultContext
allObjs, objectMap
 
Fields inherited from class repast.simphony.context.AbstractContext
subContexts
 
Fields inherited from interface repast.simphony.context.Context
SYN_CONTEXT_PREFIX
 
Constructor Summary
GGroupContext(GimUpdatableContext<AgentType> mc)
           
 
Method Summary
 com.vividsolutions.jts.geom.Point getGeoCentre()
          Returns the geographical centre.
 int getGroupId()
          Return the SesamGim group context id of this context.
 GimUpdatableContext<AgentType> getMc()
           
 String getMcId()
          Returns the ID of the parental context (market cell context).
static void reset()
          Reset netID.
 void setGeoCentre(com.vividsolutions.jts.geom.Point geoCentre)
          Sets the geographical centre.
 String toString()
           
 
Methods inherited from class repast.simphony.context.DefaultContext
addInternal, containsInternal, iteratorInternal, removeInternal, sizeInternal
 
Methods inherited from class repast.simphony.context.SmallDefaultContext
getObjects, getRandomObject, getRandomObjects
 
Methods inherited from class repast.simphony.context.AbstractContext
add, addContextListener, addProjection, addSubContext, addValueLayer, clear, contains, eventOccured, findContext, findParent, fireAddContextEvent, fireRemoveEvent, fireSubContextAdded, fireSubContextRemoved, getAgentLayer, getAgentTypes, getContextListeners, getId, getProjection, getProjection, getProjections, getProjections, getSubContext, getSubContexts, getTypeID, getValueLayer, getValueLayers, handleRemove, hasSubContext, iterator, query, remove, removeContextListener, removeProjection, removeSubContext, removeValueLayer, setId, setTypeID, size
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface repast.simphony.context.Context
addContextListener, addProjection, addSubContext, addValueLayer, findContext, findParent, getAgentLayer, getAgentTypes, getContextListeners, getObjects, getProjection, getProjection, getProjections, getProjections, getRandomObject, getRandomObjects, getSubContext, getSubContexts, getTypeID, getValueLayer, getValueLayers, hasSubContext, query, removeContextListener, removeProjection, removeSubContext, removeValueLayer, setTypeID
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface repast.simphony.context.RepastElement
getId, setId
 

Field Detail

logger

protected static Logger logger
Logger


geoCentre

protected com.vividsolutions.jts.geom.Point geoCentre

nextId

public static int nextId
Constructor Detail

GGroupContext

public GGroupContext(GimUpdatableContext<AgentType> mc)
Method Detail

reset

public static void reset()
Reset netID.


toString

public String toString()
Overrides:
toString in class AbstractCollection<AgentType extends GimMilieuAgent<?>>
See Also:
AbstractCollection.toString()

getMcId

public String getMcId()
Description copied from interface: GimGroupContext
Returns the ID of the parental context (market cell context).

Specified by:
getMcId in interface GimGroupContext<AgentType extends GimMilieuAgent<?>>
Returns:
market cell id
See Also:
GimGroupContext.getMcId()

getGroupId

public int getGroupId()
Description copied from interface: GimGroupContext
Return the SesamGim group context id of this context.

Specified by:
getGroupId in interface GimGroupContext<AgentType extends GimMilieuAgent<?>>
See Also:
GimGroupContext.getGroupId()

getMc

public GimUpdatableContext<AgentType> getMc()
Specified by:
getMc in interface GimGroupContext<AgentType extends GimMilieuAgent<?>>
Returns:
the parental market cell context
See Also:
GimGroupContext.getMc()

getGeoCentre

public com.vividsolutions.jts.geom.Point getGeoCentre()
Description copied from interface: GimGroupContext
Returns the geographical centre. E.g. Households are located round this point.

Specified by:
getGeoCentre in interface GimGroupContext<AgentType extends GimMilieuAgent<?>>
Returns:
the geographical centre
See Also:
GimGroupContext.getGeoCentre()

setGeoCentre

public void setGeoCentre(com.vividsolutions.jts.geom.Point geoCentre)
Description copied from interface: GimGroupContext
Sets the geographical centre. Households are located round this point.

Specified by:
setGeoCentre in interface GimGroupContext<AgentType extends GimMilieuAgent<?>>
Parameters:
geoCentre - the geographical centre