Fesapi  0.13.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
CoreProperty.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 
20 
21 #ifndef CORE_PROPERTY_H
22 #define CORE_PROPERTY_H
23 
24 #include <vector>
25 #include <string>
26 
27 namespace epc
28 {
30  {
31  public:
32 
36  enum TypeProperty {
37  category = 0,
38  contentStatus = 1,
39  created = 2,
40  creator = 3,
41  description = 4,
42  identifier = 5,
43  keywords = 6,
44  language = 7,
45  lastModifiedBy = 8,
46  lastPrinted = 9,
47  modified = 10,
48  revision = 11,
49  subject = 12,
50  title = 13,
51  version = 14,
52  undefinedCoreProperty = 15
53  };
54 
55  CoreProperty();
56  CoreProperty(const TypeProperty & pType);
57  CoreProperty(const TypeProperty & pType, const std::string & pValue);
58  CoreProperty(const TypeProperty & pType, const std::vector<std::string> & pValue);
59  ~CoreProperty() {}
60 
64  bool isEmpty() const;
65 
70 
74  void setTypeProperty(const TypeProperty & corePropertyType);
75 
79  std::vector<std::string> getAllValue() const;
80 
85  std::string getValue(const int & index = 0) const;
86 
90  std::string toString() const;
91 
92  void setCategory(std::string pValue);
93  void setContentStatus(std::string pValue);
94  void setCreated(std::string pValue);
95  void setCreator(std::string pValue);
96  void setDescription(std::string pValue);
97  void setIdentifier(std::string pValue);
98  void setKeywords(std::string pValue);
99  void addKeywords(std::string pValue);
100  void setLanguage(std::string pValue);
101  void setLastModifiedBy(std::string pValue);
102  void setLastPrinted(std::string pValue);
103  void setModified(std::string pValue);
104  void setRevision(std::string pValue);
105  void setSubject(std::string pValue);
106  void setTitle(std::string pValue);
107  void setVersion(std::string pValue);
108 
109  private:
110  TypeProperty type;
111  std::vector<std::string> value;
112  };
113 }
114 
115 #endif
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 
127 
128 
129 
130 
TypeProperty getTypeProperty() const
Definition: CoreProperty.cpp:54
Definition: CoreProperty.h:29
std::vector< std::string > getAllValue() const
Definition: CoreProperty.cpp:64
bool isEmpty() const
Definition: CoreProperty.cpp:49
TypeProperty
Definition: CoreProperty.h:36
Definition: ContentType.h:26
std::string getValue(const int &index=0) const
Definition: CoreProperty.cpp:69
std::string toString() const
Definition: CoreProperty.cpp:74
void setTypeProperty(const TypeProperty &corePropertyType)
Definition: CoreProperty.cpp:59