Fesapi  0.13.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
EpcExternalPartReference.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 RESQML2_NS{
24  class AbstractRepresentation;
25  class AbstractProperty;
26 }
27 
28 namespace PRODML2_0_NS {
29  class DasAcquisition;
30 }
31 
32 namespace COMMON_NS
33 {
34  class DLL_IMPORT_OR_EXPORT EpcExternalPartReference : public COMMON_NS::AbstractObject
35  {
36  public:
41  EpcExternalPartReference(const std::string & packageDirAbsolutePath, const std::string & externalFilePath);
42 
46  EpcExternalPartReference(gsoap_resqml2_0_1::_eml20__EpcExternalPartReference* fromGsoap, const std::string & packageDirAbsolutePath, const std::string & externalFilePath):
47  COMMON_NS::AbstractObject(fromGsoap), packageDirectoryAbsolutePath(packageDirAbsolutePath), relativeFilePath(externalFilePath) {}
48 
52  EpcExternalPartReference(gsoap_eml2_1::_eml21__EpcExternalPartReference* fromGsoap, const std::string & packageDirAbsolutePath, const std::string & externalFilePath) :
53  COMMON_NS::AbstractObject(fromGsoap), packageDirectoryAbsolutePath(packageDirAbsolutePath), relativeFilePath(externalFilePath) {}
54 
59 
63  std::string getRelativePath() const { return relativeFilePath; }
64 
65  static const char* XML_TAG;
66  virtual std::string getXmlTag() const;
67 
68  protected:
69 
70  std::vector<epc::Relationship> getAllEpcRelationships() const;
75 
76  std::vector<RESQML2_NS::AbstractRepresentation*> representationSourceObject;
77  std::vector<RESQML2_NS::AbstractProperty*> propertySourceObject;
78  std::vector<PRODML2_0_NS::DasAcquisition*> dasAcquisitionSourceObject;
80  std::string relativeFilePath;
81  };
82 }
83 
~EpcExternalPartReference()
Definition: EpcExternalPartReference.h:58
std::vector< RESQML2_NS::AbstractProperty * > propertySourceObject
All the representations that use this external reference.
Definition: EpcExternalPartReference.h:77
std::string packageDirectoryAbsolutePath
All the DAS acquisition that use this external reference.
Definition: EpcExternalPartReference.h:79
std::string getRelativePath() const
Definition: EpcExternalPartReference.h:63
Definition: EpcDocument.h:138
EpcExternalPartReference(gsoap_eml2_1::_eml21__EpcExternalPartReference *fromGsoap, const std::string &packageDirAbsolutePath, const std::string &externalFilePath)
Definition: EpcExternalPartReference.h:52
Definition: EpcExternalPartReference.h:34
Definition: EpcDocument.h:154
Definition: AbstractObject.h:27
void importRelationshipSetFromEpc(COMMON_NS::EpcDocument *epcDoc)
Definition: EpcExternalPartReference.h:74
std::vector< PRODML2_0_NS::DasAcquisition * > dasAcquisitionSourceObject
All the properties that use this external reference.
Definition: EpcExternalPartReference.h:78
std::string relativeFilePath
The directory where the EPC document is stored.
Definition: EpcExternalPartReference.h:80
Definition: AbstractHdfProxy.h:28
EpcExternalPartReference(gsoap_resqml2_0_1::_eml20__EpcExternalPartReference *fromGsoap, const std::string &packageDirAbsolutePath, const std::string &externalFilePath)
Definition: EpcExternalPartReference.h:46
Definition: EpcDocument.h:49