Fesapi 2.13.0.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 uint64_t 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
109 DLL_IMPORT_OR_EXPORT virtual std::vector<uint32_t> getValuesCountPerDimensionOfPatch(uint64_t patchIndex) const = 0;
110
121 DLL_IMPORT_OR_EXPORT uint64_t getValuesCountOfPatch(uint64_t patchIndex) const;
122
135 DLL_IMPORT_OR_EXPORT uint64_t getValuesCountOfDimensionOfPatch(uint64_t dimIndex, uint64_t patchIndex) const;
136
146 DLL_IMPORT_OR_EXPORT uint64_t getDimensionsCountOfPatch(uint64_t patchIndex) const;
147
148 //*********************************************
149 //************* PROPERTY SET ******************
150 //*********************************************
151
157 DLL_IMPORT_OR_EXPORT std::vector<RESQML2_0_1_NS::PropertySet *> getPropertySets() const;
158
167 DLL_IMPORT_OR_EXPORT uint64_t getPropertySetCount() const;
168
178 DLL_IMPORT_OR_EXPORT RESQML2_0_1_NS::PropertySet * getPropertySet(uint64_t index) const;
179
180 //*********************************************
181 //****************** CRS **********************
182 //*********************************************
183
192 DLL_IMPORT_OR_EXPORT void setLocalCrs(EML2_NS::AbstractLocal3dCrs* crs);
193
200 DLL_IMPORT_OR_EXPORT EML2_NS::AbstractLocal3dCrs* getLocalCrs() const;
201
208 DLL_IMPORT_OR_EXPORT COMMON_NS::DataObjectReference getLocalCrsDor() const;
209
210 //*********************************************
211 //********** REALIZATION DIMENSION ************
212 //*********************************************
213
221 DLL_IMPORT_OR_EXPORT bool hasRealizationIndices() const;
222
233 DLL_IMPORT_OR_EXPORT std::vector<unsigned int> getRealizationIndices() const;
234
241 DLL_IMPORT_OR_EXPORT void setRealizationIndices(int64_t startRealizationIndex, int64_t countRealizationIndices);
242
259 DLL_IMPORT_OR_EXPORT void setRealizationIndices(const std::vector<unsigned int> & realizationIndices, EML2_NS::AbstractHdfProxy* hdfProxy = nullptr);
260
261 //*********************************************
262 //************ TIME DIMENSION *****************
263 //*********************************************
264
273 DLL_IMPORT_OR_EXPORT void setTimeSeries(EML2_NS::TimeSeries * ts);
274
284 DLL_IMPORT_OR_EXPORT void setSingleTimestamp(time_t timestamp, LONG64 yearOffset = 0);
285
291 DLL_IMPORT_OR_EXPORT time_t getSingleTimestamp() const;
292
299 DLL_IMPORT_OR_EXPORT EML2_NS::TimeSeries* getTimeSeries() const;
300
307 DLL_IMPORT_OR_EXPORT COMMON_NS::DataObjectReference getTimeSeriesDor() const;
308
312 DLL_IMPORT_OR_EXPORT bool useInterval() const;
313
314 //*********************************************
315 //****** PROP KIND ****************************
316 //*********************************************
317
324 DLL_IMPORT_OR_EXPORT bool isAssociatedToOneStandardEnergisticsPropertyKind() const;
325
334 DLL_IMPORT_OR_EXPORT std::string getPropertyKindDescription() const;
335
341 DLL_IMPORT_OR_EXPORT std::string getPropertyKindAsString() const;
342
351 DLL_IMPORT_OR_EXPORT std::string getPropertyKindParentAsString() const;
352
360 DLL_IMPORT_OR_EXPORT void setPropertyKind(EML2_NS::PropertyKind* propKind);
361
370 COMMON_NS::DataObjectReference getPropertyKindDor() const;
371
379 DLL_IMPORT_OR_EXPORT EML2_NS::PropertyKind* getPropertyKind() const;
380
388 virtual bool validatePropertyKindAssociation(EML2_NS::PropertyKind* pk) = 0;
389
397 virtual bool validatePropertyKindAssociation(gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind pk) = 0;
398
404 bool validate();
405
406 protected:
407
413 DLL_IMPORT_OR_EXPORT AbstractProperty(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
414
417
423 AbstractProperty(gsoap_resqml2_0_1::resqml20__AbstractProperty* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
424 AbstractProperty(gsoap_eml2_3::resqml22__AbstractProperty* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
425
427 virtual void loadTargetRelationships() override;
428
437 DLL_IMPORT_OR_EXPORT gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind getEnergisticsPropertyKind201() const;
438
450 virtual EML2_NS::AbstractHdfProxy* getDatasetOfPatch(uint64_t patchIndex, int64_t & nullValue, std::string & dsPath) const = 0;
451
461 virtual COMMON_NS::DataObjectReference getHdfProxyDor(uint64_t patchIndex) const = 0;
462 };
463}
Proxy class for an abstract property.
Definition AbstractProperty.h:37
std::string getPropertyKindDescription() const
bool isAssociatedToOneStandardEnergisticsPropertyKind() const
eml2::PropertyKind * getPropertyKind() const
uint64_t getDimensionsCountOfPatch(uint64_t patchIndex) const
uint64_t getValuesCountOfPatch(uint64_t patchIndex) const
void setRealizationIndices(int64_t startRealizationIndex, int64_t countRealizationIndices)
time_t getSingleTimestamp() const
AbstractRepresentation * getRepresentation() const
uint64_t getElementCountPerValue() const
uint64_t getPropertySetCount() const
common::DataObjectReference getPropertyKindDor() const
bool hasRealizationIndices() 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
virtual std::vector< uint32_t > getValuesCountPerDimensionOfPatch(uint64_t patchIndex) const =0
std::vector< resqml2_0_1::PropertySet * > getPropertySets() const
std::vector< unsigned int > getRealizationIndices() const
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
uint64_t getValuesCountOfDimensionOfPatch(uint64_t dimIndex, uint64_t patchIndex) const
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