Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members

agents.mobileproxy.databaseagent.DatabaseAgent Class Reference

List of all members.

Public Member Functions

synchronized void log (String str, Color color)
boolean isDeviceRegistered (String deviceId)
boolean isModelRegistered (String modelId)
void registerDevice (String deviceId, String modelId)
void removeDevice (String deviceId)
void registerModel (String modelId, String sizeX, String sizeY, String depthColor, String maxPowerCPU)
void removeModel (String modelId)
void setPCEDevice (String deviceId, PCE pce)
boolean isDeviceOnline (String deviceId)
void deviceIsOnline (String deviceId)
void deviceIsOffline (String deviceId)
ArrayList getAppsFinished (String deviceId)
ArrayList getRegisteredModels ()
ArrayList getRegisteredDevices ()
void removeAppsFinished (String deviceId)
void removeApp (String deviceId, String applicationId)
void changeAppToFinished (String deviceId, String applicationId)
void storeSubmissionApplication (String deviceId, Application app)
PCE getPCEDevice (String deviceId)
void setBateryState (String deviceId, String batteryState)
String getBatteryState (String deviceId)

Static Public Attributes

static final String DATABASE_AGENT_NAME = "dba"

Protected Member Functions

void setup ()

Private Member Functions

Model getModel (Node node)
Device getDevice (Node node)
String getBatteryState (Node node)
Node createDeviceXML (String deviceId, String model)
Node createModelXML (String model, String sizeX, String sizeY, String depthColor, String maxPowerCPU)
Node createSubmissionXML (String id)
String getStateDevice (Node node)
PCE getPCE (Node node)
Application getSubmission (Node node)
void updateDevice (String xupdate) throws XMLDBException
void updateSubmission (String xupdate) throws XMLDBException
void update (Collection col, String xupdate) throws XMLDBException
ResourceSet queryDevice (String xquery) throws XMLDBException
ResourceSet queryModel (String xquery) throws XMLDBException
ResourceSet querySubmission (String xquery) throws XMLDBException
ResourceSet query (Collection col, String xquery) throws XMLDBException
String getChildTagValue (Element elem, String tagName)

Private Attributes

boolean debuggingMode = true
ContentManager manager = getContentManager()
Codec codec = new LEAPCodec()
Ontology ontology = MobileProxyOntology.getInstance()
Collection colDevice = null
Collection colModel = null
Collection colSubmission = null
DocumentBuilder db = null

Static Private Attributes

static final String DEVICE_DATA_BASE = "DeviceDataBase"
static final String MODEL_DATA_BASE = "ModelDataBase"
static final String SUBMISSION_DATA_BASE = "SubmissionDataBase"

Detailed Description

Author:
estevao


Member Function Documentation

void agents.mobileproxy.databaseagent.DatabaseAgent.changeAppToFinished String  deviceId,
String  applicationId
 

Changes the state of an aplication to finished

Parameters:
deviceId ID of device that owns the application
applicationId application ID

Node agents.mobileproxy.databaseagent.DatabaseAgent.createDeviceXML String  deviceId,
String  model
[private]
 

Node agents.mobileproxy.databaseagent.DatabaseAgent.createModelXML String  model,
String  sizeX,
String  sizeY,
String  depthColor,
String  maxPowerCPU
[private]
 

Node agents.mobileproxy.databaseagent.DatabaseAgent.createSubmissionXML String  id  )  [private]
 

void agents.mobileproxy.databaseagent.DatabaseAgent.deviceIsOffline String  deviceId  ) 
 

Sets the mobile device state to offline

Parameters:
deviceId device ID

void agents.mobileproxy.databaseagent.DatabaseAgent.deviceIsOnline String  deviceId  ) 
 

Sets the mobile device state to online

Parameters:
deviceId device ID

ArrayList agents.mobileproxy.databaseagent.DatabaseAgent.getAppsFinished String  deviceId  ) 
 

Gets the list of finished applications of a mobile device

Parameters:
deviceId device ID
Returns:
list of finished applications

String agents.mobileproxy.databaseagent.DatabaseAgent.getBatteryState Node  node  )  [private]
 

String agents.mobileproxy.databaseagent.DatabaseAgent.getBatteryState String  deviceId  ) 
 

Gets the battery state of a mobile device

Parameters:
deviceId device ID
Returns:
battery state

String agents.mobileproxy.databaseagent.DatabaseAgent.getChildTagValue Element  elem,
String  tagName
[private]
 

Device agents.mobileproxy.databaseagent.DatabaseAgent.getDevice Node  node  )  [private]
 

Model agents.mobileproxy.databaseagent.DatabaseAgent.getModel Node  node  )  [private]
 

PCE agents.mobileproxy.databaseagent.DatabaseAgent.getPCE Node  node  )  [private]
 

PCE agents.mobileproxy.databaseagent.DatabaseAgent.getPCEDevice String  deviceId  ) 
 

Gets the device PCE

Parameters:
deviceId device ID
Returns:
device PCE

ArrayList agents.mobileproxy.databaseagent.DatabaseAgent.getRegisteredDevices  ) 
 

ArrayList agents.mobileproxy.databaseagent.DatabaseAgent.getRegisteredModels  ) 
 

String agents.mobileproxy.databaseagent.DatabaseAgent.getStateDevice Node  node  )  [private]
 

Application agents.mobileproxy.databaseagent.DatabaseAgent.getSubmission Node  node  )  [private]
 

boolean agents.mobileproxy.databaseagent.DatabaseAgent.isDeviceOnline String  deviceId  ) 
 

Verifies whether or not the device is online

Parameters:
deviceId device ID
Returns:
true whenever the device is online, otherwise false

boolean agents.mobileproxy.databaseagent.DatabaseAgent.isDeviceRegistered String  deviceId  ) 
 

Verifies whether or not the device is registered

Parameters:
deviceId device ID
Returns:
true whenever the device is registered, otherwise false

boolean agents.mobileproxy.databaseagent.DatabaseAgent.isModelRegistered String  modelId  ) 
 

Verifies whether or not the model device is registered

Parameters:
modelId model device ID
Returns:
true whenever the model device is registered, otherwise false

synchronized void agents.mobileproxy.databaseagent.DatabaseAgent.log String  str,
Color  color
 

Prints in the MobileProxyControlCenter window the strings passed

Parameters:
str text to be printed
color text color

ResourceSet agents.mobileproxy.databaseagent.DatabaseAgent.query Collection  col,
String  xquery
throws XMLDBException [private]
 

ResourceSet agents.mobileproxy.databaseagent.DatabaseAgent.queryDevice String  xquery  )  throws XMLDBException [private]
 

ResourceSet agents.mobileproxy.databaseagent.DatabaseAgent.queryModel String  xquery  )  throws XMLDBException [private]
 

ResourceSet agents.mobileproxy.databaseagent.DatabaseAgent.querySubmission String  xquery  )  throws XMLDBException [private]
 

void agents.mobileproxy.databaseagent.DatabaseAgent.registerDevice String  deviceId,
String  modelId
 

Stores a device in the Database

Parameters:
deviceId device ID
modelId model ID

void agents.mobileproxy.databaseagent.DatabaseAgent.registerModel String  modelId,
String  sizeX,
String  sizeY,
String  depthColor,
String  maxPowerCPU
 

Stores an model in the Database

Parameters:
modelId model ID
sizeX screen size at "x" axis
sizeY screen size at "y" axis
depthColor device depth color
maxPowerCPU device max power CPU

void agents.mobileproxy.databaseagent.DatabaseAgent.removeApp String  deviceId,
String  applicationId
 

Removes an application from Database of a mobile device

Parameters:
deviceId device ID
applicationId application ID

void agents.mobileproxy.databaseagent.DatabaseAgent.removeAppsFinished String  deviceId  ) 
 

Removes from Database all finished applications of a mobile device

Parameters:
deviceId device ID

void agents.mobileproxy.databaseagent.DatabaseAgent.removeDevice String  deviceId  ) 
 

Removes a device at the Database

Parameters:
deviceId device ID

void agents.mobileproxy.databaseagent.DatabaseAgent.removeModel String  modelId  ) 
 

Erases a model at Database

Parameters:
modelId model ID

void agents.mobileproxy.databaseagent.DatabaseAgent.setBateryState String  deviceId,
String  batteryState
 

Sets the battery state of a mobile device

Parameters:
deviceId device ID
batteryState battery state

void agents.mobileproxy.databaseagent.DatabaseAgent.setPCEDevice String  deviceId,
PCE  pce
 

Sets device PCE

Parameters:
deviceId device ID
pce device PCE

void agents.mobileproxy.databaseagent.DatabaseAgent.setup  )  [protected]
 

First method invoked by the mobile agent plataform on an agent when it is instantiated

void agents.mobileproxy.databaseagent.DatabaseAgent.storeSubmissionApplication String  deviceId,
Application  app
 

Stores an application to Database

Parameters:
deviceId ID of device that owns the application
app application to be stored

void agents.mobileproxy.databaseagent.DatabaseAgent.update Collection  col,
String  xupdate
throws XMLDBException [private]
 

void agents.mobileproxy.databaseagent.DatabaseAgent.updateDevice String  xupdate  )  throws XMLDBException [private]
 

void agents.mobileproxy.databaseagent.DatabaseAgent.updateSubmission String  xupdate  )  throws XMLDBException [private]
 


Member Data Documentation

Codec agents.mobileproxy.databaseagent.DatabaseAgent.codec = new LEAPCodec() [private]
 

Collection agents.mobileproxy.databaseagent.DatabaseAgent.colDevice = null [private]
 

Collection agents.mobileproxy.databaseagent.DatabaseAgent.colModel = null [private]
 

Collection agents.mobileproxy.databaseagent.DatabaseAgent.colSubmission = null [private]
 

final String agents.mobileproxy.databaseagent.DatabaseAgent.DATABASE_AGENT_NAME = "dba" [static]
 

DatabaseAgent name

DocumentBuilder agents.mobileproxy.databaseagent.DatabaseAgent.db = null [private]
 

boolean agents.mobileproxy.databaseagent.DatabaseAgent.debuggingMode = true [private]
 

final String agents.mobileproxy.databaseagent.DatabaseAgent.DEVICE_DATA_BASE = "DeviceDataBase" [static, private]
 

ContentManager agents.mobileproxy.databaseagent.DatabaseAgent.manager = getContentManager() [private]
 

final String agents.mobileproxy.databaseagent.DatabaseAgent.MODEL_DATA_BASE = "ModelDataBase" [static, private]
 

Ontology agents.mobileproxy.databaseagent.DatabaseAgent.ontology = MobileProxyOntology.getInstance() [private]
 

final String agents.mobileproxy.databaseagent.DatabaseAgent.SUBMISSION_DATA_BASE = "SubmissionDataBase" [static, private]
 


The documentation for this class was generated from the following file:
Generated on Fri Feb 17 09:37:54 2006 for MAG by  doxygen 1.4.4