org.dbe.eve.factories.smefactory
Class SMEFactory

java.lang.Object
  extended by org.dbe.eve.factories.smefactory.AbstractSMEFactory
      extended by org.dbe.eve.factories.smefactory.SMEFactory

public class SMEFactory
extends AbstractSMEFactory

implements the factory design pattern for SME-creation and includes an OverallServicePool with random services

Since:
3th of November 2006
Author:
Christoph Adelberger

Field Summary
private static SMEFactory instance
           
private  java.util.Vector Prototypes
           
private  OverallServicePool SPool
           
 
Fields inherited from class org.dbe.eve.factories.smefactory.AbstractSMEFactory
logger, mt
 
Constructor Summary
private SMEFactory(EvEModel eVeModel)
           
 
Method Summary
 Prototype addPrototype(java.lang.String piCPath, java.lang.String name, int nUmber, int typology, int usage, int dimension, int innovation, int socialcapital, int strategy, int offering, int demanding)
          creates a prototype with the settings from the GUI and adds it to the Prototype Container
 SME createSME(EvEModel model, int groupid, int prototypid)
          creates a new SME using parameters from the GUI
static SMEFactory getInstofSMEFact(EvEModel eVemodel)
          contructs a SMEFactory or returns an instance of it
 Prototype getNextPrototype()
          gets the next prototype from the prototype-container based on a random selection which takes into account the ratio of number of SMEs per prototype
 Prototype getPrototype(int prototypeID)
          get a prototype from the prototypes container
 java.util.Vector getPrototypes()
          gets the vector with prototypes just as they where created
 void removePrototype(Prototype p)
           
 
Methods inherited from class org.dbe.eve.factories.smefactory.AbstractSMEFactory
getSMEFactory, isSmeFactoryVar1, setSmeFactoryVar1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

private static SMEFactory instance

SPool

private OverallServicePool SPool

Prototypes

private java.util.Vector Prototypes
Constructor Detail

SMEFactory

private SMEFactory(EvEModel eVeModel)
Method Detail

getInstofSMEFact

public static SMEFactory getInstofSMEFact(EvEModel eVemodel)
contructs a SMEFactory or returns an instance of it

Parameters:
eVemodel - instance of an EvEModel
Returns:
SMEFactory

createSME

public SME createSME(EvEModel model,
                     int groupid,
                     int prototypid)
creates a new SME using parameters from the GUI

Specified by:
createSME in class AbstractSMEFactory
Parameters:
model - - instance of an EvEModel
groupid - - group id to which the SME should belong, must be smaller than 0 if the group schould be chosen randomly
prototypid - - indicates which prototype should be used for the creation of the SME, must be smaller than 0 if the prototype should be chosen randomly
Returns:
instance of a SME

addPrototype

public Prototype addPrototype(java.lang.String piCPath,
                              java.lang.String name,
                              int nUmber,
                              int typology,
                              int usage,
                              int dimension,
                              int innovation,
                              int socialcapital,
                              int strategy,
                              int offering,
                              int demanding)
creates a prototype with the settings from the GUI and adds it to the Prototype Container

Parameters:
piCPath - picture path
name - name of prototype
nUmber - number of SMEs of this prototype
numOfservices -
typology -
usage -
dimension -
innovation -
socialcapital -
strategy -
offering -
demanding -

removePrototype

public void removePrototype(Prototype p)

getPrototypes

public java.util.Vector getPrototypes()
gets the vector with prototypes just as they where created

Returns:
Vector

getNextPrototype

public Prototype getNextPrototype()
gets the next prototype from the prototype-container based on a random selection which takes into account the ratio of number of SMEs per prototype

Returns:
Prototype

getPrototype

public Prototype getPrototype(int prototypeID)
get a prototype from the prototypes container

Parameters:
prototypeID - id of the prototype
Returns:
Prototype