Fesapi 2.10.1.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Loading...
Searching...
No Matches
AbstractProperty.h
1/*-----------------------------------------------------------------------
2Licensed to the Apache Software Foundation (ASF) under one
3or more contributor license agreements. See the NOTICE file
4distributed with this work for additional information
5regarding copyright ownership. The ASF licenses this file
6to you under the Apache License, Version 2.0 (the
7"License"; you may not use this file except in compliance
8with the License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12Unless required by applicable law or agreed to in writing,
13software distributed under the License is distributed on an
14"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15KIND, either express or implied. See the License for the
16specific language governing permissions and limitations
17under the License.
18-----------------------------------------------------------------------*/
19#pragma once
20
21#include "../common/AbstractObject.h"
22
23namespace EML2_NS
24{
25 class AbstractHdfProxy;
26 class AbstractLocal3dCrs;
27 class PropertyKind;
28 class TimeSeries;
29}
30
31namespace RESQML2_NS
32{
33 class AbstractRepresentation;
34
36 class AbstractProperty: public COMMON_NS::AbstractObject
37 {
38 public:
39
41 virtual ~AbstractProperty() = default;
42
50 DLL_IMPORT_OR_EXPORT void setRepresentation(AbstractRepresentation * rep);
51
60 DLL_IMPORT_OR_EXPORT COMMON_NS::DataObjectReference getRepresentationDor() const;
61
68 DLL_IMPORT_OR_EXPORT AbstractRepresentation* getRepresentation() const;
69
77 DLL_IMPORT_OR_EXPORT unsigned int getElementCountPerValue() const;
78
84 DLL_IMPORT_OR_EXPORT gsoap_eml2_3::eml23__IndexableElement getAttachmentKind() const;
85
95 DLL_IMPORT_OR_EXPORT virtual uint64_t getPatchCount() const = 0;
96
102 DLL_IMPORT_OR_EXPORT virtual COMMON_NS::AbstractObject::numericalDatatypeEnum getValuesHdfDatatype() const = 0;
103
114 DLL_IMPORT_OR_EXPORT uint64_t getValuesCountOfPatch(unsigned int patchIndex) const;
115
128 DLL_IMPORT_OR_EXPORT virtual uint64_t getValuesCountOfDimensionOfPatch(uint64_t dimIndex, uint64_t patchIndex) const = 0;
129
139 DLL_IMPORT_OR_EXPORT virtual uint64_t getDimensionsCountOfPatch(uint64_t patchIndex) const = 0;
140
141 //*********************************************
142 //************* PROPERTY SET ******************
143 //*********************************************
144
150 DLL_IMPORT_OR_EXPORT std::vector<RESQML2_0_1_NS::PropertySet *> getPropertySets() const;
151
160 DLL_IMPORT_OR_EXPORT uint64_t getPropertySetCount() const;
161
171 DLL_IMPORT_OR_EXPORT RESQML2_0_1_NS::PropertySet * getPropertySet(uint64_t index) const;
172
173 //*********************************************
174 //****************** CRS **********************
175 //*********************************************
176
185 DLL_IMPORT_OR_EXPORT void setLocalCrs(EML2_NS::AbstractLocal3dCrs* crs);
186
193 DLL_IMPORT_OR_EXPORT EML2_NS::AbstractLocal3dCrs* getLocalCrs() const;
194
201 DLL_IMPORT_OR_EXPORT COMMON_NS::DataObjectReference getLocalCrsDor() const;
202
203 //*********************************************
204 //********** REALIZATION DIMENSION ************
205 //*********************************************
206
214 DLL_IMPORT_OR_EXPORT bool hasRealizationIndices() const;
215
226 DLL_IMPORT_OR_EXPORT std::vector<unsigned int> getRealizationIndices() const;
227
234 DLL_IMPORT_OR_EXPORT void setRealizationIndices(int64_t startRealizationIndex, int64_t countRealizationIndices);
235
252 DLL_IMPORT_OR_EXPORT void setRealizationIndices(const std::vector<unsigned int> & realizationIndices, EML2_NS::AbstractHdfProxy* hdfProxy = nullptr);
253
254 //*********************************************
255 //************ TIME DIMENSION *****************
256 //*********************************************
257
266 DLL_IMPORT_OR_EXPORT void setTimeSeries(EML2_NS::TimeSeries * ts);
267
277 DLL_IMPORT_OR_EXPORT void setSingleTimestamp(time_t timestamp, LONG64 yearOffset = 0);
278
284 DLL_IMPORT_OR_EXPORT time_t getSingleTimestamp() const;
285
292 DLL_IMPORT_OR_EXPORT EML2_NS::TimeSeries* getTimeSeries() const;
293
300 DLL_IMPORT_OR_EXPORT COMMON_NS::DataObjectReference getTimeSeriesDor() const;
301
305 DLL_IMPORT_OR_EXPORT bool useInterval() const;
306
307 //*********************************************
308 //****** PROP KIND ****************************
309 //*********************************************
310
317 DLL_IMPORT_OR_EXPORT bool isAssociatedToOneStandardEnergisticsPropertyKind() const;
318
327 DLL_IMPORT_OR_EXPORT std::string getPropertyKindDescription() const;
328
334 DLL_IMPORT_OR_EXPORT std::string getPropertyKindAsString() const;
335
344 DLL_IMPORT_OR_EXPORT std::string getPropertyKindParentAsString() const;
345
353 DLL_IMPORT_OR_EXPORT void setPropertyKind(EML2_NS::PropertyKind* propKind);
354
363 COMMON_NS::DataObjectReference getPropertyKindDor() const;
364
372 DLL_IMPORT_OR_EXPORT EML2_NS::PropertyKind* getPropertyKind() const;
373
381 virtual bool validatePropertyKindAssociation(EML2_NS::PropertyKind* pk) = 0;
382
390 virtual bool validatePropertyKindAssociation(gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind pk) = 0;
391
397 bool validate();
398
399 protected:
400
406 DLL_IMPORT_OR_EXPORT AbstractProperty(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
407
410
416 AbstractProperty(gsoap_resqml2_0_1::resqml20__AbstractProperty* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
417 AbstractProperty(gsoap_eml2_3::resqml22__AbstractProperty* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
418
420 virtual void loadTargetRelationships() override;
421
430 DLL_IMPORT_OR_EXPORT gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind getEnergisticsPropertyKind201() const;
431
443 virtual EML2_NS::AbstractHdfProxy* getDatasetOfPatch(uint64_t patchIndex, int64_t & nullValue, std::string & dsPath) const = 0;
444
454 virtual COMMON_NS::DataObjectReference getHdfProxyDor(uint64_t patchIndex) const = 0;
455 };
456}
Proxy class for an abstract property.
Definition AbstractProperty.h:37
std::string getPropertyKindDescription() const
bool isAssociatedToOneStandardEnergisticsPropertyKind() const
eml2::PropertyKind * getPropertyKind() const
void setRealizationIndices(int64_t startRealizationIndex, int64_t countRealizationIndices)
time_t getSingleTimestamp() const
AbstractRepresentation * getRepresentation() const
uint64_t getPropertySetCount() const
common::DataObjectReference getPropertyKindDor() const
bool hasRealizationIndices() const
uint64_t getValuesCountOfPatch(unsigned int patchIndex) const
eml2::AbstractLocal3dCrs * getLocalCrs() const
virtual bool validatePropertyKindAssociation(eml2::PropertyKind *pk)=0
gsoap_eml2_3::eml23__IndexableElement getAttachmentKind() const
void setTimeSeries(eml2::TimeSeries *ts)
void setRepresentation(AbstractRepresentation *rep)
virtual bool validatePropertyKindAssociation(gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind pk)=0
std::string getPropertyKindParentAsString() const
std::vector< resqml2_0_1::PropertySet * > getPropertySets() const
virtual uint64_t getValuesCountOfDimensionOfPatch(uint64_t dimIndex, uint64_t patchIndex) const =0
unsigned int getElementCountPerValue() const
std::vector< unsigned int > getRealizationIndices() const
virtual uint64_t getDimensionsCountOfPatch(uint64_t patchIndex) const =0
virtual ~AbstractProperty()=default
common::DataObjectReference getRepresentationDor() const
virtual uint64_t getPatchCount() const =0
common::DataObjectReference getTimeSeriesDor() const
void setPropertyKind(eml2::PropertyKind *propKind)
std::string getPropertyKindAsString() const
void setSingleTimestamp(time_t timestamp, LONG64 yearOffset=0)
common::DataObjectReference getLocalCrsDor() const
void setLocalCrs(eml2::AbstractLocal3dCrs *crs)
resqml2_0_1::PropertySet * getPropertySet(uint64_t index) const
virtual common::AbstractObject::numericalDatatypeEnum getValuesHdfDatatype() const =0
void setRealizationIndices(const std::vector< unsigned int > &realizationIndices, eml2::AbstractHdfProxy *hdfProxy=nullptr)
Sets the realization indices of this property.
eml2::TimeSeries * getTimeSeries() const
Proxy class for an abstract representation.
Definition AbstractRepresentation.h:38