Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Public Member Functions | Static Public Attributes | List of all members
eml2::Activity Class Referenceabstract

Instance of a given activity. More...

#include <Activity.h>

Inheritance diagram for eml2::Activity:
common::AbstractObject eml2_3::Activity resqml2_0_1::Activity

Public Member Functions

 Activity (gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
 
virtual ~Activity ()=default
 
virtual void pushBackParameter (const std::string title, const std::string &value)=0
 
virtual void pushBackParameter (const std::string title, int64_t value)=0
 
virtual void pushBackParameter (const std::string title, AbstractObject *resqmlObject)=0
 
virtual unsigned int getParameterCount () const =0
 
virtual unsigned int getParameterCount (const std::string &paramTitle) const =0
 
virtual const std::string & getParameterTitle (unsigned int index) const =0
 
virtual std::vector< unsigned int > getParameterIndexOfTitle (const std::string &paramTitle) const =0
 
virtual bool isAFloatingPointQuantityParameter (const std::string &paramTitle) const =0
 
virtual bool isAFloatingPointQuantityParameter (unsigned int index) const =0
 
virtual std::vector< double > getFloatingPointQuantityParameterValue (const std::string &paramTitle) const =0
 
virtual double getFloatingPointQuantityParameterValue (unsigned int index) const =0
 
virtual bool isAnIntegerQuantityParameter (const std::string &paramTitle) const =0
 
virtual bool isAnIntegerQuantityParameter (unsigned int index) const =0
 
virtual std::vector< int64_t > getIntegerQuantityParameterValue (const std::string &paramTitle) const =0
 
virtual int64_t getIntegerQuantityParameterValue (unsigned int index) const =0
 
virtual bool isAStringParameter (const std::string &paramTitle) const =0
 Queries if all of the parameters sharing a given title are string parameters. More...
 
virtual bool isAStringParameter (unsigned int index) const =0
 
virtual std::vector< std::string > getStringParameterValue (const std::string &paramTitle) const =0
 
virtual const std::string & getStringParameterValue (unsigned int index) const =0
 
virtual bool isAResqmlObjectParameter (const std::string &paramTitle) const =0
 
virtual bool isAResqmlObjectParameter (unsigned int index) const =0
 
virtual std::vector< AbstractObject * > getResqmlObjectParameterValue (const std::string &paramTitle) const =0
 
virtual AbstractObject * getResqmlObjectParameterValue (unsigned int index) const =0
 
virtual void setActivityTemplate (ActivityTemplate *activityTemplate)=0
 
virtual common::DataObjectReference getActivityTemplateDor () const =0
 
ActivityTemplategetActivityTemplate () const
 
std::vector< AbstractObject * > getResqmlObjectSet () const
 
virtual std::string getXmlTag () const final
 
- Public Member Functions inherited from common::AbstractObject
bool isPartial () const
 
virtual bool isTopLevelElement () const
 
std::string getUuid () const
 
std::string getTitle () const
 
std::string getEditor () const
 
time_t getCreation () const
 
tm getCreationAsTimeStructure () const
 
std::string getOriginator () const
 
std::string getDescription () const
 
time_t getLastUpdate () const
 
tm getLastUpdateAsTimeStructure () const
 
std::string getFormat () const
 
std::string getDescriptiveKeywords () const
 
std::string getVersion () const
 
void setTitle (const std::string &title)
 
void setEditor (const std::string &editor)
 
void setCreation (time_t creation)
 
void setCreation (const tm &creation)
 
void setOriginator (const std::string &originator)
 
void setDescription (const std::string &description)
 
void setLastUpdate (time_t lastUpdate)
 
void setLastUpdate (const tm &lastUpdate)
 
void setDescriptiveKeywords (const std::string &descriptiveKeywords)
 
void setVersion (const std::string &version)
 
void setMetadata (const std::string &title, const std::string &editor, time_t creation, const std::string &originator, const std::string &description, time_t lastUpdate, const std::string &descriptiveKeywords)
 
void serializeIntoStream (std::ostream *stream)
 
void setGsoapProxy (gsoap_resqml2_0_1::eml20__AbstractCitedDataObject *gsoapProxy)
 
void setGsoapProxy (gsoap_eml2_1::eml21__AbstractObject *gsoapProxy)
 
gsoap_resqml2_0_1::eml20__AbstractCitedDataObject * getEml20GsoapProxy () const
 
gsoap_eml2_1::eml21__AbstractObject * getEml21GsoapProxy () const
 
gsoap_eml2_2::eml22__AbstractObject * getEml22GsoapProxy () const
 
void setGsoapProxy (gsoap_eml2_2::eml22__AbstractObject *gsoapProxy)
 
gsoap_eml2_3::eml23__AbstractObject * getEml23GsoapProxy () const
 
void setGsoapProxy (gsoap_eml2_3::eml23__AbstractObject *gsoapProxy)
 
soap * getGsoapContext () const
 
int getGsoapType () const
 
gsoap_resqml2_0_1::eml20__DataObjectReference * newResqmlReference () const
 
gsoap_eml2_1::eml21__DataObjectReference * newEmlReference () const
 
gsoap_eml2_2::eml22__DataObjectReference * newEml22Reference () const
 
gsoap_eml2_3::eml23__DataObjectReference * newEml23Reference () const
 
gsoap_resqml2_0_1::resqml20__ContactElementReference * newContactElementReference2_0_1 () const
 
gsoap_eml2_3::resqml22__ContactElement * newContactElementReference2_2 () const
 
common::DataObjectRepositorygetRepository () const
 
virtual std::string getXmlNamespace () const =0
 
virtual std::string getXmlNamespaceVersion () const
 
virtual std::string getContentType () const
 
virtual std::string getQualifiedType () const
 
virtual std::string getPartNameInEpcDocument () const
 
std::string serializeIntoString ()
 
void addAlias (const std::string &authority, const std::string &title)
 
unsigned int getAliasCount () const
 
std::string getAliasAuthorityAtIndex (unsigned int index) const
 
std::string getAliasTitleAtIndex (unsigned int index) const
 
std::vector< eml2::Activity * > getActivitySet () const
 
unsigned int getActivityCount () const
 
eml2::ActivitygetActivity (unsigned int index) const
 
void pushBackExtraMetadata (const std::string &key, const std::string &value)
 
std::unordered_map< std::string, std::string > getExtraMetadataSet () const
 
std::vector< std::string > getExtraMetadata (const std::string &key) const
 
unsigned int getExtraMetadataCount () const
 
std::string getExtraMetadataKeyAtIndex (unsigned int index) const
 
std::string getExtraMetadataStringValueAtIndex (unsigned int index) const
 

Static Public Attributes

static const char * XML_TAG
 

Additional Inherited Members

- Public Types inherited from common::AbstractObject
enum  hdfDatatypeEnum {
  UNKNOWN = 0 , DOUBLE = 1 , FLOAT = 2 , LONG_64 = 3 ,
  ULONG_64 = 4 , INT = 5 , UINT = 6 , SHORT = 7 ,
  USHORT = 8 , CHAR = 9 , UCHAR = 10
}
 
- Static Public Member Functions inherited from common::AbstractObject
static void setFormat (const std::string &vendor, const std::string &applicationName, const std::string &applicationVersionNumber)
 

Detailed Description

Instance of a given activity.

Constructor & Destructor Documentation

◆ Activity()

eml2::Activity::Activity ( gsoap_resqml2_0_1::eml20__DataObjectReference *  partialObject)
inline

Only to be used in partial transfer context

Parameters
[in]partialObjectIf non-null, the partial object.

◆ ~Activity()

virtual eml2::Activity::~Activity ( )
virtualdefault

Destructor does nothing since the memory is managed by the gSOAP context.

Reimplemented in resqml2_0_1::Activity, and eml2_3::Activity.

Member Function Documentation

◆ getActivityTemplate()

ActivityTemplate* eml2::Activity::getActivityTemplate ( ) const

Gets the activity template of this activity.

Returns
The activity template of this activity.

◆ getActivityTemplateDor()

virtual common::DataObjectReference eml2::Activity::getActivityTemplateDor ( ) const
pure virtual

Gets the data object reference of the activity template of this activity.

Returns
The data object reference of the activity template.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ getFloatingPointQuantityParameterValue() [1/2]

virtual std::vector<double> eml2::Activity::getFloatingPointQuantityParameterValue ( const std::string &  paramTitle) const
pure virtual

Gets the values of all the floating point quantity parameters sharing a given title.

Exceptions
std::invalid_argumentIf there exists no paramTitle parameter in this activity.
std::invalid_argumentIf one paramTitle parameter contains some non double values.
Parameters
paramTitleThe title of the floating point parameters we look for the value.
Returns
A vector of the value of all the paramTitle floating point quantity parameters.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ getFloatingPointQuantityParameterValue() [2/2]

virtual double eml2::Activity::getFloatingPointQuantityParameterValue ( unsigned int  index) const
pure virtual

Gets the floating point quantity value of a given parameter.

Exceptions
std::out_of_rangeIf index is not in the parameter range.
std::invalid_argumentIf the parameter at index is not a floating point quantity parameter.
Parameters
indexZero-based index of the parameter we look for the value. This index is taken in the set of all parameters of this activity.
Returns
The floating point quantity value of the parameter at position index.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ getIntegerQuantityParameterValue() [1/2]

virtual std::vector<int64_t> eml2::Activity::getIntegerQuantityParameterValue ( const std::string &  paramTitle) const
pure virtual

Gets the values of all the integer quantity parameters sharing a given title.

Exceptions
std::invalid_argumentIf there exists no paramTitle parameter in this activity.
std::invalid_argumentIf one paramTitle parameter contains some non integer values.
Parameters
paramTitleThe title of the integer parameters we look for the value.
Returns
A vector of the value of all the paramTitle integer quantity parameters.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ getIntegerQuantityParameterValue() [2/2]

virtual int64_t eml2::Activity::getIntegerQuantityParameterValue ( unsigned int  index) const
pure virtual

Gets the integer quantity value of a given parameter.

Exceptions
std::out_of_rangeIf index is not in the parameter range.
std::invalid_argumentIf the parameter at index is not an integer quantity parameter.
Parameters
indexZero-based index of the parameter we look for the value. This index is taken in the set of all parameters of this activity.
Returns
The integer quantity value of the parameter at position index.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ getParameterCount() [1/2]

virtual unsigned int eml2::Activity::getParameterCount ( ) const
pure virtual

Get the count of all the parameters

Returns
The parameter count.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ getParameterCount() [2/2]

virtual unsigned int eml2::Activity::getParameterCount ( const std::string &  paramTitle) const
pure virtual

Gets the count of all the parameters which have the same title.

Parameters
paramTitleThe title of the parameters we look for.
Returns
The parameter count.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ getParameterIndexOfTitle()

virtual std::vector<unsigned int> eml2::Activity::getParameterIndexOfTitle ( const std::string &  paramTitle) const
pure virtual

Gets the indices of all the parameters sharing a given title.

Parameters
paramTitleThe title of the parameters we look for.
Returns
A vector of parameter indices.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ getParameterTitle()

virtual const std::string& eml2::Activity::getParameterTitle ( unsigned int  index) const
pure virtual

Gets the title of a given parameter

Exceptions
std::out_of_rangeIf index is not in the parameter range.
Parameters
indexZero-based index of the parameter for which we look for the title.
Returns
The parameter title.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ getResqmlObjectParameterValue() [1/2]

virtual std::vector<AbstractObject*> eml2::Activity::getResqmlObjectParameterValue ( const std::string &  paramTitle) const
pure virtual

Gets the values of all the RESQML object parameters sharing a given title.

Exceptions
std::invalid_argumentIf there exists no paramTitle parameter in this activity.
std::invalid_argumentIf one paramTitle parameter contains some non RESQML object values.
Parameters
paramTitleThe title of the RESQML object parameters we look for the value.
Returns
A vector of the value of all the paramTitle RESQML object parameters.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ getResqmlObjectParameterValue() [2/2]

virtual AbstractObject* eml2::Activity::getResqmlObjectParameterValue ( unsigned int  index) const
pure virtual

Gets the RESQML object value of a given parameter.

Exceptions
std::out_of_rangeIf index is not in the parameter range.
std::invalid_argumentIf the parameter at index is not an RESQML object parameter.
Parameters
indexZero-based index of the parameter we look for the value. This index is taken in the set of all parameters of this activity.
Returns
The RESQML object value of the parameter at position index.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ getResqmlObjectSet()

std::vector<AbstractObject*> eml2::Activity::getResqmlObjectSet ( ) const

Gets all the RESQML objects which are either input or output of this activity. That is to say all of the values of the RESQML object parameters of this activity.

Returns
A vector of pointers to the RESQML objects which are either input or output of this activity.

◆ getStringParameterValue() [1/2]

virtual std::vector<std::string> eml2::Activity::getStringParameterValue ( const std::string &  paramTitle) const
pure virtual

Gets the values of all the string parameters sharing a given title.

Exceptions
std::invalid_argumentIf there exists no paramTitle parameter in this activity.
std::invalid_argumentIf one paramTitle parameter contains some non string values.
Parameters
paramTitleThe title of the string parameters we look for the value.
Returns
A vector of the value of all the paramTitle string parameters.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ getStringParameterValue() [2/2]

virtual const std::string& eml2::Activity::getStringParameterValue ( unsigned int  index) const
pure virtual

Gets the string value of a given parameter.

Exceptions
std::out_of_rangeIf index is not in the parameter range.
std::invalid_argumentIf the parameter at index is not an string parameter.
Parameters
indexZero-based index of the parameter we look for the value. This index is taken in the set of all parameters of this activity.
Returns
The string value of the parameter at position index.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ getXmlTag()

virtual std::string eml2::Activity::getXmlTag ( ) const
inlinefinalvirtual

Gets the standard XML tag without XML namespace for serializing this data object.

Returns
The XML tag.

Implements common::AbstractObject.

◆ isAFloatingPointQuantityParameter() [1/2]

virtual bool eml2::Activity::isAFloatingPointQuantityParameter ( const std::string &  paramTitle) const
pure virtual

Queries if all of the parameters sharing a given title are floating point quantity parameters.

Exceptions
std::invalid_argumentIf there exists no paramTitle parameter in this activity.
Parameters
paramTitleThe title of the parameters we want to test the datatype.
Returns
True if all of the paramTitle parameters are floating point quantity parameters, false if not.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ isAFloatingPointQuantityParameter() [2/2]

virtual bool eml2::Activity::isAFloatingPointQuantityParameter ( unsigned int  index) const
pure virtual

Queries if a given parameter is a floating point quantity parameter.

Exceptions
std::out_of_rangeIf index is not in the parameter range.
Parameters
indexZero-based index of the parameter we want to test the datatype.
Returns
True if the parameter at position index is a floating point quantity parameter, false if not.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ isAnIntegerQuantityParameter() [1/2]

virtual bool eml2::Activity::isAnIntegerQuantityParameter ( const std::string &  paramTitle) const
pure virtual

Queries if all of the parameters sharing a given title are integer quantity parameters.

Exceptions
std::invalid_argumentIf there exists no paramTitle parameter in this activity.
Parameters
paramTitleThe title of the parameters we want to test the datatype.
Returns
True if all of the paramTitle parameters are integer quantity parameters, false if not.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ isAnIntegerQuantityParameter() [2/2]

virtual bool eml2::Activity::isAnIntegerQuantityParameter ( unsigned int  index) const
pure virtual

Queries if a given parameter is an integer quantity parameter.

Exceptions
std::out_of_rangeIf index is not in the parameter range.
Parameters
indexZero-based index of the parameter we want to test the datatype.
Returns
True if the parameter at position index is an integer quantity parameter, false if not.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ isAResqmlObjectParameter() [1/2]

virtual bool eml2::Activity::isAResqmlObjectParameter ( const std::string &  paramTitle) const
pure virtual

Queries if all of the parameters sharing a given title are RESQML object parameters.

Exceptions
std::invalid_argumentIf there exists no paramTitle parameter in this activity.
Parameters
paramTitleThe title of the parameters we want to test the datatype.
Returns
True if all of the paramTitle parameters are RESQML object parameters, false if not.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ isAResqmlObjectParameter() [2/2]

virtual bool eml2::Activity::isAResqmlObjectParameter ( unsigned int  index) const
pure virtual

Queries if a given parameter is a RESQML object parameter.

Exceptions
std::out_of_rangeIf index is not in the parameter range.
Parameters
indexZero-based index of the parameter we want to test the datatype.
Returns
True if the parameter at position index is a RESQML object parameter, false if not.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ isAStringParameter() [1/2]

virtual bool eml2::Activity::isAStringParameter ( const std::string &  paramTitle) const
pure virtual

Queries if all of the parameters sharing a given title are string parameters.

Exceptions
std::invalid_argumentIf there exists no paramTitle parameter in this activity.
Parameters
paramTitleThe title of the parameters we want to test the datatype.
Returns
True if all of the paramTitle parameters are string parameters, false if not.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ isAStringParameter() [2/2]

virtual bool eml2::Activity::isAStringParameter ( unsigned int  index) const
pure virtual

Queries if a given parameter is a string parameter.

Exceptions
std::out_of_rangeIf index is not in the parameter range.
Parameters
indexZero-based index of the parameter we want to test the datatype.
Returns
True if the parameter at position index is a string parameter, false if not.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ pushBackParameter() [1/3]

virtual void eml2::Activity::pushBackParameter ( const std::string  title,
AbstractObject *  resqmlObject 
)
pure virtual

Pushes back a RESQML object parameter in this instance. This parameter must exist in the associated activity template.

Exceptions
std::invalid_argumentIf resqmlObject is null.
std::invalid_argumentIf the parameter title does not exist in the associated activity template.
std::invalid_argumentIf the maximum number of occurrences has already been reached for parameter title.
std::invalid_argumentIf The parameter template title does not allow a a data object datatype.
Parameters
titleThe title of the parameter to push back.
[in]resqmlObjectThe RESQML object, value of the parameter to push back.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ pushBackParameter() [2/3]

virtual void eml2::Activity::pushBackParameter ( const std::string  title,
const std::string &  value 
)
pure virtual

Pushes back a string parameter in this instance. This parameter must exist in the associated activity template.

Exceptions
std::invalid_argumentIf the parameter title does not exist in the associated activity template.
std::invalid_argumentIf the maximum number of occurrences has already been reached for parameter title.
std::invalid_argumentIf The parameter template title does not allow a string datatype.
Parameters
titleThe title of the parameter to push back.
valueThe value of the parameter to push back.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ pushBackParameter() [3/3]

virtual void eml2::Activity::pushBackParameter ( const std::string  title,
int64_t  value 
)
pure virtual

Pushes back an integer parameter in this instance. This parameter must exist in the associated activity template.

Exceptions
std::invalid_argumentIf the parameter title does not exist in the associated activity template.
std::invalid_argumentIf the maximum number of occurrences has already been reached for parameter title.
std::invalid_argumentIf The parameter template title does not allow a an integer datatype.
Parameters
titleThe title of the parameter to push back.
valueThe value of the parameter to push back.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

◆ setActivityTemplate()

virtual void eml2::Activity::setActivityTemplate ( ActivityTemplate activityTemplate)
pure virtual

Sets the activity template of this activity.

Parameters
[in]activityTemplateIf non-null, the activity template.

Implemented in resqml2_0_1::Activity, and eml2_3::Activity.

Member Data Documentation

◆ XML_TAG

const char* eml2::Activity::XML_TAG
static

The standard XML tag without XML namespace for serializing this data object


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