LibreOffice Module sc (master) 1
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
sc::ExternalDataSource Class Reference

#include <datamapper.hxx>

Collaboration diagram for sc::ExternalDataSource:
[legend]

Public Member Functions

 ExternalDataSource (OUString aURL, OUString aProvider, ScDocument *pDoc)
 
void setUpdateFrequency (double nUpdateFrequency)
 
void setID (const OUString &rID)
 
void setURL (const OUString &rURL)
 
void setProvider (const OUString &rProvider)
 
void setXMLImportParam (const ScOrcusImportXMLParam &rParam)
 
const OUString & getURL () const
 
const OUString & getProvider () const
 
const OUString & getID () const
 
const ScOrcusImportXMLParamgetXMLImportParam () const
 
OUString getDBName () const
 
void setDBData (const OUString &rDBName)
 
ScDBDataManagergetDBManager ()
 
void refresh (ScDocument *pDoc, bool bDeterministic=false)
 
void AddDataTransformation (const std::shared_ptr< sc::DataTransformation > &mpDataTransformation)
 
const std::vector< std::shared_ptr< sc::DataTransformation > > & getDataTransformation () const
 

Static Public Member Functions

static double getUpdateFrequency ()
 

Private Attributes

OUString maURL
 The URL for the external data provider. More...
 
OUString maProvider
 The data provider is a unique identifier that will allow to identify and instantiate the required data provider. More...
 
OUString maID
 The ID allows the same data provider to support different data streams. More...
 
ScOrcusImportXMLParam maParam
 
std::shared_ptr< DataProvidermpDataProvider
 
std::shared_ptr< ScDBDataManagermpDBDataManager
 
std::vector< std::shared_ptr< sc::DataTransformation > > maDataTransformations
 
ScDocumentmpDoc
 

Detailed Description

Definition at line 28 of file datamapper.hxx.

Constructor & Destructor Documentation

◆ ExternalDataSource()

sc::ExternalDataSource::ExternalDataSource ( OUString  aURL,
OUString  aProvider,
ScDocument pDoc 
)

Definition at line 67 of file dataprovider.cxx.

References aURL, and maURL.

Member Function Documentation

◆ AddDataTransformation()

void sc::ExternalDataSource::AddDataTransformation ( const std::shared_ptr< sc::DataTransformation > &  mpDataTransformation)

Definition at line 171 of file dataprovider.cxx.

References maDataTransformations.

Referenced by ScDataProviderDlg::import().

◆ getDataTransformation()

const std::vector< std::shared_ptr< sc::DataTransformation > > & sc::ExternalDataSource::getDataTransformation ( ) const

◆ getDBManager()

ScDBDataManager * sc::ExternalDataSource::getDBManager ( )

◆ getDBName()

OUString sc::ExternalDataSource::getDBName ( ) const

Definition at line 118 of file dataprovider.cxx.

References ScDBData::GetName(), and mpDBDataManager.

Referenced by ScDataProviderDlg::import().

◆ getID()

const OUString & sc::ExternalDataSource::getID ( ) const

◆ getProvider()

const OUString & sc::ExternalDataSource::getProvider ( ) const

Definition at line 103 of file dataprovider.cxx.

References maProvider.

Referenced by sc::DataProviderFactory::getDataProvider().

◆ getUpdateFrequency()

double sc::ExternalDataSource::getUpdateFrequency ( )
static

Definition at line 141 of file dataprovider.cxx.

Referenced by ScXMLExport::WriteExternalDataMapping().

◆ getURL()

const OUString & sc::ExternalDataSource::getURL ( ) const

◆ getXMLImportParam()

const ScOrcusImportXMLParam & sc::ExternalDataSource::getXMLImportParam ( ) const

Definition at line 113 of file dataprovider.cxx.

References maParam.

Referenced by sc::XMLDataProvider::Import().

◆ refresh()

void sc::ExternalDataSource::refresh ( ScDocument pDoc,
bool  bDeterministic = false 
)

◆ setDBData()

void sc::ExternalDataSource::setDBData ( const OUString &  rDBName)

Definition at line 129 of file dataprovider.cxx.

References mpDBDataManager, and mpDoc.

Referenced by ScDataProviderDlg::import(), and ScXMLMappingContext::ScXMLMappingContext().

◆ setID()

void sc::ExternalDataSource::setID ( const OUString &  rID)

Definition at line 75 of file dataprovider.cxx.

References maID.

Referenced by ScDataProviderDlg::getDataSource(), and ScXMLMappingContext::ScXMLMappingContext().

◆ setProvider()

void sc::ExternalDataSource::setProvider ( const OUString &  rProvider)

Definition at line 92 of file dataprovider.cxx.

References maProvider, and mpDataProvider.

◆ setUpdateFrequency()

void sc::ExternalDataSource::setUpdateFrequency ( double  nUpdateFrequency)

◆ setURL()

void sc::ExternalDataSource::setURL ( const OUString &  rURL)

Definition at line 87 of file dataprovider.cxx.

References maURL.

◆ setXMLImportParam()

void sc::ExternalDataSource::setXMLImportParam ( const ScOrcusImportXMLParam rParam)

Definition at line 80 of file dataprovider.cxx.

References maParam.

Member Data Documentation

◆ maDataTransformations

std::vector<std::shared_ptr<sc::DataTransformation> > sc::ExternalDataSource::maDataTransformations
private

Definition at line 68 of file datamapper.hxx.

Referenced by AddDataTransformation(), and getDataTransformation().

◆ maID

OUString sc::ExternalDataSource::maID
private

The ID allows the same data provider to support different data streams.

A data provider may decide to ignore the ID string.

Definition at line 61 of file datamapper.hxx.

Referenced by getID(), and setID().

◆ maParam

ScOrcusImportXMLParam sc::ExternalDataSource::maParam
private

Definition at line 63 of file datamapper.hxx.

Referenced by getXMLImportParam(), and setXMLImportParam().

◆ maProvider

OUString sc::ExternalDataSource::maProvider
private

The data provider is a unique identifier that will allow to identify and instantiate the required data provider.

Examples for the internal data providers are:

org.libreoffice.dataprovider.calc.csv org.libreoffice.dataprovider.calc.json

Only internal data providers should use the: "org.libreoffice.dataprovider prefix".

Definition at line 53 of file datamapper.hxx.

Referenced by getProvider(), and setProvider().

◆ maURL

OUString sc::ExternalDataSource::maURL
private

The URL for the external data provider.

The URL will be passed to the data provider together with the ID.

A data provider may decide to ignore the URL string.

Definition at line 38 of file datamapper.hxx.

Referenced by getURL(), and setURL().

◆ mpDataProvider

std::shared_ptr<DataProvider> sc::ExternalDataSource::mpDataProvider
private

Definition at line 65 of file datamapper.hxx.

Referenced by refresh(), and setProvider().

◆ mpDBDataManager

std::shared_ptr<ScDBDataManager> sc::ExternalDataSource::mpDBDataManager
private

Definition at line 66 of file datamapper.hxx.

Referenced by getDBManager(), getDBName(), refresh(), and setDBData().

◆ mpDoc

ScDocument* sc::ExternalDataSource::mpDoc
private

Definition at line 70 of file datamapper.hxx.

Referenced by setDBData().


The documentation for this class was generated from the following files: