My Project
PropertyKind.h
1 /*-----------------------------------------------------------------------
2 Copyright F2I-CONSULTING, (2014-2017)
3 
4 philippe.verney@f2i-consulting.com
5 
6 This software is a computer program whose purpose is to access to data formatted using Energistics standards.
7 
8 This software is governed by the CeCILL-B license under French law and
9 abiding by the rules of distribution of free software. You can use,
10 modify and/ or redistribute the software under the terms of the CeCILL-B
11 license as circulated by CEA, CNRS and INRIA at the following URL
12 "http://www.cecill.info".
13 
14 As a counterpart to the access to the source code and rights to copy,
15 modify and redistribute granted by the license, users are provided only
16 with a limited warranty and the software's author, the holder of the
17 economic rights, and the successive licensors have only limited
18 liability.
19 
20 In this respect, the user's attention is drawn to the risks associated
21 with loading, using, modifying and/or developing or reproducing the
22 software by the user in light of its specific status of free software,
23 that may mean that it is complicated to manipulate, and that also
24 therefore means that it is reserved for developers and experienced
25 professionals having in-depth computer knowledge. Users are therefore
26 encouraged to load and test the software's suitability as regards their
27 requirements in conditions enabling the security of their systems and/or
28 data to be ensured and, more generally, to use and operate it in the
29 same conditions as regards security.
30 
31 The fact that you are presently reading this means that you have had
32 knowledge of the CeCILL-B license and that you accept its terms.
33 -----------------------------------------------------------------------*/
34 #pragma once
35 
36 #include "resqml2/AbstractProperty.h"
37 
38 namespace resqml2
39 {
40  class DLL_IMPORT_OR_EXPORT PropertyKind : public common::AbstractObject
41  {
42  protected:
43 
48 
52  PropertyKind(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : common::AbstractObject(partialObject) {}
53 
57  PropertyKind(gsoap_resqml2_0_1::_resqml2__PropertyKind* fromGsoap) : common::AbstractObject(fromGsoap) {}
58 
59  public:
60 
64  virtual ~PropertyKind() {}
65 
69  const std::string & getNamingSystem() const;
70 
74  const gsoap_resqml2_0_1::resqml2__ResqmlUom & getUom() const;
75 
79  std::string getUomAsString() const;
80 
84  std::string getParentAsString() const;
85 
89  bool isParentAnEnergisticsPropertyKind() const;
90 
94  gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind getParentEnergisticsPropertyKind() const;
95 
99  gsoap_resqml2_0_1::eml20__DataObjectReference* getParentLocalPropertyKindDor() const;
100 
104  std::string getParentLocalPropertyKindUuid() const;
105 
109  std::string getParentLocalPropertyKindTitle() const;
110 
115  PropertyKind* getParentLocalPropertyKind() const;
116 
117  void setParentPropertyKind(PropertyKind* parentPropertyKind);
118 
119  static const char* XML_TAG;
120  virtual std::string getXmlTag() const {return XML_TAG;}
121 
126  void addProperty(class AbstractProperty* repVal) {propertySet.push_back(repVal);}
127 
131  virtual bool isChildOf(gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind standardPropKind) const = 0;
132 
136  virtual bool isAbstract() const = 0;
137 
138  protected:
139  virtual void setXmlParentPropertyKind(PropertyKind* parentPropertyKind) = 0;
140 
141  std::vector<epc::Relationship> getAllEpcRelationships() const;
142  void importRelationshipSetFromEpc(common::EpcDocument* epcDoc);
143 
144  // XML backward relationship
145  std::vector<class AbstractProperty*> propertySet;
146  std::vector<PropertyKind*> childPropertyKind;
147 
149  };
150 }
151 
virtual ~PropertyKind()
Definition: PropertyKind.h:64
virtual std::string getXmlTag() const
Definition: PropertyKind.h:120
PropertyKind()
Definition: PropertyKind.h:47
Definition: PropertyKind.h:40
Definition: EpcDocument.h:168
Definition: AbstractObject.h:42
void setLocalPropertyKind(class PropertyKind *propKind)
Definition: AbstractProperty.cpp:560
Definition: AbstractHdfProxy.h:43
PropertyKind(gsoap_resqml2_0_1::_resqml2__PropertyKind *fromGsoap)
Definition: PropertyKind.h:57
Definition: AbstractProperty.h:41
Definition: EpcDocument.h:62
PropertyKind(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: PropertyKind.h:52
void addProperty(class AbstractProperty *repVal)
Definition: PropertyKind.h:126