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
TimeSeriesData.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 PRODML2_2_NS
24{
32 class TimeSeriesData : public COMMON_NS::AbstractObject
33 {
34 public:
35
43 DLL_IMPORT_OR_EXPORT TimeSeriesData(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
44
56 TimeSeriesData(COMMON_NS::DataObjectRepository * repo,
57 const std::string & guid,
58 const std::string & title);
59
65 TimeSeriesData(gsoap_eml2_3::prodml22__TimeSeriesData* fromGsoap):AbstractObject(fromGsoap) {}
66
68 ~TimeSeriesData() = default;
69
93 DLL_IMPORT_OR_EXPORT void pushBackKeywordValue(gsoap_eml2_3::prodml22__TimeSeriesKeyword keyword, const std::string & value);
94
103 DLL_IMPORT_OR_EXPORT void setUom(gsoap_resqml2_0_1::resqml20__ResqmlUom uom);
104
110 DLL_IMPORT_OR_EXPORT void setMeasureClass(gsoap_eml2_3::eml23__MeasureClass measureClass);
111
118 DLL_IMPORT_OR_EXPORT void pushBackDoubleValue(double value, time_t timestamp = -1);
119
127 DLL_IMPORT_OR_EXPORT void pushBackDoubleValue(double value, time_t timestamp, gsoap_eml2_3::prodml22__ValueStatus status);
128
135 DLL_IMPORT_OR_EXPORT void pushBackStringValue(const std::string & value, time_t timestamp = -1);
136
142 DLL_IMPORT_OR_EXPORT std::string getUomAsString() const;
143
149 DLL_IMPORT_OR_EXPORT std::string getMeasureClassAsString() const;
150
154 DLL_IMPORT_OR_EXPORT unsigned int getValueCount() const;
155
162 DLL_IMPORT_OR_EXPORT bool isDoubleValue(unsigned int index) const;
163
170 DLL_IMPORT_OR_EXPORT bool isStringValue(unsigned int index) const;
171
178 DLL_IMPORT_OR_EXPORT double getDoubleValue(unsigned int index) const;
179
186 DLL_IMPORT_OR_EXPORT std::string getStringValue(unsigned int index) const;
187
194 DLL_IMPORT_OR_EXPORT time_t getValueTimestamp(unsigned int index) const;
195
202 DLL_IMPORT_OR_EXPORT bool hasValueStatus(unsigned int index) const;
203
210 DLL_IMPORT_OR_EXPORT gsoap_eml2_3::prodml22__ValueStatus getValueStatus(unsigned int index) const;
211
215 DLL_IMPORT_OR_EXPORT unsigned int getKeywordCount() const;
216
223 DLL_IMPORT_OR_EXPORT gsoap_eml2_3::prodml22__TimeSeriesKeyword getKeyword(unsigned int index) const;
224
231 DLL_IMPORT_OR_EXPORT std::string getKeywordValue(unsigned int index) const;
232
238 DLL_IMPORT_OR_EXPORT static constexpr char const* XML_TAG = "TimeSeriesData";
239
245 DLL_IMPORT_OR_EXPORT virtual std::string getXmlTag() const { return XML_TAG; }
246
250 DLL_IMPORT_OR_EXPORT static constexpr char const* XML_NS = "prodml22";
251
255 DLL_IMPORT_OR_EXPORT std::string getXmlNamespace() const final { return XML_NS; }
256
259 };
260}
Definition TimeSeriesData.h:33
unsigned int getKeywordCount() const
TimeSeriesData(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition TimeSeriesData.h:43
double getDoubleValue(unsigned int index) const
void pushBackStringValue(const std::string &value, time_t timestamp=-1)
std::string getUomAsString() const
void pushBackDoubleValue(double value, time_t timestamp=-1)
unsigned int getValueCount() const
void loadTargetRelationships()
Definition TimeSeriesData.h:258
virtual std::string getXmlTag() const
Definition TimeSeriesData.h:245
std::string getXmlNamespace() const final
Definition TimeSeriesData.h:255
std::string getMeasureClassAsString() const
void setUom(gsoap_resqml2_0_1::resqml20__ResqmlUom uom)
std::string getKeywordValue(unsigned int index) const
std::string getStringValue(unsigned int index) const
void pushBackKeywordValue(gsoap_eml2_3::prodml22__TimeSeriesKeyword keyword, const std::string &value)
TimeSeriesData(common::DataObjectRepository *repo, const std::string &guid, const std::string &title)
Creates an instance of this class in a gsoap context.
void pushBackDoubleValue(double value, time_t timestamp, gsoap_eml2_3::prodml22__ValueStatus status)
gsoap_eml2_3::prodml22__ValueStatus getValueStatus(unsigned int index) const
bool isDoubleValue(unsigned int index) const
bool isStringValue(unsigned int index) const
time_t getValueTimestamp(unsigned int index) const
TimeSeriesData(gsoap_eml2_3::prodml22__TimeSeriesData *fromGsoap)
Definition TimeSeriesData.h:65
gsoap_eml2_3::prodml22__TimeSeriesKeyword getKeyword(unsigned int index) const
bool hasValueStatus(unsigned int index) const
void setMeasureClass(gsoap_eml2_3::eml23__MeasureClass measureClass)