public class JsonDataSource extends AbstractDataSource
| Modifier and Type | Class and Description |
|---|---|
class |
JsonDataSource.JsonDataNode |
static class |
JsonDataSource.SortingComparer |
| Modifier and Type | Field and Description |
|---|---|
static int |
MODE_CONNECTION_STRING
constructor using mode the string is a connection string.
|
static int |
MODE_RAW_TEXT
constructor using mode the string is the JSON in the string.
|
rootNodeNAME_DATASET, NAME_JSON, NAME_LITERAL, NAME_ODATA, NAME_SFDC, NAME_SQL, NAME_XML, NAME_XML_1_0| Constructor and Description |
|---|
JsonDataSource(java.io.InputStream jsonStream,
java.lang.String encoding)
Creates a Json data source from an InputStream.
|
JsonDataSource(java.lang.String jsonConnectionString,
int mode)
Create a DataSourceProvider using the passed in connection strings.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Clean up resources.
|
java.lang.String |
combineQueryForDataSet(java.lang.String dataSetQuery,
java.lang.String query,
java.lang.String dataSetName) |
java.lang.String |
getDatasourceName()
returns the name of this type in the form "sql", "xml", etc.
|
IDataSourceQueryHelper |
getQueryHelper()
Gets the query helper from the subclass.
|
int |
getQueryMode(java.lang.String select,
BaseTag tag)
Gets the query mode of a select.
|
boolean |
supportsDataSets()
Does this datasource support data sets?
|
approveDenyModifySelect, dataSourceNodeWithIndex, drillDownToVal, getParameters, getParamMode, getRootNode, getTagAttributes, populateDatasourceException, returnValue, SetDseProps, setParameters, setParamMode, validateTagconvertToInputStream, forTesting, getProperties, lookupVariable, setPropertiesequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProperties, setPropertiespublic static final int MODE_CONNECTION_STRING
public static final int MODE_RAW_TEXT
public JsonDataSource(java.lang.String jsonConnectionString,
int mode)
throws DataConnectionException
jsonConnectionString - Connection string to read the XML file. Or if mode is raw text, the actual JSON.mode - One of the MODE_CONNECTION_* valuesDataConnectionExceptionpublic JsonDataSource(java.io.InputStream jsonStream,
java.lang.String encoding)
throws DataConnectionException
jsonStream - - Stream to create the data source from.encoding - - character encoding of the fileDataConnectionExceptionpublic java.lang.String getDatasourceName()
public IDataSourceQueryHelper getQueryHelper()
getQueryHelper in class AbstractDataSourcepublic void close()
throws DataSourceException
AbstractDataSourceclose in interface DataSourceProviderclose in class AbstractDataSourceDataSourceException - Could not retrieve the data. Generally wraps a SqlException or XpathException.public int getQueryMode(java.lang.String select,
BaseTag tag)
AbstractDataSourcegetQueryMode in interface DataSourceProvidergetQueryMode in class AbstractDataSourceselect - The query we need to return the mode fortag - The tag this select is for. This may be null.public boolean supportsDataSets()
supportsDataSets in class DataSourceBasepublic java.lang.String combineQueryForDataSet(java.lang.String dataSetQuery,
java.lang.String query,
java.lang.String dataSetName)
combineQueryForDataSet in class AbstractDataSourceCopyright © 2002-2021 Windward Studios, LLC. - All Rights Reserved. We are Java document generation software