Fixed wrong identifier name and valueType string constants
Change-Id: Ib15d2ba2817ec19efa1ace33e57706864267c47c
Signed-off-by: Thomas Psota <thomas.psota@iese.fraunhofer.de>
diff --git a/sdks/c++/basys.sdk.cc/include/BaSyx/submodel/api_v2/submodelelement/property/XSDAnySimpleType.h b/sdks/c++/basys.sdk.cc/include/BaSyx/submodel/api_v2/submodelelement/property/XSDAnySimpleType.h
index 68639c3..f77885f 100644
--- a/sdks/c++/basys.sdk.cc/include/BaSyx/submodel/api_v2/submodelelement/property/XSDAnySimpleType.h
+++ b/sdks/c++/basys.sdk.cc/include/BaSyx/submodel/api_v2/submodelelement/property/XSDAnySimpleType.h
@@ -30,13 +30,13 @@
switch(type)
{
case type::valueType::Bool:
- return "xsd::boolean";
+ return "boolean";
case type::valueType::Int:
- return "xsd::integer";
+ return "integer";
case type::valueType::Float:
- return "xsd::float";
+ return "float";
case type::valueType::String:
- return "xsd::string";
+ return "string";
default:
return "Type not supported!";
}
@@ -57,7 +57,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:boolean";
+ return "boolean";
}
static const inline bool getXSDRepresentation(const bool & bool_value)
@@ -76,7 +76,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:integer";
+ return "integer";
}
static const inline int getXSDRepresentation(const int & int_value)
@@ -95,7 +95,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:long";
+ return "long";
}
static const inline long getXSDRepresentation(const long & long_value)
@@ -114,7 +114,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:short";
+ return "short";
}
static const inline short getXSDRepresentation(const short & short_value)
@@ -133,7 +133,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:unsignedInt";
+ return "unsignedInt";
}
static const inline unsigned int getXSDRepresentation(const unsigned int & uint_value)
@@ -152,7 +152,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:unsignedShort";
+ return "unsignedShort";
}
static const inline unsigned short getXSDRepresentation(const unsigned short & ushort_value)
@@ -171,7 +171,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:unsignedLong";
+ return "unsignedLong";
}
static const inline unsigned long getXSDRepresentation(const unsigned long & ulong_value)
@@ -190,7 +190,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:double";
+ return "double";
}
static const inline double getXSDRepresentation(const double & double_value)
@@ -209,7 +209,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:float";
+ return "float";
}
static const inline float getXSDRepresentation(const float & float_value)
@@ -228,7 +228,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:string";
+ return "string";
}
static const inline std::string getXSDRepresentation(const std::string & string)
@@ -247,7 +247,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:anyURI";
+ return "anyURI";
}
static const inline std::string getXSDRepresentation(const simple::AnyURI & uri)
@@ -268,7 +268,7 @@
static const std::string getDataTypeDef()
{
- return "xsd:date";
+ return "date";
}
static const inline std::string getXSDRepresentation(const simple::Date & date)
@@ -300,7 +300,7 @@
static const std::string getDataTypeDef()
{
- return "xsd:dateTime";
+ return "dateTime";
}
static const inline std::string getXSDRepresentation(const simple::DateTime & dateTime)
@@ -334,7 +334,7 @@
static const std::string getDataTypeDef()
{
- return "xsd:dayTimeDuration";
+ return "dayTimeDuration";
}
static const inline std::string getXSDRepresentation(const simple::DayTimeDuration & dayTimeDuration)
@@ -402,7 +402,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:yearMonthDuration";
+ return "yearMonthDuration";
}
static const inline std::string getXSDRepresentation(const simple::YearMonthDuration & yearMonthDuration)
@@ -455,7 +455,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:time";
+ return "time";
}
static const inline std::string getXSDRepresentation(const simple::Time & time)
@@ -501,7 +501,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:gYearMonth";
+ return "gYearMonth";
}
static const inline std::string getXSDRepresentation(const simple::GYearMonth & date)
@@ -536,7 +536,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:gYear";
+ return "gYear";
}
static const inline std::string getXSDRepresentation(const simple::GYear & year)
@@ -570,7 +570,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:gMonthDay";
+ return "gMonthDay";
}
static const inline std::string getXSDRepresentation(const simple::GMonthDay & monthDay)
@@ -602,7 +602,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:gDay";
+ return "gDay";
}
static const inline std::string getXSDRepresentation(const simple::GDay & day)
@@ -633,7 +633,7 @@
{
static const std::string getDataTypeDef()
{
- return "xsd:gMonth";
+ return "gMonth";
}
static const inline std::string getXSDRepresentation(const simple::GMonth & month)
diff --git a/sdks/c++/basys.sdk.cc/include/BaSyx/submodel/map_v2/qualifier/Identifiable.h b/sdks/c++/basys.sdk.cc/include/BaSyx/submodel/map_v2/qualifier/Identifiable.h
index 91ba983..9fe83cb 100644
--- a/sdks/c++/basys.sdk.cc/include/BaSyx/submodel/map_v2/qualifier/Identifiable.h
+++ b/sdks/c++/basys.sdk.cc/include/BaSyx/submodel/map_v2/qualifier/Identifiable.h
@@ -18,7 +18,7 @@
static constexpr char IdType[] = "idType";
static constexpr char Id[] = "id";
static constexpr char AdministrativeInformation[] = "administrativeInformation";
- static constexpr char Identifier[] = "Identification";
+ static constexpr char Identifier[] = "identification";
};
private:
map::AdministrativeInformation administrativeInformation;
diff --git a/sdks/c++/basys.sdk.cc/tests/regression/submodel/api/property/test_Property.cpp b/sdks/c++/basys.sdk.cc/tests/regression/submodel/api/property/test_Property.cpp
index f0de4ca..34a7353 100644
--- a/sdks/c++/basys.sdk.cc/tests/regression/submodel/api/property/test_Property.cpp
+++ b/sdks/c++/basys.sdk.cc/tests/regression/submodel/api/property/test_Property.cpp
@@ -65,14 +65,14 @@
TYPED_TEST(PropertyTest, TestAnyURI)
{
map::Property<simple::AnyURI> map_uri_prop("id");
- ASSERT_EQ(map_uri_prop.getValueType(), std::string("xsd:anyURI"));
+ ASSERT_EQ(map_uri_prop.getValueType(), std::string("anyURI"));
}
TYPED_TEST(PropertyTest, TestSafeDateTime)
{
map::Property<simple::DateTime> dateTime_property("test id");
std::string valueType = dateTime_property.getValueType();
- ASSERT_EQ(valueType, std::string("xsd:dateTime"));
+ ASSERT_EQ(valueType, std::string("dateTime"));
//Try to add a DateTime
time_t t = 1563002200;
@@ -90,7 +90,7 @@
{
map::Property<simple::Date> date_property("test id");
std::string valueType = date_property.getValueType();
- ASSERT_EQ(valueType, std::string("xsd:date"));
+ ASSERT_EQ(valueType, std::string("date"));
//Try to add a Date
tm date;
@@ -113,7 +113,7 @@
TYPED_TEST(PropertyTest, TestSafeDayTimeDuration)
{
map::Property<simple::DayTimeDuration> duration_property("test id");
- ASSERT_EQ(duration_property.getValueType(), std::string("xsd:dayTimeDuration"));
+ ASSERT_EQ(duration_property.getValueType(), std::string("dayTimeDuration"));
std::vector<std::pair<long, std::string>> test_cases = {
{0, "P"},
@@ -143,7 +143,7 @@
TYPED_TEST(PropertyTest, TestSafeYearMonthDuration)
{
map::Property<simple::YearMonthDuration> duration_property("test id");
- ASSERT_EQ(duration_property.getValueType(), std::string("xsd:yearMonthDuration"));
+ ASSERT_EQ(duration_property.getValueType(), std::string("yearMonthDuration"));
std::vector<std::tuple<int, int, int, int, std::string>> test_cases = {
{0, 0, 0, 0, "P"},
@@ -169,7 +169,7 @@
TYPED_TEST(PropertyTest, TestTime)
{
map::Property<simple::Time> time_property("test id");
- ASSERT_EQ(time_property.getValueType(), std::string("xsd:time"));
+ ASSERT_EQ(time_property.getValueType(), std::string("time"));
std::vector<std::tuple<uint8_t, uint8_t, float, std::string, std::string>> test_cases = {
{0, 0, 0, "Z", "00:00:00Z"},
@@ -195,7 +195,7 @@
TYPED_TEST(PropertyTest, TestGregorianYearMonth)
{
map::Property<simple::GYearMonth> gregorianYearMonth_property("test id");
- ASSERT_EQ(gregorianYearMonth_property.getValueType(), std::string("xsd:gYearMonth"));
+ ASSERT_EQ(gregorianYearMonth_property.getValueType(), std::string("gYearMonth"));
std::vector<std::tuple<int, uint8_t, std::string, std::string>> test_cases = {
{0, 01, "Z", "0000-01Z"},
@@ -221,7 +221,7 @@
TYPED_TEST(PropertyTest, TestGregorianYear)
{
map::Property<simple::GYear> gregorianYear_property("test id");
- ASSERT_EQ(gregorianYear_property.getValueType(), std::string("xsd:gYear"));
+ ASSERT_EQ(gregorianYear_property.getValueType(), std::string("gYear"));
std::vector<std::tuple<int, std::string, std::string>> test_cases = {
{0, "Z", "0000Z"},
@@ -247,7 +247,7 @@
TYPED_TEST(PropertyTest, TestGregorianMonthDay)
{
map::Property<simple::GMonthDay> gregorianMonthDay_property("test id");
- ASSERT_EQ(gregorianMonthDay_property.getValueType(), std::string("xsd:gMonthDay"));
+ ASSERT_EQ(gregorianMonthDay_property.getValueType(), std::string("gMonthDay"));
std::vector<std::tuple<uint8_t, uint8_t, std::string, std::string, uint8_t, uint8_t>> test_cases = {
{1, 1, "Z", "--01-01Z", 1, 1},
@@ -271,7 +271,7 @@
TYPED_TEST(PropertyTest, TestGregorianDay)
{
map::Property<simple::GDay> gregorianDay_property("test id");
- ASSERT_EQ(gregorianDay_property.getValueType(), std::string("xsd:gDay"));
+ ASSERT_EQ(gregorianDay_property.getValueType(), std::string("gDay"));
std::vector<std::tuple<uint8_t, std::string, std::string, uint8_t>> test_cases = {
{1, "Z", "---01Z", 1},
@@ -294,7 +294,7 @@
TYPED_TEST(PropertyTest, TestGregorianMonth)
{
map::Property<simple::GMonth> gregorianMonth_property("test id");
- ASSERT_EQ(gregorianMonth_property.getValueType(), std::string("xsd:gMonth"));
+ ASSERT_EQ(gregorianMonth_property.getValueType(), std::string("gMonth"));
std::vector<std::tuple<uint8_t, std::string, std::string, uint8_t>> test_cases = {
{1, "Z", "--01Z", 1},