Fesapi 2.9.0.1
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Loading...
Searching...
No Matches
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:
resqml2::AbstractValuesProperty resqml2::PointsProperty resqml2::CategoricalProperty resqml2::CommentProperty resqml2::ContinuousProperty

Public Member Functions

virtual ~AbstractProperty ()=default
 
void setRepresentation (AbstractRepresentation *rep)
 
common::DataObjectReference getRepresentationDor () const
 
AbstractRepresentationgetRepresentation () const
 
unsigned int getElementCountPerValue () const
 
gsoap_eml2_3::eml23__IndexableElement getAttachmentKind () const
 
virtual uint64_t getPatchCount () const =0
 
virtual common::AbstractObject::numericalDatatypeEnum getValuesHdfDatatype () const =0
 
uint64_t getValuesCountOfPatch (unsigned int patchIndex) const
 
virtual uint64_t getValuesCountOfDimensionOfPatch (uint64_t dimIndex, uint64_t patchIndex) const =0
 
virtual uint64_t getDimensionsCountOfPatch (uint64_t patchIndex) const =0
 
std::vector< resqml2_0_1 ::PropertySet * > getPropertySets () const
 
uint64_t getPropertySetCount () const
 
resqml2_0_1::PropertySetgetPropertySet (uint64_t 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 (int64_t startRealizationIndex, int64_t countRealizationIndices)
 
void setRealizationIndices (const std::vector< unsigned int > &realizationIndices, eml2 ::AbstractHdfProxy *hdfProxy=nullptr)
 Sets the realization indices of this property.
 
void setTimeSeries (eml2 ::TimeSeries *ts)
 
void setSingleTimestamp (time_t timestamp, LONG64 yearOffset=0)
 
time_t getSingleTimestamp () const
 
eml2::TimeSeriesgetTimeSeries () const
 
common::DataObjectReference getTimeSeriesDor () 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 ()
 

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::eml23__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()

virtual uint64_t resqml2::AbstractProperty::getDimensionsCountOfPatch ( uint64_t patchIndex) const
pure virtual

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.

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

◆ 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 uint64_t 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::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_0_1::PropertySet * resqml2::AbstractProperty::getPropertySet ( uint64_t 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()

uint64_t 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_0_1 ::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. Remark : v2.0.1 is constrained to have a maximum of one realisation 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.

◆ getSingleTimestamp()

time_t resqml2::AbstractProperty::getSingleTimestamp ( ) const

Get a single associated timestamp for this property.

Returns
-1 if there is not a single timestamp related to this property meaning that no timestamp is present or more than one (i.e. a whole time series)

◆ 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()

virtual uint64_t resqml2::AbstractProperty::getValuesCountOfDimensionOfPatch ( uint64_t dimIndex,
uint64_t patchIndex ) const
pure virtual

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.

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

◆ getValuesCountOfPatch()

uint64_t 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()

virtual common::AbstractObject::numericalDatatypeEnum resqml2::AbstractProperty::getValuesHdfDatatype ( ) const
pure virtual

Get the values data type in the HDF dataset

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

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

◆ 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. Remark : 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. Remark : v2.0.1 is constrained to have a maximum of one realisation index
[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 ( int64_t startRealizationIndex,
int64_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.

◆ setSingleTimestamp()

void resqml2::AbstractProperty::setSingleTimestamp ( time_t timestamp,
LONG64 yearOffset = 0 )

Set a single associated timestamp for this property. Must be used with and after setTimeSeries.

Exceptions
invalid_argumentRegarding RESQML2.0.1, this method cannot be called if setTimeSeries has not been called before.
Parameters
[in]timestampThe single timestamps to associate to this property
[in]yearOffsetIndicates that the dateTime attribute must be translated according to this value.

◆ 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::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::PointsProperty.


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