com.stimulsoft.report.dictionary.databases
Class StiJsonDatabase

java.lang.Object
  extended by com.stimulsoft.base.serializing.StiSerializedObject
      extended by com.stimulsoft.base.services.StiService
          extended by com.stimulsoft.report.dictionary.databases.StiDatabase
              extended by com.stimulsoft.report.dictionary.databases.StiJsonDatabase
All Implemented Interfaces:
IStiJsonReportObject, IStiSerializable, IStiSerializableRef, IStiName, IStiInherited, java.lang.Cloneable

public class StiJsonDatabase
extends StiDatabase


Field Summary
 
Fields inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
REFERENCE_EMPTY, REFERENCE_REPORT
 
Constructor Summary
StiJsonDatabase()
           
StiJsonDatabase(java.lang.String name)
           
StiJsonDatabase(java.lang.String name, java.io.File pathData)
           
StiJsonDatabase(java.lang.String name, java.io.InputStream dataIS)
           
StiJsonDatabase(java.lang.String name, java.lang.String pathData)
           
 
Method Summary
 void applyDatabaseInformation(StiDatabaseInformation information, StiReport report, StiDatabaseInformation informationAll)
           
 void connect(StiDataStoreSource source, java.lang.Boolean fillTable, StiReport report)
           
 void connect(StiDataStoreSource source, StiReport report)
           
 void disconnect()
           
 void fillTable(StiDataStoreSource source, StiReport report)
           
 StiDatabaseInformation getDatabaseInformation(java.sql.Connection con, StiAbstractAdapter adapter, StiReport report)
           
 java.lang.String getEmbeddedData()
           
 java.lang.String getJsonData()
           
 java.lang.Object getJSONObject(StiReport report)
           
 java.lang.String getPathData()
          Gets or sets path to xml data or URL
 java.lang.String getServiceName()
          Gets a service name.
 void LoadFromJsonObject(JSONObject jObject)
           
 JSONObject SaveToJsonObject(StiJsonSaveMode mode)
           
 void setEmbeddedData(java.lang.String embeddedData)
           
 void setJsonData(java.lang.String jsonData)
           
 void setPathData(java.lang.String value)
          Path to file or URL
 
Methods inherited from class com.stimulsoft.report.dictionary.databases.StiDatabase
createDataSources, edit, getAlias, getConnectedEvent, getConnectingEvent, getDisconnectedEvent, getDisconnectingEvent, getInherited, getKey, getName, getServiceCategory, getServiceType, getString, regData, setAlias, setConnectedEvent, setConnectingEvent, setDisconnectedEvent, setDisconnectingEvent, setInherited, setKey, setName, toString
 
Methods inherited from class com.stimulsoft.base.services.StiService
clone, getProperties, getServiceEnabled, getServiceInfo, isPropertyPresent, MemberwiseClone, packService, properties, setProperties, setServiceEnabled
 
Methods inherited from class com.stimulsoft.base.serializing.StiSerializedObject
cleanReference, getReference, setReference
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StiJsonDatabase

public StiJsonDatabase()

StiJsonDatabase

public StiJsonDatabase(java.lang.String name)
Parameters:
name - database name

StiJsonDatabase

public StiJsonDatabase(java.lang.String name,
                       java.lang.String pathData)
Parameters:
name - database name
pathData - file path or URL

StiJsonDatabase

public StiJsonDatabase(java.lang.String name,
                       java.io.File pathData)
Parameters:
name - database name
pathData - xml file

StiJsonDatabase

public StiJsonDatabase(java.lang.String name,
                       java.io.InputStream dataIS)
Parameters:
name - database Name
dataIS - xml InputStream
Method Detail

getServiceName

public java.lang.String getServiceName()
Gets a service name.

Overrides:
getServiceName in class StiDatabase

getPathData

public final java.lang.String getPathData()
Gets or sets path to xml data or URL


setPathData

public final void setPathData(java.lang.String value)
Path to file or URL

Parameters:
value -

connect

public void connect(StiDataStoreSource source,
                    StiReport report)
Specified by:
connect in class StiDatabase

connect

public void connect(StiDataStoreSource source,
                    java.lang.Boolean fillTable,
                    StiReport report)
Specified by:
connect in class StiDatabase

getJsonData

public java.lang.String getJsonData()
Returns:
the jsonData

setJsonData

public void setJsonData(java.lang.String jsonData)
Parameters:
jsonData - the jsonData to set

getEmbeddedData

public java.lang.String getEmbeddedData()
Returns:
the embeddedData

setEmbeddedData

public void setEmbeddedData(java.lang.String embeddedData)
Parameters:
embeddedData - the embeddedData to set

disconnect

public void disconnect()
Specified by:
disconnect in class StiDatabase

fillTable

public void fillTable(StiDataStoreSource source,
                      StiReport report)
               throws java.io.FileNotFoundException,
                      JSONException,
                      java.io.IOException
Throws:
java.io.FileNotFoundException
JSONException
java.io.IOException

getJSONObject

public java.lang.Object getJSONObject(StiReport report)
                               throws java.io.FileNotFoundException,
                                      JSONException,
                                      java.io.IOException
Throws:
java.io.FileNotFoundException
JSONException
java.io.IOException

getDatabaseInformation

public StiDatabaseInformation getDatabaseInformation(java.sql.Connection con,
                                                     StiAbstractAdapter adapter,
                                                     StiReport report)
                                              throws java.lang.Exception
Overrides:
getDatabaseInformation in class StiDatabase
Throws:
java.lang.Exception

applyDatabaseInformation

public void applyDatabaseInformation(StiDatabaseInformation information,
                                     StiReport report,
                                     StiDatabaseInformation informationAll)
Overrides:
applyDatabaseInformation in class StiDatabase

SaveToJsonObject

public JSONObject SaveToJsonObject(StiJsonSaveMode mode)
                            throws JSONException
Specified by:
SaveToJsonObject in interface IStiJsonReportObject
Overrides:
SaveToJsonObject in class StiDatabase
Throws:
JSONException

LoadFromJsonObject

public void LoadFromJsonObject(JSONObject jObject)
                        throws JSONException
Specified by:
LoadFromJsonObject in interface IStiJsonReportObject
Overrides:
LoadFromJsonObject in class StiDatabase
Throws:
JSONException