Rok4Server  0.25.4
 All Classes Files Functions Variables Enumerations Enumerator Pages
Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
ConfLoader Class Reference

Load configuration. More...

#include <ConfLoader.h>

Collaboration diagram for ConfLoader:
Collaboration graph

Public Member Functions

void pElem ()

Static Public Member Functions

static bool getTechnicalParam (std::string serverConfigFile, LogOutput &logOutput, std::string &logFilePrefix, int &logFilePeriod, LogLevel &logLevel, int &nbThread, bool &supportWMTS, bool &supportWMS, bool &reprojectionCapability, std::string &servicesConfigFile, std::string &layerDir, std::string &tmsDir, std::string &styleDir, std::string &socket, int &backlog)
 Load server parameter from a file.
static bool buildStylesList (std::string styleDir, std::map< std::string, Style * > &stylesList, bool inspire)
 Load Styles from the styleDir directory.
static bool buildTMSList (std::string tmsDir, std::map< std::string, TileMatrixSet * > &tmsList)
 Load Styles from the styleDir directory.
static bool buildLayersList (std::string layerDir, std::map< std::string, TileMatrixSet * > &tmsList, std::map< std::string, Style * > &stylesList, std::map< std::string, Layer * > &layers, bool reprojectionCapability, ServicesConf *servicesConf)
 Load Styles from the styleDir directory.
static ServicesConfbuildServicesConf (std::string servicesConfigFile)
 Load service parameters from a file.

Static Private Member Functions

static StyleparseStyle (TiXmlDocument *doc, std::string fileName, bool inspire)
 Create a new Style from its XML representation.
static StylebuildStyle (std::string fileName, bool inspire)
 Create a new Style from a file.
static TileMatrixSetparseTileMatrixSet (TiXmlDocument *doc, std::string fileName)
 Create a new TileMatrixSet from its XML representation.
static TileMatrixSetbuildTileMatrixSet (std::string fileName)
 Create a new TileMatrixSet from a file.
static PyramidparsePyramid (TiXmlDocument *doc, std::string fileName, std::map< std::string, TileMatrixSet * > &tmsList)
 Create a new Pyramid from its XML representation.
static PyramidbuildPyramid (std::string fileName, std::map< std::string, TileMatrixSet * > &tmsList)
 Create a new Pyramid from a file.
static LayerparseLayer (TiXmlDocument *doc, std::string fileName, std::map< std::string, TileMatrixSet * > &tmsList, std::map< std::string, Style * > stylesList, bool reprojectionCapability, ServicesConf *servicesConf)
 Create a new Layer from its XML representation.
static LayerbuildLayer (std::string fileName, std::map< std::string, TileMatrixSet * > &tmsList, std::map< std::string, Style * > stylesList, bool reprojectionCapability, ServicesConf *servicesConf)
 Create a new Layer from a file.
static bool parseTechnicalParam (TiXmlDocument *doc, std::string serverConfigFile, LogOutput &logOutput, std::string &logFilePrefix, int &logFilePeriod, LogLevel &logLevel, int &nbThread, bool &supportWMTS, bool &supportWMS, bool &reprojectionCapability, std::string &servicesConfigFile, std::string &layerDir, std::string &tmsDir, std::string &styleDir, std::string &socket, int &backlog)
 Load server parameter from its XML representation.
static ServicesConfparseServicesConf (TiXmlDocument *doc, std::string servicesConfigFile)
 Load service parameters from their XML representation.
static std::vector< std::string > loadListEqualsCRS ()
 Load equivalents CRS list from listofequalscrs.txt file in Proj directory.
static std::vector< std::string > loadStringVectorFromFile (std::string file)
 Load strings list form file.
static bool isCRSAllowed (std::vector< std::string > restrictedCRSList, std::string crs, std::vector< CRS > equiCRSList)
 Check if the CRS or an equivalent is in the allowed CRS list.
static std::vector< CRS > getEqualsCRS (std::vector< std::string > listofequalsCRS, std::string crs)
 Return the list of the equivalents CRS who are Proj4 compatible.

Detailed Description

Load configuration.

Author
Institut national de l'information géographique et forestière

Function library to load server configuration file

Member Function Documentation

Layer * ConfLoader::buildLayer ( std::string  fileName,
std::map< std::string, TileMatrixSet * > &  tmsList,
std::map< std::string, Style * >  stylesList,
bool  reprojectionCapability,
ServicesConf servicesConf 
)
staticprivate

Create a new Layer from a file.

Parameters
[in]fileNameoriginal filename, used as identifier
[in]tmsListknown TileMatrixSets
[in]stylesListknown Styles
[in]reprojectionCapabilitywhether the server can handle reprojection
[in]servicesConfglobal service configuration pointer
Returns
pointer to the newly created Layer, NULL if something went wrong

Here is the call graph for this function:

Here is the caller graph for this function:

bool ConfLoader::buildLayersList ( std::string  layerDir,
std::map< std::string, TileMatrixSet * > &  tmsList,
std::map< std::string, Style * > &  stylesList,
std::map< std::string, Layer * > &  layers,
bool  reprojectionCapability,
ServicesConf servicesConf 
)
static

Load Styles from the styleDir directory.

Parameters
[in]layerDirpath to TileMatrixSet directory
[in]tmsListset of available TileMatrixSets
[in]stylesListset of available Styles
[out]layersset of available Layers
[in]reprojectionCapabilitywhether the server can handle reprojection
[in]servicesConfglobal services configuration pointer
Returns
false if something went wrong

Here is the call graph for this function:

Here is the caller graph for this function:

Pyramid * ConfLoader::buildPyramid ( std::string  fileName,
std::map< std::string, TileMatrixSet * > &  tmsList 
)
staticprivate

Create a new Pyramid from a file.

Parameters
[in]fileNamefilename, used as identifier
[in]tmsListknown TileMatrixSets
Returns
pointer to the newly created Pyramid, NULL if something went wrong

Here is the call graph for this function:

Here is the caller graph for this function:

ServicesConf * ConfLoader::buildServicesConf ( std::string  servicesConfigFile)
static

Load service parameters from a file.

Parameters
[in]fileNameoriginal filename, used as identifier
Returns
pointer to the newly created ServicesConf, NULL if something went wrong

Here is the call graph for this function:

Here is the caller graph for this function:

Style * ConfLoader::buildStyle ( std::string  fileName,
bool  inspire 
)
staticprivate

Create a new Style from a file.

Parameters
[in]fileNamefilename, used as identifier
[in]inspirewhether INSPIRE validity rules are enforced
Returns
pointer to the newly created Style, NULL if something went wrong

Here is the call graph for this function:

Here is the caller graph for this function:

bool ConfLoader::buildStylesList ( std::string  styleDir,
std::map< std::string, Style * > &  stylesList,
bool  inspire 
)
static

Load Styles from the styleDir directory.

Parameters
[in]styleDirpath to Style directory
[out]stylesListset of available Styles.
[in]inspirewhether INSPIRE validity rules are enforced
Returns
false if something went wrong

Here is the call graph for this function:

Here is the caller graph for this function:

TileMatrixSet * ConfLoader::buildTileMatrixSet ( std::string  fileName)
staticprivate

Create a new TileMatrixSet from a file.

Parameters
[in]fileNamefilename, used as identifier
Returns
pointer to the newly created TileMatrixSet, NULL if something went wrong

Here is the call graph for this function:

Here is the caller graph for this function:

bool ConfLoader::buildTMSList ( std::string  tmsDir,
std::map< std::string, TileMatrixSet * > &  tmsList 
)
static

Load Styles from the styleDir directory.

Parameters
[in]tmsDirpath to TileMatrixSet directory
[out]tmsListset of available TileMatrixSets
Returns
false if something went wrong

Here is the call graph for this function:

Here is the caller graph for this function:

bool ConfLoader::getTechnicalParam ( std::string  serverConfigFile,
LogOutput &  logOutput,
std::string &  logFilePrefix,
int &  logFilePeriod,
LogLevel &  logLevel,
int &  nbThread,
bool &  supportWMTS,
bool &  supportWMS,
bool &  reprojectionCapability,
std::string &  servicesConfigFile,
std::string &  layerDir,
std::string &  tmsDir,
std::string &  styleDir,
std::string &  socket,
int &  backlog 
)
static

Load server parameter from a file.

Parameters
[in]fileNameoriginal filename, used as identifier
[out]logOutputtype of logger
[out]logFilePrefixlog file prefix
[out]logFilePeriodlog file rotation period
[out]logLevellog criticity level
[out]nbThreadconcurrent thread number
[out]supportWMTSsupport WMTS request
[out]supportWMSsupport WMS request
[out]reprojectionCapabilitysupport request with reprojection
[out]serverConfigFilepath to service configuration file
[out]layerDirpath to Layer directory
[out]tmsDirpath to TileMatrixSet directory
[out]styleDirpath to Style directory
[out]socketlistening address and port, empty if defined by a FCGI call
[out]backloglisten queue depth
Returns
false if something went wrong

Here is the call graph for this function:

Here is the caller graph for this function:

Layer * ConfLoader::parseLayer ( TiXmlDocument *  doc,
std::string  fileName,
std::map< std::string, TileMatrixSet * > &  tmsList,
std::map< std::string, Style * >  stylesList,
bool  reprojectionCapability,
ServicesConf servicesConf 
)
staticprivate

Create a new Layer from its XML representation.

Parameters
[in]docXML root
[in]fileNameoriginal filename, used as identifier
[in]tmsListknown TileMatrixSets
[in]stylesListknown Styles
[in]reprojectionCapabilitywhether the server can handle reprojection
[in]servicesConfglobal service configuration pointer
Returns
pointer to the newly created Layer, NULL if something went wrong

Here is the call graph for this function:

Here is the caller graph for this function:

Pyramid * ConfLoader::parsePyramid ( TiXmlDocument *  doc,
std::string  fileName,
std::map< std::string, TileMatrixSet * > &  tmsList 
)
staticprivate

Create a new Pyramid from its XML representation.

Parameters
[in]docXML root
[in]fileNameoriginal filename, used as identifier
[in]tmsListknown TileMatrixSets
Returns
pointer to the newly created Pyramid, NULL if something went wrong

Here is the call graph for this function:

Here is the caller graph for this function:

ServicesConf * ConfLoader::parseServicesConf ( TiXmlDocument *  doc,
std::string  servicesConfigFile 
)
staticprivate

Load service parameters from their XML representation.

Parameters
[in]docXML root
[in]fileNameoriginal filename, used as identifier
Returns
pointer to the newly created ServicesConf, NULL if something went wrong

Here is the call graph for this function:

Here is the caller graph for this function:

Style * ConfLoader::parseStyle ( TiXmlDocument *  doc,
std::string  fileName,
bool  inspire 
)
staticprivate

Create a new Style from its XML representation.

Parameters
[in]docXML root
[in]fileNameoriginal filename, used as identifier
[in]inspirewhether INSPIRE validity rules are enforced
Returns
pointer to the newly created Style, NULL if something went wrong

Here is the caller graph for this function:

bool ConfLoader::parseTechnicalParam ( TiXmlDocument *  doc,
std::string  serverConfigFile,
LogOutput &  logOutput,
std::string &  logFilePrefix,
int &  logFilePeriod,
LogLevel &  logLevel,
int &  nbThread,
bool &  supportWMTS,
bool &  supportWMS,
bool &  reprojectionCapability,
std::string &  servicesConfigFile,
std::string &  layerDir,
std::string &  tmsDir,
std::string &  styleDir,
std::string &  socket,
int &  backlog 
)
staticprivate

Load server parameter from its XML representation.

Parameters
[in]docXML root
[in]fileNameoriginal filename, used as identifier
[out]logOutputtype of logger
[out]logFilePrefixlog file prefix
[out]logFilePeriodlog file rotation period
[out]logLevellog criticity level
[out]nbThreadconcurrent thread number
[out]supportWMTSsupport WMTS request
[out]supportWMSsupport WMS request
[out]reprojectionCapabilitysupport request with reprojection
[out]serverConfigFilepath to service configuration file
[out]layerDirpath to Layer directory
[out]tmsDirpath to TileMatrixSet directory
[out]styleDirpath to Style directory
[out]socketlistening address and port, empty if defined by a FCGI call
[out]backloglisten queue depth
Returns
false if something went wrong

Here is the caller graph for this function:

TileMatrixSet * ConfLoader::parseTileMatrixSet ( TiXmlDocument *  doc,
std::string  fileName 
)
staticprivate

Create a new TileMatrixSet from its XML representation.

Parameters
[in]docXML root
[in]fileNameoriginal filename, used as identifier
Returns
pointer to the newly created TileMatrixSet, NULL if something went wrong

Here is the caller graph for this function:


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