summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2014-05-16 15:40:13 (GMT)
committerChristian Mollekopf <chrigi_1@fastmail.fm>2014-05-16 15:57:39 (GMT)
commitd8e94aeb99bf6ff8451f2b7bdf897e2d73b11a3c (patch)
treeb221cf24caadb5b3a141f88213bff636d6c7257d
parentc0baf108ed30368252b7a99afd2751bb001369b0 (diff)
downloadlibkolabxml-d8e94aeb99bf6ff8451f2b7bdf897e2d73b11a3c.tar.gz
Renamed the Tag object to Relation.
-rw-r--r--schemas/kolabformat.xsd6
-rw-r--r--src/containers/kolabconfiguration.cpp12
-rw-r--r--src/containers/kolabconfiguration.h14
-rw-r--r--src/csharp/CMakeLists.txt2
-rw-r--r--src/java/CMakeLists.txt2
-rw-r--r--src/kolabconversions.h52
-rw-r--r--tests/bindingstest.cpp20
-rw-r--r--tests/bindingstest.h2
8 files changed, 55 insertions, 55 deletions
diff --git a/schemas/kolabformat.xsd b/schemas/kolabformat.xsd
index 58af080..508e9c3 100644
--- a/schemas/kolabformat.xsd
+++ b/schemas/kolabformat.xsd
@@ -102,7 +102,7 @@
<xs:enumeration value="dictionary"/>
<xs:enumeration value="categorycolor"/>
<xs:enumeration value="snippets"/>
- <xs:enumeration value="tag"/>
+ <xs:enumeration value="relation"/>
</xs:restriction>
</xs:simpleType>
@@ -157,9 +157,9 @@
<!-- Snippets -->
<xs:element name="name" type="xs:string" minOccurs="0"/>
<xs:element name="snippet" type="Snippet" minOccurs="0" maxOccurs="unbounded"/>
- <!-- Tag -->
+ <!-- Relation -->
<!-- xs:element name="name" type="xs:string" minOccurs="0"/ -->
- <xs:element name="tagType" type="xs:string" minOccurs="0"/>
+ <xs:element name="relationType" type="xs:string" minOccurs="0"/>
<xs:element name="color" type="xs:string" minOccurs="0"/>
<xs:element name="iconName" type="xs:string" minOccurs="0"/>
<xs:element name="priority" type="xs:integer" minOccurs="0"/>
diff --git a/src/containers/kolabconfiguration.cpp b/src/containers/kolabconfiguration.cpp
index 0e777b9..e6a26ee 100644
--- a/src/containers/kolabconfiguration.cpp
+++ b/src/containers/kolabconfiguration.cpp
@@ -25,7 +25,7 @@ struct Configuration::Private {
std::vector<CategoryColor> categoryColor;
Dictionary dictionary;
SnippetsCollection snippets;
- Tag tag;
+ Relation relation;
ConfigurationType type;
std::string uid;
cDateTime created;
@@ -58,11 +58,11 @@ Configuration::Configuration(const SnippetsCollection &snippets)
d->type = TypeSnippet;
}
-Configuration::Configuration(const Tag &tag)
+Configuration::Configuration(const Relation &relation)
: d(new Configuration::Private)
{
- d->tag = tag;
- d->type = TypeTag;
+ d->relation = relation;
+ d->type = TypeRelation;
}
Configuration::Configuration(const Configuration &other)
@@ -137,9 +137,9 @@ SnippetsCollection Configuration::snippets() const
return d->snippets;
}
-Tag Configuration::tag() const
+Relation Configuration::relation() const
{
- return d->tag;
+ return d->relation;
}
} //Namespace
diff --git a/src/containers/kolabconfiguration.h b/src/containers/kolabconfiguration.h
index 4d38367..2d8f9e8 100644
--- a/src/containers/kolabconfiguration.h
+++ b/src/containers/kolabconfiguration.h
@@ -109,11 +109,11 @@ private:
std::vector<Snippet> mSnippets;
};
-struct Tag {
- Tag(){}
- Tag(const std::string &name, const std::string &type): mName(name), mType(type) {}
+struct Relation {
+ Relation(){}
+ Relation(const std::string &name, const std::string &type): mName(name), mType(type) {}
- bool operator==(const Tag &other) const {
+ bool operator==(const Relation &other) const {
return mName == other.mName &&
mType == other.mType &&
mColor == other.mColor &&
@@ -156,7 +156,7 @@ public:
Configuration(const std::vector<CategoryColor> &);
Configuration(const Dictionary &);
Configuration(const SnippetsCollection &);
- Configuration(const Tag &);
+ Configuration(const Relation &);
Configuration(const Configuration &);
~Configuration();
void operator=(const Configuration &);
@@ -177,13 +177,13 @@ public:
TypeDictionary,
TypeCategoryColor,
TypeSnippet,
- TypeTag
+ TypeRelation
};
ConfigurationType type() const;
std::vector<CategoryColor> categoryColor() const;
Dictionary dictionary() const;
SnippetsCollection snippets() const;
- Tag tag() const;
+ Relation relation() const;
private:
struct Private;
boost::scoped_ptr<Private> d;
diff --git a/src/csharp/CMakeLists.txt b/src/csharp/CMakeLists.txt
index 17a1e8a..a9ab922 100644
--- a/src/csharp/CMakeLists.txt
+++ b/src/csharp/CMakeLists.txt
@@ -42,6 +42,7 @@ set(KOLAB_SWIG_CSHARP_FILES
${CMAKE_CURRENT_BINARY_DIR}/PartStatus.cs
${CMAKE_CURRENT_BINARY_DIR}/RecurrenceRule.cs
${CMAKE_CURRENT_BINARY_DIR}/Related.cs
+ ${CMAKE_CURRENT_BINARY_DIR}/Relation.cs
${CMAKE_CURRENT_BINARY_DIR}/Relative.cs
${CMAKE_CURRENT_BINARY_DIR}/Role.cs
${CMAKE_CURRENT_BINARY_DIR}/Snippet.cs
@@ -50,7 +51,6 @@ set(KOLAB_SWIG_CSHARP_FILES
${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_Kolab__Freebusy.cs
${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_std__vectorT_Kolab__Snippet_t.cs
${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_std__vectorT_Kolab__Todo_t.cs
- ${CMAKE_CURRENT_BINARY_DIR}/Tag.cs
${CMAKE_CURRENT_BINARY_DIR}/Telephone.cs
${CMAKE_CURRENT_BINARY_DIR}/Todo.cs
${CMAKE_CURRENT_BINARY_DIR}/Url.cs
diff --git a/src/java/CMakeLists.txt b/src/java/CMakeLists.txt
index 0cf1596..9b32ad6 100644
--- a/src/java/CMakeLists.txt
+++ b/src/java/CMakeLists.txt
@@ -33,6 +33,7 @@ set(KOLAB_SWIG_JAVA_FILES
${CMAKE_CURRENT_BINARY_DIR}/Note.java
${CMAKE_CURRENT_BINARY_DIR}/PartStatus.java
${CMAKE_CURRENT_BINARY_DIR}/RecurrenceRule.java
+ ${CMAKE_CURRENT_BINARY_DIR}/Relation.java
${CMAKE_CURRENT_BINARY_DIR}/Related.java
${CMAKE_CURRENT_BINARY_DIR}/Relative.java
${CMAKE_CURRENT_BINARY_DIR}/Role.java
@@ -42,7 +43,6 @@ set(KOLAB_SWIG_JAVA_FILES
${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_Kolab__Freebusy.java
${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_std__vectorT_Kolab__Snippet_t.java
${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_std__vectorT_Kolab__Todo_t.java
- ${CMAKE_CURRENT_BINARY_DIR}/Tag.java
${CMAKE_CURRENT_BINARY_DIR}/Telephone.java
${CMAKE_CURRENT_BINARY_DIR}/Todo.java
${CMAKE_CURRENT_BINARY_DIR}/Url.java
diff --git a/src/kolabconversions.h b/src/kolabconversions.h
index 29068c6..cfd0e7b 100644
--- a/src/kolabconversions.h
+++ b/src/kolabconversions.h
@@ -136,8 +136,8 @@ KolabXSD::Configuration::type_type getConfigurationType(Kolab::Configuration::Co
return KolabXSD::Configuration::type_type::categorycolor;
case Kolab::Configuration::TypeSnippet:
return KolabXSD::Configuration::type_type::snippets;
- case Kolab::Configuration::TypeTag:
- return KolabXSD::Configuration::type_type::tag;
+ case Kolab::Configuration::TypeRelation:
+ return KolabXSD::Configuration::type_type::relation;
default:
CRITICAL("Invalid configuration type");
}
@@ -198,25 +198,25 @@ std::string serializeObject <Kolab::Configuration> (const Kolab::Configuration &
}
}
break;
- case Kolab::Configuration::TypeTag: {
- const Kolab::Tag &tag = configuration.tag();
- n.name(tag.name());
- if (!tag.type().empty()) {
- n.tagType(tag.type());
+ case Kolab::Configuration::TypeRelation: {
+ const Kolab::Relation &relation = configuration.relation();
+ n.name(relation.name());
+ if (!relation.type().empty()) {
+ n.relationType(relation.type());
}
- if (!tag.color().empty()) {
- n.color(tag.color());
+ if (!relation.color().empty()) {
+ n.color(relation.color());
}
- if (!tag.iconName().empty()) {
- n.iconName(tag.iconName());
+ if (!relation.iconName().empty()) {
+ n.iconName(relation.iconName());
}
- if (!tag.parent().empty()) {
- n.parent(tag.parent());
+ if (!relation.parent().empty()) {
+ n.parent(relation.parent());
}
- if (!tag.priority() != 0) {
- n.priority(fromInt<KolabXSD::Configuration::priority_type>(tag.priority()));
+ if (!relation.priority() != 0) {
+ n.priority(fromInt<KolabXSD::Configuration::priority_type>(relation.priority()));
}
- BOOST_FOREACH(const std::string &s, tag.members()) {
+ BOOST_FOREACH(const std::string &s, relation.members()) {
n.member().push_back(s);
}
}
@@ -547,31 +547,31 @@ boost::shared_ptr<Kolab::Configuration> deserializeObject <Kolab::Configuration>
collection.setSnippets(snippets);
n = boost::shared_ptr<Kolab::Configuration>(new Kolab::Configuration(collection));
- } else if (configuration->type() == KolabXSD::ConfigurationType::tag) {
+ } else if (configuration->type() == KolabXSD::ConfigurationType::relation) {
std::string name;
if (configuration->name()) {
name = *configuration->name();
}
std::string type;
- if (configuration->tagType()) {
- type = *configuration->tagType();
+ if (configuration->relationType()) {
+ type = *configuration->relationType();
}
- Tag tag(name, type);
+ Relation relation(name, type);
if (configuration->color()) {
- tag.setColor(*configuration->color());
+ relation.setColor(*configuration->color());
}
if (configuration->iconName()) {
- tag.setIconName(*configuration->iconName());
+ relation.setIconName(*configuration->iconName());
}
if (configuration->parent()) {
- tag.setParent(*configuration->parent());
+ relation.setParent(*configuration->parent());
}
if (configuration->priority()) {
- tag.setPriority(convertToInt(*configuration->priority()));
+ relation.setPriority(convertToInt(*configuration->priority()));
}
- tag.setMembers(toStringList(configuration->member()));
+ relation.setMembers(toStringList(configuration->member()));
- n = boost::shared_ptr<Kolab::Configuration>(new Kolab::Configuration(tag));
+ n = boost::shared_ptr<Kolab::Configuration>(new Kolab::Configuration(relation));
} else {
CRITICAL("No valid configuration type");
}
diff --git a/tests/bindingstest.cpp b/tests/bindingstest.cpp
index 6391666..ec56712 100644
--- a/tests/bindingstest.cpp
+++ b/tests/bindingstest.cpp
@@ -105,19 +105,19 @@ void BindingsTest::snippetConfigurationCompletness()
QCOMPARE(re.snippets(), snippets);
}
-void BindingsTest::tagConfigurationCompletness()
+void BindingsTest::relationConfigurationCompletness()
{
- Kolab::Tag tag("name1", "type1");
- tag.setColor("color");
- tag.setIconName("icon");
- tag.setParent("parent");
- tag.setPriority(3);
+ Kolab::Relation relation("name1", "type1");
+ relation.setColor("color");
+ relation.setIconName("icon");
+ relation.setParent("parent");
+ relation.setPriority(3);
std::vector<std::string> members;
members.push_back("member1");
members.push_back("member2");
- tag.setMembers(members);
+ relation.setMembers(members);
- Kolab::Configuration configuration(tag);
+ Kolab::Configuration configuration(relation);
configuration.setUid("uid");
configuration.setCreated(Kolab::cDateTime(2006,1,6,12,0,0,true)); //UTC
configuration.setLastModified(Kolab::cDateTime(2006,1,6,12,0,0,true)); //UTC
@@ -130,8 +130,8 @@ void BindingsTest::tagConfigurationCompletness()
QCOMPARE(re.uid(), configuration.uid());
QCOMPARE(re.created(), configuration.created());
QCOMPARE(re.lastModified(), configuration.lastModified());
- QCOMPARE(re.type(), Kolab::Configuration::TypeTag);
- QCOMPARE(re.tag(), tag);
+ QCOMPARE(re.type(), Kolab::Configuration::TypeRelation);
+ QCOMPARE(re.relation(), relation);
}
void BindingsTest::noteCompletness()
diff --git a/tests/bindingstest.h b/tests/bindingstest.h
index a262817..5d04e11 100644
--- a/tests/bindingstest.h
+++ b/tests/bindingstest.h
@@ -25,7 +25,7 @@ class BindingsTest : public QObject
void categorycolorConfigurationCompletness();
void dictionaryConfigurationCompletness();
void snippetConfigurationCompletness();
- void tagConfigurationCompletness();
+ void relationConfigurationCompletness();
void noteCompletness();
void fileCompletness();
void eventCompletness();