public class ContextAwareHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_selectedService
The name of the service selected by the user.
|
protected java.lang.String[] |
_selectedServiceParameters
The names of the parameters for the service that was selected by the user.
|
protected java.lang.String |
_sensorService
The specific data that is wanted from the selected service.
|
Constructor and Description |
---|
ContextAwareHelper()
Create an instance of a GUI object to collect details about a service.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
availableServices()
Return the list of services.
|
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 discovered services.
|
java.lang.String[] |
getFirebaseOutput()
Return the list of output choices of Firebase
service.
|
java.lang.String[] |
getGsnOutput()
Return the list of output choices of Paraimpu
/** 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.
|
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.
|
protected java.lang.String[] _selectedServiceParameters
protected java.lang.String _selectedService
protected java.lang.String _sensorService
public ContextAwareHelper()
public java.lang.String[] availableServices()
public java.util.ArrayList convertXMLtoJSON(java.lang.String response)
response
- is the input in xml formatpublic java.lang.String discoverServices()
public java.lang.String[] getFirebaseOutput()
public java.lang.String[] getGsnOutput()
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 void setSelectedService(java.lang.String[] list)
list
- known list of servicesgetSelectedService()