My Project
EpcExternalPartReference.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 "common/AbstractObject.h"
37 
38 namespace resqml2{
39  class AbstractRepresentation;
40  class AbstractProperty;
41 }
42 
43 namespace prodml2_0 {
44  class DasAcquisition;
45 }
46 
47 namespace common
48 {
49  class DLL_IMPORT_OR_EXPORT EpcExternalPartReference : public common::AbstractObject
50  {
51  public:
56  EpcExternalPartReference(const std::string & packageDirAbsolutePath, const std::string & externalFilePath);
57 
61  EpcExternalPartReference(gsoap_resqml2_0_1::_eml20__EpcExternalPartReference* fromGsoap, const std::string & packageDirAbsolutePath, const std::string & externalFilePath):
62  common::AbstractObject(fromGsoap), packageDirectoryAbsolutePath(packageDirAbsolutePath), relativeFilePath(externalFilePath) {}
63 
67  EpcExternalPartReference(gsoap_eml2_1::_eml21__EpcExternalPartReference* fromGsoap, const std::string & packageDirAbsolutePath, const std::string & externalFilePath) :
68  common::AbstractObject(fromGsoap), packageDirectoryAbsolutePath(packageDirAbsolutePath), relativeFilePath(externalFilePath) {}
69 
74 
78  std::string getRelativePath() const { return relativeFilePath; }
79 
80  static const char* XML_TAG;
81  virtual std::string getXmlTag() const;
82 
83  protected:
84 
85  std::vector<epc::Relationship> getAllEpcRelationships() const;
90 
91  std::vector<resqml2::AbstractRepresentation*> representationSourceObject;
92  std::vector<resqml2::AbstractProperty*> propertySourceObject;
93  std::vector<prodml2_0::DasAcquisition*> dasAcquisitionSourceObject;
95  std::string relativeFilePath;
96  };
97 }
Definition: EpcDocument.h:152
std::vector< resqml2::AbstractProperty * > propertySourceObject
All the representations that use this external reference.
Definition: EpcExternalPartReference.h:92
std::string getRelativePath() const
Definition: EpcExternalPartReference.h:78
EpcExternalPartReference(gsoap_resqml2_0_1::_eml20__EpcExternalPartReference *fromGsoap, const std::string &packageDirAbsolutePath, const std::string &externalFilePath)
Definition: EpcExternalPartReference.h:61
EpcExternalPartReference(gsoap_eml2_1::_eml21__EpcExternalPartReference *fromGsoap, const std::string &packageDirAbsolutePath, const std::string &externalFilePath)
Definition: EpcExternalPartReference.h:67
Definition: EpcDocument.h:168
Definition: AbstractObject.h:42
std::string packageDirectoryAbsolutePath
All the DAS acquisition that use this external reference.
Definition: EpcExternalPartReference.h:94
Definition: AbstractHdfProxy.h:43
void importRelationshipSetFromEpc(common::EpcDocument *epcDoc)
Definition: EpcExternalPartReference.h:89
Definition: EpcExternalPartReference.h:49
std::vector< prodml2_0::DasAcquisition * > dasAcquisitionSourceObject
All the properties that use this external reference.
Definition: EpcExternalPartReference.h:93
Definition: EpcDocument.h:62
~EpcExternalPartReference()
Definition: EpcExternalPartReference.h:73
std::string relativeFilePath
The directory where the EPC document is stored.
Definition: EpcExternalPartReference.h:95