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 | List of all members
resqml2::AbstractProperty Class Referenceabstract

Proxy class for an abstract property. More...

#include <AbstractProperty.h>

Inheritance diagram for resqml2::AbstractProperty:
common::AbstractObject resqml2::AbstractValuesProperty resqml2::PointsProperty resqml2::CategoricalProperty resqml2::CommentProperty resqml2::ContinuousProperty resqml2::DiscreteProperty resqml2_0_1::PointsProperty resqml2_2::PointsProperty resqml2_0_1::CategoricalProperty resqml2_2::CategoricalProperty resqml2_0_1::CommentProperty resqml2_2::CommentProperty resqml2_0_1::ContinuousProperty resqml2_2::ContinuousProperty resqml2_0_1::DiscreteProperty resqml2_2::DiscreteProperty

Public Member Functions

virtual ~AbstractProperty ()=default
 
void setRepresentation (AbstractRepresentation *rep)
 
common::DataObjectReference getRepresentationDor () const
 
AbstractRepresentationgetRepresentation () const
 
unsigned int getElementCountPerValue () const
 
gsoap_eml2_3::resqml22__IndexableElement getAttachmentKind () const
 
virtual unsigned int getPatchCount () const =0
 
common::AbstractObject::hdfDatatypeEnum getValuesHdfDatatype () const
 
unsigned int getValuesCountOfPatch (unsigned int patchIndex) const
 
unsigned int getValuesCountOfDimensionOfPatch (unsigned int dimIndex, unsigned int patchIndex) const
 
unsigned int getDimensionsCountOfPatch (unsigned int patchIndex) const
 
std::vector< resqml2::PropertySet * > getPropertySets () const
 
unsigned int getPropertySetCount () const
 
resqml2::PropertySetgetPropertySet (unsigned int index) const
 
void setLocalCrs (class AbstractLocal3dCrs *crs)
 
class AbstractLocal3dCrsgetLocalCrs () const
 
common::DataObjectReference getLocalCrsDor () const
 
bool hasRealizationIndices () const
 
std::vector< unsigned int > getRealizationIndices () const
 
void setRealizationIndices (uint64_t startRealizationIndex, uint64_t countRealizationIndices)
 
void setRealizationIndices (const std::vector< unsigned int > &realizationIndices, eml2::AbstractHdfProxy *hdfProxy=nullptr)
 Sets the realization indices of this property. More...
 
void setTimeSeries (eml2::TimeSeries *ts)
 
eml2::TimeSeriesgetTimeSeries () const
 
common::DataObjectReference getTimeSeriesDor () const
 
void setTimeIndices (uint64_t startTimeIndex, uint64_t countTimeIndices, eml2::TimeSeries *ts, bool useInterval=false)
 Sets the timestamps of this property by means of an index in a time series. More...
 
unsigned int getTimeIndexStart () const
 
unsigned int getTimeIndicesCount () const
 
bool useInterval () const
 
bool isAssociatedToOneStandardEnergisticsPropertyKind () const
 
std::string getPropertyKindDescription () const
 
std::string getPropertyKindAsString () const
 
std::string getPropertyKindParentAsString () const
 
void setPropertyKind (eml2::PropertyKind *propKind)
 
common::DataObjectReference getPropertyKindDor () const
 
eml2::PropertyKindgetPropertyKind () const
 
virtual bool validatePropertyKindAssociation (eml2::PropertyKind *pk)=0
 
virtual bool validatePropertyKindAssociation (gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind pk)=0
 
bool validate ()
 
- 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 getXmlTag () 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
 

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

Proxy class for an abstract property.

Constructor & Destructor Documentation

◆ ~AbstractProperty()

virtual resqml2::AbstractProperty::~AbstractProperty ( )
virtualdefault

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

Member Function Documentation

◆ getAttachmentKind()

gsoap_eml2_3::resqml22__IndexableElement resqml2::AbstractProperty::getAttachmentKind ( ) const

Gets the kind of elements on which the property values are attached to

Returns
The kind of elements on which the property values are attached to.

◆ getDimensionsCountOfPatch()

unsigned int resqml2::AbstractProperty::getDimensionsCountOfPatch ( unsigned int  patchIndex) const

Gets the count of dimensions of the underlying HDF5 dataset of a given patch of this property.

Exceptions
std::range_errorIf patchIndex is strictly greater than patch count.
Parameters
patchIndexThe index of the patch we want to count the dimensions from.
Returns
The number of values, 0 otherwise.

◆ getElementCountPerValue()

unsigned int resqml2::AbstractProperty::getElementCountPerValue ( ) const

Gets the count of elements per property value. If the property is a scalar one then it should be one. If it is a vectorial one, then it should be more than one. It is not possible to have some tensor property values (more dimensions than a vector)

Returns
The element count per value.

◆ getLocalCrs()

class AbstractLocal3dCrs* resqml2::AbstractProperty::getLocalCrs ( ) const

Gets the local CRS which is associated to this property.

Returns
The local CRS which is associated to the current property if exists, null if not (usually for a property which is not CRS related).

◆ getLocalCrsDor()

common::DataObjectReference resqml2::AbstractProperty::getLocalCrsDor ( ) const

Gets the data object reference of the local CRS which is associated to this property

Returns
Empty data object reference if no local CRS is associated to this property. Otherwise returns the data object reference of the associated local CRS.

◆ getPatchCount()

virtual unsigned int resqml2::AbstractProperty::getPatchCount ( ) const
pure virtual

Gets the number of patches in this values property. It should be the same count as the patch count of the associated representation.

Exceptions
std::out_of_rangeIf the patch count is strictly greater than unsigned int max value.
Returns
The patch count.

Implemented in resqml2_2::PointsProperty, resqml2_0_1::PointsProperty, and resqml2::AbstractValuesProperty.

◆ getPropertyKind()

eml2::PropertyKind* resqml2::AbstractProperty::getPropertyKind ( ) const

Gets the local property kind which is associated to this instance

Exceptions
std::invalid_argumentIf the property kind of this property is not a local one.
Returns
A pointer to the property kind.

◆ getPropertyKindAsString()

std::string resqml2::AbstractProperty::getPropertyKindAsString ( ) const

Gets the title of the property kind of this property

Returns
The property kind title.

◆ getPropertyKindDescription()

std::string resqml2::AbstractProperty::getPropertyKindDescription ( ) const

Gets the description of the property kind of this property

Exceptions
std::invalid_argumentIf the property kind is a standard Energistics one and the property kind mapping file is not loaded.
Returns
The property kind description.

◆ getPropertyKindDor()

common::DataObjectReference resqml2::AbstractProperty::getPropertyKindDor ( ) const

Gets the data object reference of the property kind associated to this property

Exceptions
std::invalid_argumentIf the property kind of this property is not a local one.
Returns
Empty data object reference if no property kind is associated to this property. Otherwise return the data object reference of the associated local property kind.

◆ getPropertyKindParentAsString()

std::string resqml2::AbstractProperty::getPropertyKindParentAsString ( ) const

Get the title of the parent property kind of this property

Exceptions
std::invalid_argumentIf the property kind is a standard Energistics one and the property kind mapping file is not loaded.
Returns
The parent property kind title.

◆ getPropertySet()

resqml2::PropertySet* resqml2::AbstractProperty::getPropertySet ( unsigned int  index) const

Gets a given property set taken from all property sets which contain this property

Exceptions
std::out_of_rangeIf index is out of range.
Parameters
indexZero-based index of the property set we look for.
Returns
The property set at index.

◆ getPropertySetCount()

unsigned int resqml2::AbstractProperty::getPropertySetCount ( ) const

Gets the count of property sets which contain this property

Exceptions
std::range_errorIf the count of property sets is strictly greater than unsigned int max.
Returns
The count of property sets which contain this property.

◆ getPropertySets()

std::vector<resqml2::PropertySet *> resqml2::AbstractProperty::getPropertySets ( ) const

Gets all property sets which contain this property

Returns
A vector of all property sets which contain this property.

◆ getRealizationIndices()

std::vector<unsigned int> resqml2::AbstractProperty::getRealizationIndices ( ) const

Gets the realization index of this property. Realization index is used if the property is the result of a multi-realization process. You should have checked before that this property actually has a realization index.

Exceptions
std::invalid_argumentIf this property has actually no realization index.
Returns
The realization index.

◆ getRepresentation()

AbstractRepresentation* resqml2::AbstractProperty::getRepresentation ( ) const

Gets the representation which is associated to the current property. That is to say the one which supports this instance values, also called supporting representation

Returns
The representation which is associated to the current property.

◆ getRepresentationDor()

common::DataObjectReference resqml2::AbstractProperty::getRepresentationDor ( ) const

Gets the data object reference of the representation which is associated to the current property

Returns
Empty data object reference if no representation is associated to this property. Otherwise returns the data object reference of the associated representation. Null should not occured since each property must be associated to a representation.

◆ getTimeIndexStart()

unsigned int resqml2::AbstractProperty::getTimeIndexStart ( ) const

Get the time index of this property in its associated time series

Exceptions
std::invalid_argumentIf this property does not have any time index.
Returns
The time index of this property.

◆ getTimeIndicesCount()

unsigned int resqml2::AbstractProperty::getTimeIndicesCount ( ) const

Get the time indices count of this property in its associated time series

Returns
The time indices count of this property.

◆ getTimeSeries()

eml2::TimeSeries* resqml2::AbstractProperty::getTimeSeries ( ) const

Gets the time series which is associated to this property

Returns
Null pointer if no time series is associated to this property. Otherwise returns the associated time series.

◆ getTimeSeriesDor()

common::DataObjectReference resqml2::AbstractProperty::getTimeSeriesDor ( ) const

Gets the data object reference of the time series associated to this property

Returns
Empty data object reference if no time series is associated to this property. Otherwise returns the data object reference of the associated time series.

◆ getValuesCountOfDimensionOfPatch()

unsigned int resqml2::AbstractProperty::getValuesCountOfDimensionOfPatch ( unsigned int  dimIndex,
unsigned int  patchIndex 
) const

Gets the count of values on a specific dimension of the underlying HDF5 dataset of a given patch of this property.

Exceptions
std::out_of_rangeIf dimIndex is strictly greater than dimension count.
std::range_errorIf patchIndex is strictly greater than patch count.
Parameters
dimIndexThe index of the dimension we want to count the values from.
patchIndexThe index of the patch we want to count the values from.
Returns
The count of values in the dimIndex dimension of patchIndex patch.

◆ getValuesCountOfPatch()

unsigned int resqml2::AbstractProperty::getValuesCountOfPatch ( unsigned int  patchIndex) const

Gets the count of all values contained into the underlying HDF5 dataset of a given patch of this property.

Exceptions
std::range_errorIf patchIndex is strictly greater than patch count.
Parameters
patchIndexThe index of the patch we want to count the values from.
Returns
The count of values of the patchIndex patch.

◆ getValuesHdfDatatype()

common::AbstractObject::hdfDatatypeEnum resqml2::AbstractProperty::getValuesHdfDatatype ( ) const

Get the values data type in the HDF dataset

Returns
The data type of the values if successful, else UNKNOWN.

◆ hasRealizationIndices()

bool resqml2::AbstractProperty::hasRealizationIndices ( ) const

Checks if this property has at least one realization index. Realization index is used if the property is the result of a multi-realization process. Reamrk : v2.0.1 is constrained to have a maximum of one realisation index

Returns
True if the property has at least one realization index, false if not.

◆ isAssociatedToOneStandardEnergisticsPropertyKind()

bool resqml2::AbstractProperty::isAssociatedToOneStandardEnergisticsPropertyKind ( ) const

Indicates if the property kind attached to this property is either from the standard catalog of Energistics or from a local property kind

Returns
True if associated to one standard Energistics property kind, false if not.

◆ setLocalCrs()

void resqml2::AbstractProperty::setLocalCrs ( class AbstractLocal3dCrs crs)

Sets the local CRS which is associated to the current property. You should not set any CRS if your property is not CRS related

Exceptions
std::invalid_argumentIf crs is null.
Parameters
[in]crsThe local CRS to associate with the current property.

◆ setPropertyKind()

void resqml2::AbstractProperty::setPropertyKind ( eml2::PropertyKind propKind)

Sets the property kind of this property to a local one

Exceptions
std::invalid_argumentIf propKind is null.
Parameters
[in]propKindThe local property kind to set to this property.

◆ setRealizationIndices() [1/2]

void resqml2::AbstractProperty::setRealizationIndices ( const std::vector< unsigned int > &  realizationIndices,
eml2::AbstractHdfProxy hdfProxy = nullptr 
)

Sets the realization indices of this property.

Exceptions
std::invalid_argumentIf realizationIndices is empty.
std::invalid_argumentIf the realizationIndices size is strictly greater than 1 in a RESQML 2.0.1 context.
std::invalid_argumentIf, in a RESQML 2.2 context, hdfProxy == nullptr and no default HDF proxy is defined in the repository.
std::logic_errorIf no supported gSOAP proxy is available.
Parameters
realizationIndicesThe realization indices to set to this property.
[in,out]hdfProxy(Optional) The HDF proxy where to store realizationIndices values. If nullptr (default), then the repository default HDF proxy will be used.

◆ setRealizationIndices() [2/2]

void resqml2::AbstractProperty::setRealizationIndices ( uint64_t  startRealizationIndex,
uint64_t  countRealizationIndices 
)

Sets the realization indices of this property

Parameters
startRealizationIndexThe first realization index to set to this property.
countRealizationIndicesThe count of realization indices to set to this property.

◆ setRepresentation()

void resqml2::AbstractProperty::setRepresentation ( AbstractRepresentation rep)

Sets the representation which is associated to the current property

Exceptions
std::invalid_argumentIf rep is null.
Parameters
[in]repThe representation to associate to the current property.

◆ setTimeIndices()

void resqml2::AbstractProperty::setTimeIndices ( uint64_t  startTimeIndex,
uint64_t  countTimeIndices,
eml2::TimeSeries ts,
bool  useInterval = false 
)

Sets the timestamps of this property by means of an index in a time series.

Exceptions
invalid_argumentIf ts is null or if the current property has no time index.
Parameters
[in]startTimeIndexThe first time index to set to this property.
[in]countTimeIndicesThe count of time indices to set to this property.
[in]tsThe time series which contains the timestamps of this property.
[in]useInterval(Optional) When UseInterval is true, the values are associated with each time intervals between two consecutive time entries instead of each individual time entry. As a consequence the dimension of the value array corresponding to the time series is the number of entry in the series minus one.

◆ setTimeSeries()

void resqml2::AbstractProperty::setTimeSeries ( eml2::TimeSeries ts)

Sets the time series associated to the current property

Exceptions
invalid_argumentIf ts is null or if the current property has no time indices.
Parameters
[in]tsThe time series to associate to this property

◆ useInterval()

bool resqml2::AbstractProperty::useInterval ( ) const

Check if the values are given at each time index or between each time index.

◆ validate()

bool resqml2::AbstractProperty::validate ( )

Checks if the associated property kind is allowed for this property.

Returns
True if it is allowed, false if it is not.

◆ validatePropertyKindAssociation() [1/2]

virtual bool resqml2::AbstractProperty::validatePropertyKindAssociation ( eml2::PropertyKind pk)
pure virtual

Checks if it is allowed to associate a given property kind to this property.

Parameters
[in]pkThe local property kind to check.
Returns
True if it is allowed, false if it is not.

Implemented in resqml2_0_1::DiscreteProperty, resqml2_0_1::ContinuousProperty, resqml2_0_1::CommentProperty, resqml2_0_1::CategoricalProperty, resqml2_2::DiscreteProperty, resqml2_2::ContinuousProperty, resqml2_2::CommentProperty, resqml2_2::CategoricalProperty, and resqml2::PointsProperty.

◆ validatePropertyKindAssociation() [2/2]

virtual bool resqml2::AbstractProperty::validatePropertyKindAssociation ( gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind  pk)
pure virtual

Checks if it is allowed to associate a given standard Energistics property kind to this property.

Parameters
pkThe standard Energistics property kind to check.
Returns
True if it is allowed, false if it is not.

Implemented in resqml2_2::DiscreteProperty, resqml2_2::ContinuousProperty, resqml2_2::CommentProperty, resqml2_2::CategoricalProperty, resqml2::PointsProperty, resqml2_0_1::DiscreteProperty, resqml2_0_1::ContinuousProperty, resqml2_0_1::CommentProperty, and resqml2_0_1::CategoricalProperty.


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