public class ContextAwareHelperTest
extends java.lang.Object
This is a test version of ContextAwareHelper that is used for experimentation.
Modifier and Type | Field and Description |
---|---|
protected ContextAwareGUI |
_GUI
The GUI.
|
protected java.lang.String |
_selectedServiceParam
The service that was selected.
|
protected java.lang.String |
_sensorService
The sensor that was selected.
|
java.lang.String[] |
defaultParamList
The default parameters.
|
java.lang.String[] |
firebaseOutputPort
The output choices of the FireBase service.
|
java.lang.String[] |
gsnOutputPort
The output choices of the GSN service.
|
java.lang.String[] |
iotServiceList
The choices of the IoT service.
|
java.lang.String[] |
paraimpuOutputPort
The output choices of the Paraimpu service.
|
javax.swing.JButton |
searchButton
The search button.
|
Constructor and Description |
---|
ContextAwareHelperTest() |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
availableServices()
Return an array of iot REST service names that are available
to the user.
|
void |
chooseSensor(java.lang.String[] sensors)
Dialog Box to select a service the accessor mimics.
|
java.util.ArrayList |
convertXMLtoJSON(java.lang.String response)
Convert an XML data format to JSON data format using the XML
class from org.json.xml.
|
java.lang.String |
discoverServices()
Return the selected service.
|
java.lang.String[] |
getFirebaseOutput()
Return the list of output choices of Firebase
service.
|
java.lang.String[] |
getGsnOutput()
Return the list of output choices of GSN service.
|
java.lang.String[] |
getParaimpuOutput()
Return the list of output choices of Paraimpu
service.
|
java.lang.String |
getSelectedService()
Return the name of the selected service.
|
java.lang.String |
getSelectedServiceParameter(java.lang.String selectedService)
Return the parameters associated with the selected
service.
|
java.lang.String |
getService()
Get the name of a particular sensor in a service.
|
void |
setParameters(java.lang.String[] parameters)
Create a list of parameters specific to the middleware chosen.
|
void |
setSelectedService(java.lang.String[] list)
Initializes the list of available iot REST services and
creates a GUI for a user to make the selection.
|
public javax.swing.JButton searchButton
public java.lang.String[] defaultParamList
public java.lang.String[] firebaseOutputPort
public java.lang.String[] gsnOutputPort
public java.lang.String[] iotServiceList
public java.lang.String[] paraimpuOutputPort
protected ContextAwareGUI _GUI
protected java.lang.String _selectedServiceParam
protected java.lang.String _sensorService
public java.lang.String[] availableServices()
public void chooseSensor(java.lang.String[] sensors)
sensors
- The names of the sensors.public java.util.ArrayList convertXMLtoJSON(java.lang.String response)
response
- is the input in xml formatpublic java.lang.String discoverServices()
public java.lang.String[] getGsnOutput()
public java.lang.String[] getFirebaseOutput()
public java.lang.String[] getParaimpuOutput()
public java.lang.String getSelectedService()
setSelectedService(String[])
public java.lang.String getSelectedServiceParameter(java.lang.String selectedService)
selectedService
- The name of the service that was selected.public java.lang.String getService()
public void setSelectedService(java.lang.String[] list)
list
- known list of servicesgetSelectedService()
public void setParameters(java.lang.String[] parameters)
parameters
- The names of the parameters.