public class CM_Data extends ControlModule
| Modifier and Type | Field and Description |
|---|---|
protected java.util.HashMap<java.lang.String,org.ai_heuristic.eval.metric.MetricDataset> |
allDatasets
All retrieved datasets
|
protected DataServiceDef |
evaluator
The evaluation service
|
protected java.util.Random |
rnd
Random number generator
|
protected java.util.ArrayList<java.lang.String> |
serviceIDs
The current list of service ids to try to link to
|
dmpasswordHandler, service, serviceTypejarFile, syncOn, uuid| Constructor and Description |
|---|
CM_Data(Service service,
PasswordHandler pHandler)
Creates a new instance of CM_Data.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.HashMap<java.lang.String,org.ai_heuristic.eval.metric.MetricDataset> |
getAllData()
Retrieve and store all data from a list of running services.
|
org.ai_heuristic.eval.metric.MetricDataset |
getDataRandomID()
Randomly retrieve the next dataset for evaluation.
|
java.util.ArrayList<java.lang.String> |
getServiceIDs()
Get the current list of active service IDs.
|
void |
receiveDataXML(java.lang.String serviceType,
org.licas_xml.abs.Element dataInfo)
This method can receive a data result as an XML-based description.
|
void |
resetValues()
Reset variables for another test run.
|
void |
sendDataXML(java.lang.String serviceType,
org.licas_xml.abs.Element dataXml,
org.licas_xml.abs.Element otherXml,
boolean links)
This can be used to send data to some service using an XML-based description.
|
void |
setAllData(java.util.HashMap<java.lang.String,org.ai_heuristic.eval.metric.MetricDataset> thisAllData)
Set the dataset for processing.
|
getServerPassword, setDataModulecanAccess, canAccessTemp, getPasswordHandler, getPasswordHandler, getServicePassword, getServiceType, isAdminKey, setServiceDetails, setServiceTypegetJarFile, getUUID, loadObject, setJarFile, setUUID, threadAliveStateactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetUUID, setJarFile, setUUIDprotected java.util.ArrayList<java.lang.String> serviceIDs
protected java.util.HashMap<java.lang.String,org.ai_heuristic.eval.metric.MetricDataset> allDatasets
protected DataServiceDef evaluator
protected java.util.Random rnd
public CM_Data(Service service, PasswordHandler pHandler) throws java.lang.Exception
service - the parent service.pHandler - the parent password handler.java.lang.Exception - any error.public void resetValues()
public void sendDataXML(java.lang.String serviceType,
org.licas_xml.abs.Element dataXml,
org.licas_xml.abs.Element otherXml,
boolean links)
throws PasswordException,
MethodNotFoundException,
java.lang.Exception
serviceType - the service type to receive the data, typically only one service of the type.dataXml - full xml-based description of the data.otherXml - xml-based description of other information that may be added as a second element.links - true if include linking information.PasswordException - incorrect password for the server or mediator service.MethodNotFoundException - the mediator does not have the calling method.java.lang.Exception - any other error.public void receiveDataXML(java.lang.String serviceType,
org.licas_xml.abs.Element dataInfo)
throws java.lang.Exception
serviceType - type of service making the call, for indexing purposes.dataInfo - full xml-based description of the data.java.lang.Exception - any error.public java.util.ArrayList<java.lang.String> getServiceIDs()
throws java.lang.Exception
java.lang.Exception - any error.public void setAllData(java.util.HashMap<java.lang.String,org.ai_heuristic.eval.metric.MetricDataset> thisAllData)
thisAllData - the whole dataset.public java.util.HashMap<java.lang.String,org.ai_heuristic.eval.metric.MetricDataset> getAllData()
throws ServiceException,
java.lang.Exception
ServiceException - probably for password or service not found.java.lang.Exception - and error.public org.ai_heuristic.eval.metric.MetricDataset getDataRandomID()
throws java.lang.Exception
resetServiceIDs to reset to the full list of other services again.
This version calls getValue that uses the EvaluateBase.valueFromString
method to try to parse a string-based representation of a value into a Java object,
which will only automatically work for simple types, or XML.java.lang.Exception - any error.