My Project
Public Member Functions | List of all members
resqml2_0_1::PropertyKindMapper Class Reference

Public Member Functions

 PropertyKindMapper (common::EpcDocument *epcDoc)
 
std::string loadMappingFilesFromDirectory (const std::string &directory)
 
std::string getApplicationPropertyKindNameFromResqmlStandardPropertyKindName (const gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind &resqmlStandardPropertyKindName, const std::string &application) const
 
gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind getResqmlStandardPropertyKindNameFromApplicationPropertyKindName (const std::string &applicationPropertyKindName, const std::string &application) const
 
std::string getApplicationPropertyKindNameFromResqmlLocalPropertyKindUuid (const std::string &resqmlLocalPropertyKindUuid, const std::string &application) const
 
std::string getResqmlLocalPropertyKindUuidFromApplicationPropertyKindName (const std::string &applicationPropertyKindName, const std::string &application) const
 
class PropertyKindaddResqmlLocalPropertyKindToEpcDocumentFromApplicationPropertyKindName (const std::string &applicationPropertyKindName, const std::string &application)
 
gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind getPropertyKindParentOfResqmlStandardPropertyKindName (const gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind &resqmlStandardPropertyKindName) const
 
std::string getDescriptionOfResqmlStandardPropertyKindName (const gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind &resqmlStandardPropertyKindName) const
 
bool isChildOf (gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind child, gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind parent) const
 
bool isAbstract (gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind resqmlStandardPropertyKindName) const
 

Member Function Documentation

PropertyKind * PropertyKindMapper::addResqmlLocalPropertyKindToEpcDocumentFromApplicationPropertyKindName ( const std::string &  applicationPropertyKindName,
const std::string &  application 
)

Add a resqml local property type into the EPC document given in constructor if not already present in EPC document. This addition will also add all needed resqml local property type parent into the EPC document.

std::string PropertyKindMapper::getApplicationPropertyKindNameFromResqmlLocalPropertyKindUuid ( const std::string &  resqmlLocalPropertyKindUuid,
const std::string &  application 
) const

application The name of the application

Returns
empty string if not found
std::string PropertyKindMapper::getApplicationPropertyKindNameFromResqmlStandardPropertyKindName ( const gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind &  resqmlStandardPropertyKindName,
const std::string &  application 
) const

Get the name of a resqml standard property kind into a particular application.

Parameters
resqmlStandardPropertyKindNameThe enumerated resqml standard property kind name application The name of the application
Returns
The property kind name in the particular application. Or an empty string if not found.
std::string PropertyKindMapper::getDescriptionOfResqmlStandardPropertyKindName ( const gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind &  resqmlStandardPropertyKindName) const

Get the description of a Resqml Standard PropertyKind.

gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind PropertyKindMapper::getPropertyKindParentOfResqmlStandardPropertyKindName ( const gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind &  resqmlStandardPropertyKindName) const

Get the title of the parent of a Resqml Standard PropertyKind.

std::string PropertyKindMapper::getResqmlLocalPropertyKindUuidFromApplicationPropertyKindName ( const std::string &  applicationPropertyKindName,
const std::string &  application 
) const
Returns
empty string if not found
gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind PropertyKindMapper::getResqmlStandardPropertyKindNameFromApplicationPropertyKindName ( const std::string &  applicationPropertyKindName,
const std::string &  application 
) const

application The name of the application

Returns
The abstract Resqml root property name if no resqml standard property name have been found for this particular application property kind name.
bool PropertyKindMapper::isAbstract ( gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind  resqmlStandardPropertyKindName) const

Check if a resqml property kind is an abstract one or not.

Parameters
resqmlStandardPropertyKindNameThe resqml property kind to test
bool PropertyKindMapper::isChildOf ( gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind  child,
gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind  parent 
) const

Check if a resqml property kind is a child of another one.

Parameters
childThe resqml property kind which is supposed to be the child
parentThe resqml property kind which is supposed to be the parent
string PropertyKindMapper::loadMappingFilesFromDirectory ( const std::string &  directory)

Load in maps all the config files present in a particular directory. Config files are all xml files (extension must be .xml). One of this xml file must be named PropertyKindMapping.xml. PropertyKindMapping.xml is the only file to make the mapping with the standard property types. All others xml files must be local property kinds mapping.

Parameters
directoryThe directory must not end with any slash

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