Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
AbstractProperty.h
1 /*-----------------------------------------------------------------------
2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements. See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership. The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"; you may not use this file except in compliance
8 with the License. You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied. See the License for the
16 specific language governing permissions and limitations
17 under the License.
18 -----------------------------------------------------------------------*/
19 #pragma once
20 
21 #include "../common/AbstractObject.h"
22 
23 namespace EML2_NS
24 {
25  class AbstractHdfProxy;
26  class PropertyKind;
27  class TimeSeries;
28 }
29 
30 namespace 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::resqml22__IndexableElement getAttachmentKind() const;
84 
94  DLL_IMPORT_OR_EXPORT virtual unsigned int getPatchCount() const = 0;
95 
101  DLL_IMPORT_OR_EXPORT COMMON_NS::AbstractObject::hdfDatatypeEnum getValuesHdfDatatype() const;
102 
113  DLL_IMPORT_OR_EXPORT unsigned int getValuesCountOfPatch(unsigned int patchIndex) const;
114 
127  DLL_IMPORT_OR_EXPORT unsigned int getValuesCountOfDimensionOfPatch(unsigned int dimIndex, unsigned int patchIndex) const;
128 
138  DLL_IMPORT_OR_EXPORT unsigned int getDimensionsCountOfPatch(unsigned int patchIndex) const;
139 
140  //*********************************************
141  //************* PROPERTY SET ******************
142  //*********************************************
143 
149  DLL_IMPORT_OR_EXPORT std::vector<RESQML2_NS::PropertySet *> getPropertySets() const;
150 
159  DLL_IMPORT_OR_EXPORT unsigned int getPropertySetCount() const;
160 
170  DLL_IMPORT_OR_EXPORT RESQML2_NS::PropertySet * getPropertySet(unsigned int 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 
224  DLL_IMPORT_OR_EXPORT std::vector<unsigned int> getRealizationIndices() const;
225 
232  DLL_IMPORT_OR_EXPORT void setRealizationIndices(uint64_t startRealizationIndex, uint64_t countRealizationIndices);
233 
249  DLL_IMPORT_OR_EXPORT void setRealizationIndices(const std::vector<unsigned int> & realizationIndices, EML2_NS::AbstractHdfProxy* hdfProxy = nullptr);
250 
251  //*********************************************
252  //************ TIME DIMENSION *****************
253  //*********************************************
254 
263  DLL_IMPORT_OR_EXPORT void setTimeSeries(EML2_NS::TimeSeries * ts);
264 
271  DLL_IMPORT_OR_EXPORT EML2_NS::TimeSeries* getTimeSeries() const;
272 
279  DLL_IMPORT_OR_EXPORT COMMON_NS::DataObjectReference getTimeSeriesDor() const;
280 
296  DLL_IMPORT_OR_EXPORT void setTimeIndices(uint64_t startTimeIndex, uint64_t countTimeIndices, EML2_NS::TimeSeries* ts, bool useInterval = false);
297 
305  DLL_IMPORT_OR_EXPORT unsigned int getTimeIndexStart() const;
306 
312  DLL_IMPORT_OR_EXPORT unsigned int getTimeIndicesCount() const;
313 
317  DLL_IMPORT_OR_EXPORT bool useInterval() const;
318 
319  //*********************************************
320  //****** PROP KIND ****************************
321  //*********************************************
322 
329  DLL_IMPORT_OR_EXPORT bool isAssociatedToOneStandardEnergisticsPropertyKind() const;
330 
339  DLL_IMPORT_OR_EXPORT std::string getPropertyKindDescription() const;
340 
346  DLL_IMPORT_OR_EXPORT std::string getPropertyKindAsString() const;
347 
356  DLL_IMPORT_OR_EXPORT std::string getPropertyKindParentAsString() const;
357 
365  DLL_IMPORT_OR_EXPORT void setPropertyKind(EML2_NS::PropertyKind* propKind);
366 
375  COMMON_NS::DataObjectReference getPropertyKindDor() const;
376 
384  DLL_IMPORT_OR_EXPORT EML2_NS::PropertyKind* getPropertyKind() const;
385 
393  virtual bool validatePropertyKindAssociation(EML2_NS::PropertyKind* pk) = 0;
394 
402  virtual bool validatePropertyKindAssociation(gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind pk) = 0;
403 
409  bool validate();
410 
411  protected:
412 
418  DLL_IMPORT_OR_EXPORT AbstractProperty(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
419 
421  AbstractProperty() {}
422 
428  AbstractProperty(gsoap_resqml2_0_1::resqml20__AbstractProperty* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
429  AbstractProperty(gsoap_eml2_3::resqml22__AbstractProperty* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
430 
432  virtual void loadTargetRelationships();
433 
442  DLL_IMPORT_OR_EXPORT gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind getEnergisticsPropertyKind201() const;
443 
455  virtual EML2_NS::AbstractHdfProxy* getDatasetOfPatch(unsigned int patchIndex, int64_t & nullValue, std::string & dsPath) const = 0;
456 
466  virtual COMMON_NS::DataObjectReference getHdfProxyDor(unsigned int patchIndex) const = 0;
467  };
468 }
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
unsigned int getDimensionsCountOfPatch(unsigned int patchIndex) const
unsigned int getTimeIndicesCount() const
std::string getPropertyKindDescription() const
resqml2::PropertySet * getPropertySet(unsigned int index) const
bool isAssociatedToOneStandardEnergisticsPropertyKind() const
common::AbstractObject::hdfDatatypeEnum getValuesHdfDatatype() const
virtual unsigned int getPatchCount() const =0
unsigned int getValuesCountOfDimensionOfPatch(unsigned int dimIndex, unsigned int patchIndex) const
unsigned int getValuesCountOfPatch(unsigned int patchIndex) const
void setRealizationIndices(uint64_t startRealizationIndex, uint64_t countRealizationIndices)
eml2::TimeSeries * getTimeSeries() const
common::DataObjectReference getPropertyKindDor() const
bool hasRealizationIndices() const
unsigned int getTimeIndexStart() const
eml2::PropertyKind * getPropertyKind() const
virtual bool validatePropertyKindAssociation(eml2::PropertyKind *pk)=0
void setTimeSeries(eml2::TimeSeries *ts)
void setRepresentation(AbstractRepresentation *rep)
virtual bool validatePropertyKindAssociation(gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind pk)=0
unsigned int getPropertySetCount() const
std::vector< resqml2::PropertySet * > getPropertySets() const
std::string getPropertyKindParentAsString() 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.
std::vector< unsigned int > getRealizationIndices() const
unsigned int getElementCountPerValue() const
gsoap_eml2_3::resqml22__IndexableElement getAttachmentKind() const
void setLocalCrs(class AbstractLocal3dCrs *crs)
virtual ~AbstractProperty()=default
common::DataObjectReference getRepresentationDor() const
class AbstractLocal3dCrs * getLocalCrs() const
common::DataObjectReference getTimeSeriesDor() const
void setPropertyKind(eml2::PropertyKind *propKind)
std::string getPropertyKindAsString() const
common::DataObjectReference getLocalCrsDor() const
AbstractRepresentation * getRepresentation() const
void setRealizationIndices(const std::vector< unsigned int > &realizationIndices, eml2::AbstractHdfProxy *hdfProxy=nullptr)
Sets the realization indices of this property.
Proxy class for an abstract representation.
Definition: AbstractRepresentation.h:32