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
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 PropertyKind;
27 class TimeSeries;
28}
29
30namespace RESQML2_NS
31{
32 class AbstractRepresentation;
33
35 class AbstractProperty: public COMMON_NS::AbstractObject
36 {
37 public:
38
40 virtual ~AbstractProperty() = default;
41
49 DLL_IMPORT_OR_EXPORT void setRepresentation(AbstractRepresentation * rep);
50
59 DLL_IMPORT_OR_EXPORT COMMON_NS::DataObjectReference getRepresentationDor() const;
60
67 DLL_IMPORT_OR_EXPORT AbstractRepresentation* getRepresentation() const;
68
76 DLL_IMPORT_OR_EXPORT unsigned int getElementCountPerValue() const;
77
83 DLL_IMPORT_OR_EXPORT gsoap_eml2_3::eml23__IndexableElement getAttachmentKind() const;
84
94 DLL_IMPORT_OR_EXPORT virtual uint64_t getPatchCount() const = 0;
95
101 DLL_IMPORT_OR_EXPORT virtual COMMON_NS::AbstractObject::numericalDatatypeEnum getValuesHdfDatatype() const = 0;
102
113 DLL_IMPORT_OR_EXPORT uint64_t getValuesCountOfPatch(unsigned int patchIndex) const;
114
127 DLL_IMPORT_OR_EXPORT virtual uint64_t getValuesCountOfDimensionOfPatch(uint64_t dimIndex, uint64_t patchIndex) const = 0;
128
138 DLL_IMPORT_OR_EXPORT virtual uint64_t getDimensionsCountOfPatch(uint64_t patchIndex) const = 0;
139
140 //*********************************************
141 //************* PROPERTY SET ******************
142 //*********************************************
143
149 DLL_IMPORT_OR_EXPORT std::vector<RESQML2_0_1_NS::PropertySet *> getPropertySets() const;
150
159 DLL_IMPORT_OR_EXPORT uint64_t getPropertySetCount() const;
160
170 DLL_IMPORT_OR_EXPORT RESQML2_0_1_NS::PropertySet * getPropertySet(uint64_t index) const;
171
172 //*********************************************
173 //****************** CRS **********************
174 //*********************************************
175
184 DLL_IMPORT_OR_EXPORT void setLocalCrs(class AbstractLocal3dCrs * crs);
185
192 DLL_IMPORT_OR_EXPORT class AbstractLocal3dCrs* getLocalCrs() const;
193
200 DLL_IMPORT_OR_EXPORT COMMON_NS::DataObjectReference getLocalCrsDor() const;
201
202 //*********************************************
203 //********** REALIZATION DIMENSION ************
204 //*********************************************
205
213 DLL_IMPORT_OR_EXPORT bool hasRealizationIndices() const;
214
225 DLL_IMPORT_OR_EXPORT std::vector<unsigned int> getRealizationIndices() const;
226
233 DLL_IMPORT_OR_EXPORT void setRealizationIndices(int64_t startRealizationIndex, int64_t countRealizationIndices);
234
251 DLL_IMPORT_OR_EXPORT void setRealizationIndices(const std::vector<unsigned int> & realizationIndices, EML2_NS::AbstractHdfProxy* hdfProxy = nullptr);
252
253 //*********************************************
254 //************ TIME DIMENSION *****************
255 //*********************************************
256
265 DLL_IMPORT_OR_EXPORT void setTimeSeries(EML2_NS::TimeSeries * ts);
266
276 DLL_IMPORT_OR_EXPORT void setSingleTimestamp(time_t timestamp, LONG64 yearOffset = 0);
277
283 DLL_IMPORT_OR_EXPORT time_t getSingleTimestamp() const;
284
291 DLL_IMPORT_OR_EXPORT EML2_NS::TimeSeries* getTimeSeries() const;
292
299 DLL_IMPORT_OR_EXPORT COMMON_NS::DataObjectReference getTimeSeriesDor() const;
300
304 DLL_IMPORT_OR_EXPORT bool useInterval() const;
305
306 //*********************************************
307 //****** PROP KIND ****************************
308 //*********************************************
309
316 DLL_IMPORT_OR_EXPORT bool isAssociatedToOneStandardEnergisticsPropertyKind() const;
317
326 DLL_IMPORT_OR_EXPORT std::string getPropertyKindDescription() const;
327
333 DLL_IMPORT_OR_EXPORT std::string getPropertyKindAsString() const;
334
343 DLL_IMPORT_OR_EXPORT std::string getPropertyKindParentAsString() const;
344
352 DLL_IMPORT_OR_EXPORT void setPropertyKind(EML2_NS::PropertyKind* propKind);
353
362 COMMON_NS::DataObjectReference getPropertyKindDor() const;
363
371 DLL_IMPORT_OR_EXPORT EML2_NS::PropertyKind* getPropertyKind() const;
372
380 virtual bool validatePropertyKindAssociation(EML2_NS::PropertyKind* pk) = 0;
381
389 virtual bool validatePropertyKindAssociation(gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind pk) = 0;
390
396 bool validate();
397
398 protected:
399
405 DLL_IMPORT_OR_EXPORT AbstractProperty(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
406
409
415 AbstractProperty(gsoap_resqml2_0_1::resqml20__AbstractProperty* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
416 AbstractProperty(gsoap_eml2_3::resqml22__AbstractProperty* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
417
419 virtual void loadTargetRelationships() override;
420
429 DLL_IMPORT_OR_EXPORT gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind getEnergisticsPropertyKind201() const;
430
442 virtual EML2_NS::AbstractHdfProxy* getDatasetOfPatch(uint64_t patchIndex, int64_t & nullValue, std::string & dsPath) const = 0;
443
453 virtual COMMON_NS::DataObjectReference getHdfProxyDor(uint64_t patchIndex) const = 0;
454 };
455}
Proxy class for an abstract local 3D coordinate reference system (CRS).
Definition AbstractLocal3dCrs.h:27
Proxy class for an abstract property.
Definition AbstractProperty.h:36
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
void setTimeSeries(eml2 ::TimeSeries *ts)
bool hasRealizationIndices() const
uint64_t getValuesCountOfPatch(unsigned int patchIndex) const
void setRealizationIndices(const std::vector< unsigned int > &realizationIndices, eml2 ::AbstractHdfProxy *hdfProxy=nullptr)
Sets the realization indices of this property.
gsoap_eml2_3::eml23__IndexableElement getAttachmentKind() const
void setRepresentation(AbstractRepresentation *rep)
virtual bool validatePropertyKindAssociation(gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind pk)=0
std::string getPropertyKindParentAsString() const
virtual uint64_t getValuesCountOfDimensionOfPatch(uint64_t dimIndex, uint64_t patchIndex) const =0
unsigned int getElementCountPerValue() const
void setLocalCrs(class AbstractLocal3dCrs *crs)
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
void setPropertyKind(eml2 ::PropertyKind *propKind)
common::DataObjectReference getTimeSeriesDor() const
std::string getPropertyKindAsString() const
virtual bool validatePropertyKindAssociation(eml2 ::PropertyKind *pk)=0
void setSingleTimestamp(time_t timestamp, LONG64 yearOffset=0)
common::DataObjectReference getLocalCrsDor() const
class AbstractLocal3dCrs * getLocalCrs() const
resqml2_0_1::PropertySet * getPropertySet(uint64_t index) const
virtual common::AbstractObject::numericalDatatypeEnum getValuesHdfDatatype() const =0
eml2::TimeSeries * getTimeSeries() const
std::vector< resqml2_0_1 ::PropertySet * > getPropertySets() const
Proxy class for an abstract representation.
Definition AbstractRepresentation.h:37