My Project
CoreProperty.h
1 /*-----------------------------------------------------------------------
2 Copyright F2I-CONSULTING, (2014-2016)
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 #ifndef CORE_PROPERTY_H
35 #define CORE_PROPERTY_H
36 
37 #include <vector>
38 #include <string>
39 
40 namespace epc
41 {
43  {
44  public:
45 
49  enum TypeProperty {
50  category = 0,
51  contentStatus = 1,
52  created = 2,
53  creator = 3,
54  description = 4,
55  identifier = 5,
56  keywords = 6,
57  language = 7,
58  lastModifiedBy = 8,
59  lastPrinted = 9,
60  modified = 10,
61  revision = 11,
62  subject = 12,
63  title = 13,
64  version = 14,
65  undefinedCoreProperty = 15
66  };
67 
68  CoreProperty();
69  CoreProperty(const TypeProperty & pType);
70  CoreProperty(const TypeProperty & pType, const std::string & pValue);
71  CoreProperty(const TypeProperty & pType, const std::vector<std::string> & pValue);
72  ~CoreProperty() {}
73 
77  bool isEmpty() const;
78 
83 
87  void setTypeProperty(const TypeProperty & corePropertyType);
88 
92  std::vector<std::string> getAllValue() const;
93 
98  std::string getValue(const int & index = 0) const;
99 
103  std::string toString() const;
104 
105  void setCategory(std::string pValue);
106  void setContentStatus(std::string pValue);
107  void setCreated(std::string pValue);
108  void setCreator(std::string pValue);
109  void setDescription(std::string pValue);
110  void setIdentifier(std::string pValue);
111  void setKeywords(std::string pValue);
112  void addKeywords(std::string pValue);
113  void setLanguage(std::string pValue);
114  void setLastModifiedBy(std::string pValue);
115  void setLastPrinted(std::string pValue);
116  void setModified(std::string pValue);
117  void setRevision(std::string pValue);
118  void setSubject(std::string pValue);
119  void setTitle(std::string pValue);
120  void setVersion(std::string pValue);
121 
122  private:
123  TypeProperty type;
124  std::vector<std::string> value;
125  };
126 }
127 
128 #endif
TypeProperty getTypeProperty() const
Definition: CoreProperty.cpp:67
Definition: CoreProperty.h:42
std::vector< std::string > getAllValue() const
Definition: CoreProperty.cpp:77
bool isEmpty() const
Definition: CoreProperty.cpp:62
TypeProperty
Definition: CoreProperty.h:49
Definition: ContentType.h:39
std::string getValue(const int &index=0) const
Definition: CoreProperty.cpp:82
std::string toString() const
Definition: CoreProperty.cpp:87
void setTypeProperty(const TypeProperty &corePropertyType)
Definition: CoreProperty.cpp:72