diff --git a/adagucserverEC/CServerConfig_CPPXSD.h b/adagucserverEC/CServerConfig_CPPXSD.h index c1e0bda5..7b2b9568 100644 --- a/adagucserverEC/CServerConfig_CPPXSD.h +++ b/adagucserverEC/CServerConfig_CPPXSD.h @@ -1226,6 +1226,8 @@ class CServerConfig : public CXMLSerializerInterface { public: CT::string name, interval, defaultV, units, quantizeperiod, quantizemethod, fixvalue; bool hidden = false; + bool isvertical = false; + bool iscustom = false; } attr; void addAttribute(const char *attrname, const char *attrvalue) { if (equals("name", attrname)) { @@ -1253,11 +1255,26 @@ class CServerConfig : public CXMLSerializerInterface { if (equals("true", attrvalue)) { attr.hidden = true; } - return; } else if (equals("quantizemethod", attrname)) { attr.quantizemethod.copy(attrvalue); return; + } else if (equals("isvertical", attrname)) { + if (equals("false", attrvalue)) { + attr.isvertical = false; + } + if (equals("true", attrvalue)) { + attr.isvertical = true; + } + return; + } else if (equals("iscustom", attrname)) { + if (equals("false", attrvalue)) { + attr.iscustom = false; + } + if (equals("true", attrvalue)) { + attr.iscustom = true; + } + return; } } }; diff --git a/adagucserverEC/Types/LayerMetadataType.h b/adagucserverEC/Types/LayerMetadataType.h index 731077d2..405bc0ea 100644 --- a/adagucserverEC/Types/LayerMetadataType.h +++ b/adagucserverEC/Types/LayerMetadataType.h @@ -12,6 +12,8 @@ struct LayerMetadataDim { CT::string defaultValue; int hasMultipleValues; bool hidden; + bool isvertical; + bool iscustom; }; struct LayerMetadataProjection { diff --git a/adagucserverEC/utils/LayerMetadataStore.cpp b/adagucserverEC/utils/LayerMetadataStore.cpp index c2e08f3f..6e8ae0c2 100644 --- a/adagucserverEC/utils/LayerMetadataStore.cpp +++ b/adagucserverEC/utils/LayerMetadataStore.cpp @@ -12,6 +12,8 @@ int getDimensionListAsJson(MetadataLayer *metadataLayer, json &dimListJson) { item["defaultValue"] = dimension.defaultValue.c_str(); item["hasMultipleValues"] = dimension.hasMultipleValues; item["hidden"] = dimension.hidden; + item["isvertical"] = dimension.isvertical; + item["iscustom"] = dimension.iscustom; item["name"] = dimension.name.c_str(); item["units"] = dimension.units.c_str(); item["values"] = dimension.values.c_str(); @@ -371,6 +373,8 @@ int loadLayerDimensionListFromMetadataDb(MetadataLayer *metadataLayer) { .defaultValue = dimensionProperties["defaultValue"].get().c_str(), .hasMultipleValues = dimensionProperties["hasMultipleValues"].get(), .hidden = dimensionProperties["hidden"].get(), + .isvertical = dimensionProperties["isvertical"].get(), + .iscustom = dimensionProperties["iscustom"].get(), }; metadataLayer->layerMetadata.dimList.push_back(dimension); } diff --git a/adagucserverEC/utils/XMLGenUtils.cpp b/adagucserverEC/utils/XMLGenUtils.cpp index 119f3e99..eba9711b 100644 --- a/adagucserverEC/utils/XMLGenUtils.cpp +++ b/adagucserverEC/utils/XMLGenUtils.cpp @@ -175,6 +175,8 @@ int getDimsForLayer(MetadataLayer *metadataLayer) { dim.defaultValue.copy(fileDate.c_str()); dim.hasMultipleValues = true; dim.hidden = false; + dim.isvertical = false; + dim.iscustom = false; metadataLayer->layerMetadata.dimList.push_back(dim); break; } @@ -188,6 +190,8 @@ int getDimsForLayer(MetadataLayer *metadataLayer) { // Create a new dim to store in the layer LayerMetadataDim dim; dim.hidden = false; + dim.isvertical = false; + dim.iscustom = false; dim.name.copy(metadataLayer->dataSource->cfgLayer->Dimension[i]->value.c_str()); // Get the tablename @@ -556,6 +560,17 @@ int getDimsForLayer(MetadataLayer *metadataLayer) { if (metadataLayer->dataSource->cfgLayer->Dimension[i]->attr.hidden == true) { dim.hidden = true; } + + // Check if dim is vertical dim + if (metadataLayer->dataSource->cfgLayer->Dimension[i]->attr.isvertical == true) { + dim.isvertical = true; + } + + // Check if dim is custom dim + if (metadataLayer->dataSource->cfgLayer->Dimension[i]->attr.iscustom == true) { + dim.iscustom = true; + } + metadataLayer->layerMetadata.dimList.push_back(dim); } }