[mapguide-commits] r9181 - in trunk/MgDev: . Common/PlatformBase Common/PlatformBase/Services Common/Schema Desktop Server/src/Services/Feature Server/src/Services/Mapping Server/src/UnitTesting UnitTest/WebTier/MapAgent/MapAgentForms Web/src/DotNetUnmanagedApi/PlatformBase Web/src/HttpHandler Web/src/MapGuideApi Web/src/viewerfiles
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Apr 27 05:44:20 PDT 2017
Author: jng
Date: 2017-04-27 05:44:20 -0700 (Thu, 27 Apr 2017)
New Revision: 9181
Added:
trunk/MgDev/Common/PlatformBase/Services/GeoJsonWriter.cpp
trunk/MgDev/Common/PlatformBase/Services/GeoJsonWriter.h
trunk/MgDev/Common/Schema/ClassDefinition-3.3.0.xsd
trunk/MgDev/Common/Schema/FeatureSchemaCollection-3.3.0.xsd
Modified:
trunk/MgDev/
trunk/MgDev/Common/PlatformBase/PlatformBase.h
trunk/MgDev/Common/PlatformBase/PlatformBase.vcxproj
trunk/MgDev/Common/PlatformBase/PlatformBase.vcxproj.filters
trunk/MgDev/Common/PlatformBase/PlatformBaseBuild.cpp
trunk/MgDev/Common/PlatformBase/Services/ClassDefinition.cpp
trunk/MgDev/Common/PlatformBase/Services/ClassDefinition.h
trunk/MgDev/Common/PlatformBase/Services/FeatureSchemaCollection.cpp
trunk/MgDev/Common/PlatformBase/Services/FeatureSchemaCollection.h
trunk/MgDev/Desktop/
trunk/MgDev/Server/src/Services/Feature/FeatureOperationFactory.cpp
trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp
trunk/MgDev/Server/src/Services/Mapping/MappingUtil.cpp
trunk/MgDev/Server/src/UnitTesting/TestMisc.cpp
trunk/MgDev/Server/src/UnitTesting/TestMisc.h
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/csenumeratecategoriesform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/csenumeratecoordinatesystemsform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/describedrawingform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/describeschemaform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratecontainersform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratecoordinatesystemsform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedatastoresform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedrawinglayers.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedrawingsectionresources.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedrawingsections.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerategroupsform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeraterepositoriesform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateresourcedataform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateresourcereferencesform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateresourcesform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratetemplatesform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateunmanageddataform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateusersform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratewidgetsform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getcapabilitiesform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getclassdefinitionform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getclassesform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getconnectpropertyvaluesform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getfdocacheinfoform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getfeatureprovidersform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getidentitypropertiesform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getlongtransactionsform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getrepositorycontentform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getrepositoryheaderform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getresourcecontentform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getresourceheaderform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getschemamappingform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getschemasform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteinfoform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getsitestatusform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteversionform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getspatialcontextsform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/gettileprovidersform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getvisiblemapextentform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/selectaggregatesform.html
trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/selectfeaturesform.html
trunk/MgDev/Web/src/DotNetUnmanagedApi/PlatformBase/PlatformBaseApiGen.xml
trunk/MgDev/Web/src/HttpHandler/HttpCreateRuntimeMap.cpp
trunk/MgDev/Web/src/HttpHandler/HttpDescribeRuntimeMap.cpp
trunk/MgDev/Web/src/HttpHandler/HttpDescribeSchema.cpp
trunk/MgDev/Web/src/HttpHandler/HttpDescribeSchema.h
trunk/MgDev/Web/src/HttpHandler/HttpGetClassDefinition.cpp
trunk/MgDev/Web/src/HttpHandler/HttpGetClassDefinition.h
trunk/MgDev/Web/src/HttpHandler/HttpGetTileProviders.cpp
trunk/MgDev/Web/src/HttpHandler/HttpQueryMapFeatures.cpp
trunk/MgDev/Web/src/HttpHandler/HttpRequestResponseHandler.cpp
trunk/MgDev/Web/src/HttpHandler/HttpRequestResponseHandler.h
trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.cpp
trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.h
trunk/MgDev/Web/src/HttpHandler/HttpSelectFeatures.cpp
trunk/MgDev/Web/src/HttpHandler/HttpSelectFeaturesSpatially.cpp
trunk/MgDev/Web/src/HttpHandler/JsonDoc.cpp
trunk/MgDev/Web/src/HttpHandler/JsonDoc.h
trunk/MgDev/Web/src/HttpHandler/ReaderByteSourceImpl.cpp
trunk/MgDev/Web/src/HttpHandler/ReaderByteSourceImpl.h
trunk/MgDev/Web/src/HttpHandler/XmlJsonConvert.cpp
trunk/MgDev/Web/src/HttpHandler/XmlJsonConvert.h
trunk/MgDev/Web/src/MapGuideApi/MapGuideApiGen.xml
trunk/MgDev/Web/src/viewerfiles/
Log:
Merge from sandbox/jng/clean_json. This completes MapGuide RFC 158.
Property changes on: trunk/MgDev
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev:8276-8286,8288-8292,8297,8299,8301,8303,8314-8315,8318,8335,8340,8354-8355,8365,8373
/branches/3.0/MgDev:8658,8705,8710
/branches/3.1/MgDev:9026,9058-9059,9067-9068
/sandbox/VC140:8684-8759
/sandbox/adsk/2.6l:8727
/sandbox/adsk/3.0m:8563,8584,8607,8625,8694-8695
/sandbox/adsk/3.1n:8871,8895,8901,8912-8913,8921-8922,8942,9019-9020
/sandbox/jng/convenience_apis:8262-8268,8271-8363
/sandbox/jng/createruntimemap:7486-7555
/sandbox/jng/dwftk:8321-8324,8328-8329,8331,8352
/sandbox/jng/geos34x:8256-8259
/sandbox/jng/php56x:8975-8985
/sandbox/jng/rfc155:8872-8884
/sandbox/jng/simplify:8814-9141
/sandbox/jng/tiling:8174-8208
/sandbox/jng/v30:8212-8227
/sandbox/rfc94:5099-5163
/trunk/MgDev:8869-8871
+ /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev:8276-8286,8288-8292,8297,8299,8301,8303,8314-8315,8318,8335,8340,8354-8355,8365,8373
/branches/3.0/MgDev:8658,8705,8710
/branches/3.1/MgDev:9026,9058-9059,9067-9068
/sandbox/VC140:8684-8759
/sandbox/adsk/2.6l:8727
/sandbox/adsk/3.0m:8563,8584,8607,8625,8694-8695
/sandbox/adsk/3.1n:8871,8895,8901,8912-8913,8921-8922,8942,9019-9020
/sandbox/jng/clean_json:8818-9180
/sandbox/jng/convenience_apis:8262-8268,8271-8363
/sandbox/jng/createruntimemap:7486-7555
/sandbox/jng/dwftk:8321-8324,8328-8329,8331,8352
/sandbox/jng/geos34x:8256-8259
/sandbox/jng/php56x:8975-8985
/sandbox/jng/rfc155:8872-8884
/sandbox/jng/simplify:8814-9141
/sandbox/jng/tiling:8174-8208
/sandbox/jng/v30:8212-8227
/sandbox/rfc94:5099-5163
Modified: trunk/MgDev/Common/PlatformBase/PlatformBase.h
===================================================================
--- trunk/MgDev/Common/PlatformBase/PlatformBase.h 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Common/PlatformBase/PlatformBase.h 2017-04-27 12:44:20 UTC (rev 9181)
@@ -114,6 +114,7 @@
#include "Services/FeatureServiceCommon.h"
#include "Services/FeatureSet.h"
#include "Services/FeatureSpatialOperations.h"
+#include "Services/GeoJsonWriter.h"
#include "Services/GeometricPropertyDefinition.h"
#include "Services/GeometryProperty.h"
#include "Services/GeometryTypeInfo.h"
Modified: trunk/MgDev/Common/PlatformBase/PlatformBase.vcxproj
===================================================================
--- trunk/MgDev/Common/PlatformBase/PlatformBase.vcxproj 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Common/PlatformBase/PlatformBase.vcxproj 2017-04-27 12:44:20 UTC (rev 9181)
@@ -556,6 +556,12 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
+ <ClCompile Include="Services\GeoJsonWriter.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="Services\GeometricPropertyDefinition.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -915,6 +921,7 @@
<ClInclude Include="Services\FeatureSourceParams.h" />
<ClInclude Include="Services\FeatureSpatialOperations.h" />
<ClInclude Include="Services\FileFeatureSourceParams.h" />
+ <ClInclude Include="Services\GeoJsonWriter.h" />
<ClInclude Include="Services\GeometricPropertyDefinition.h" />
<ClInclude Include="Services\GeometryProperty.h" />
<ClInclude Include="Services\GeometryTypeInfo.h" />
Modified: trunk/MgDev/Common/PlatformBase/PlatformBase.vcxproj.filters
===================================================================
--- trunk/MgDev/Common/PlatformBase/PlatformBase.vcxproj.filters 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Common/PlatformBase/PlatformBase.vcxproj.filters 2017-04-27 12:44:20 UTC (rev 9181)
@@ -349,6 +349,9 @@
<Filter>MapLayer</Filter>
</ClCompile>
<ClCompile Include="PlatformBaseBuild.cpp" />
+ <ClCompile Include="Services\GeoJsonWriter.cpp">
+ <Filter>Services</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Data\BlobProperty.h">
@@ -730,6 +733,9 @@
<Filter>MapLayer</Filter>
</ClInclude>
<ClInclude Include="PlatformBase.h" />
+ <ClInclude Include="Services\GeoJsonWriter.h">
+ <Filter>Services</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="PlatformBase.rc" />
Modified: trunk/MgDev/Common/PlatformBase/PlatformBaseBuild.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/PlatformBaseBuild.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Common/PlatformBase/PlatformBaseBuild.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -89,6 +89,7 @@
#include "Services/FeatureSourceParams.cpp"
#include "Services/FeatureSpatialOperations.cpp"
#include "Services/FileFeatureSourceParams.cpp"
+#include "Services/GeoJsonWriter.cpp"
#include "Services/GeometricPropertyDefinition.cpp"
#include "Services/GeometryProperty.cpp"
#include "Services/GeometryTypeInfo.cpp"
Modified: trunk/MgDev/Common/PlatformBase/Services/ClassDefinition.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/Services/ClassDefinition.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Common/PlatformBase/Services/ClassDefinition.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -243,6 +243,193 @@
}
//////////////////////////////////////////////////////////////
+void MgClassDefinition::ToSimpleXml(string & str, bool includeProlog)
+{
+ STRING xml;
+ if (includeProlog)
+ {
+ xml = L"<?xml version=\"1.0\" encoding=\"utf-8\"?>";
+ xml.append(L"<ClassDefinition xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ClassDefinition-3.3.0.xsd\">");
+ }
+ else
+ {
+ xml.append(L"<ClassDefinition>");
+ }
+
+ xml.append(L"<Name>");
+ xml.append(GetName());
+ xml.append(L"</Name>");
+
+ xml.append(L"<Description>");
+ xml.append(GetDescription());
+ xml.append(L"</Description>");
+
+ xml.append(L"<IsAbstract>");
+ xml.append(IsAbstract() ? L"true" : L"false");
+ xml.append(L"</IsAbstract>");
+
+ xml.append(L"<IsComputed>");
+ xml.append(IsComputed() ? L"true" : L"false");
+ xml.append(L"</IsComputed>");
+
+ xml.append(L"<DefaultGeometryPropertyName>");
+ xml.append(GetDefaultGeometryPropertyName());
+ xml.append(L"</DefaultGeometryPropertyName>");
+
+ xml.append(L"<Properties>");
+ Ptr<MgPropertyDefinitionCollection> props = GetProperties();
+ Ptr<MgPropertyDefinitionCollection> idProps = GetIdentityProperties();
+ INT32 pcount = props->GetCount();
+ for (INT32 i = 0; i < pcount; i++)
+ {
+ Ptr<MgPropertyDefinition> pdef = props->GetItem(i);
+ INT32 ptype = pdef->GetPropertyType();
+ if (ptype == MgFeaturePropertyType::DataProperty ||
+ ptype == MgFeaturePropertyType::RasterProperty ||
+ ptype == MgFeaturePropertyType::GeometricProperty)
+ {
+ xml.append(L"<Property>");
+
+ xml.append(L"<Name>");
+ xml.append(pdef->GetName());
+ xml.append(L"</Name>");
+
+ xml.append(L"<Description>");
+ xml.append(pdef->GetDescription());
+ xml.append(L"</Description>");
+
+ xml.append(L"<PropertyType>");
+ STRING wpType;
+ MgUtil::Int32ToString(ptype, wpType);
+ xml.append(wpType);
+ xml.append(L"</PropertyType>");
+
+ MgDataPropertyDefinition* dpd = dynamic_cast<MgDataPropertyDefinition*>(pdef.p);
+ MgGeometricPropertyDefinition* gpd = dynamic_cast<MgGeometricPropertyDefinition*>(pdef.p);
+ MgRasterPropertyDefinition* rpd = dynamic_cast<MgRasterPropertyDefinition*>(pdef.p);
+
+ xml.append(L"<IsIdentity>");
+ xml.append((idProps->IndexOf(pdef->GetName()) >= 0) ? L"true" : L"false");
+ xml.append(L"</IsIdentity>");
+
+ if (NULL != dpd)
+ {
+ xml.append(L"<DataType>");
+ STRING wDataType;
+ MgUtil::Int32ToString(dpd->GetDataType(), wDataType);
+ xml.append(wDataType);
+ xml.append(L"</DataType>");
+
+ xml.append(L"<DefaultValue>");
+ xml.append(dpd->GetDefaultValue());
+ xml.append(L"</DefaultValue>");
+
+ xml.append(L"<Length>");
+ STRING wLength;
+ MgUtil::Int32ToString(dpd->GetLength(), wLength);
+ xml.append(wLength);
+ xml.append(L"</Length>");
+
+ xml.append(L"<Nullable>");
+ xml.append(dpd->GetNullable() ? L"true" : L"false");
+ xml.append(L"</Nullable>");
+
+ xml.append(L"<ReadOnly>");
+ xml.append(dpd->GetReadOnly() ? L"true" : L"false");
+ xml.append(L"</ReadOnly>");
+
+ xml.append(L"<IsAutoGenerated>");
+ xml.append(dpd->IsAutoGenerated() ? L"true" : L"false");
+ xml.append(L"</IsAutoGenerated>");
+
+ xml.append(L"<Precision>");
+ STRING wPrecision;
+ MgUtil::Int32ToString(dpd->GetPrecision(), wPrecision);
+ xml.append(wPrecision);
+ xml.append(L"</Precision>");
+
+ xml.append(L"<Scale>");
+ STRING wScale;
+ MgUtil::Int32ToString(dpd->GetScale(), wScale);
+ xml.append(wScale);
+ xml.append(L"</Scale>");
+ }
+ else if (NULL != gpd)
+ {
+ xml.append(L"<ReadOnly>");
+ xml.append(gpd->GetReadOnly() ? L"true" : L"false");
+ xml.append(L"</ReadOnly>");
+
+ xml.append(L"<SpatialContextAssociation>");
+ xml.append(gpd->GetSpatialContextAssociation());
+ xml.append(L"</SpatialContextAssociation>");
+
+ xml.append(L"<GeometryTypes>");
+ STRING wGeomTypes;
+ MgUtil::Int32ToString(gpd->GetGeometryTypes(), wGeomTypes);
+ xml.append(wGeomTypes);
+ xml.append(L"</GeometryTypes>");
+
+ xml.append(L"<SpecificGeometryTypes>");
+ Ptr<MgGeometryTypeInfo> sgt = gpd->GetSpecificGeometryTypes();
+ INT32 scount = sgt->GetCount();
+ for (INT32 g = 0; g < scount; g++)
+ {
+ INT32 gt = sgt->GetType(g);
+ STRING wSpecGeomType;
+ MgUtil::Int32ToString(gt, wSpecGeomType);
+ xml.append(L"<Type>");
+ xml.append(wSpecGeomType);
+ xml.append(L"</Type>");
+ }
+ xml.append(L"</SpecificGeometryTypes>");
+
+ xml.append(L"<HasElevation>");
+ xml.append(gpd->GetHasElevation() ? L"true" : L"false");
+ xml.append(L"</HasElevation>");
+
+ xml.append(L"<HasMeasure>");
+ xml.append(gpd->GetHasMeasure() ? L"true" : L"false");
+ xml.append(L"</HasMeasure>");
+ }
+ else if (NULL != rpd)
+ {
+ xml.append(L"<Nullable>");
+ xml.append(rpd->GetNullable() ? L"true" : L"false");
+ xml.append(L"</Nullable>");
+
+ xml.append(L"<ReadOnly>");
+ xml.append(rpd->GetReadOnly() ? L"true" : L"false");
+ xml.append(L"</ReadOnly>");
+
+ xml.append(L"<SpatialContextAssociation>");
+ xml.append(rpd->GetSpatialContextAssociation());
+ xml.append(L"</SpatialContextAssociation>");
+
+ xml.append(L"<DefaultImageXSize>");
+ STRING wImageXSize;
+ MgUtil::Int32ToString(rpd->GetDefaultImageXSize(), wImageXSize);
+ xml.append(wImageXSize);
+ xml.append(L"</DefaultImageXSize>");
+
+ xml.append(L"<DefaultImageYSize>");
+ STRING wImageYSize;
+ MgUtil::Int32ToString(rpd->GetDefaultImageYSize(), wImageYSize);
+ xml.append(wImageYSize);
+ xml.append(L"</DefaultImageYSize>");
+ }
+
+ xml.append(L"</Property>");
+ }
+ }
+ xml.append(L"</Properties>");
+
+ xml.append(L"</ClassDefinition>");
+
+ MgUtil::WideCharToMultiByte(xml, str);
+}
+
+//////////////////////////////////////////////////////////////
void MgClassDefinition::ToXml(string &str)
{
assert(!m_serializedXml.empty());
Modified: trunk/MgDev/Common/PlatformBase/Services/ClassDefinition.h
===================================================================
--- trunk/MgDev/Common/PlatformBase/Services/ClassDefinition.h 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Common/PlatformBase/Services/ClassDefinition.h 2017-04-27 12:44:20 UTC (rev 9181)
@@ -334,6 +334,7 @@
bool CanSetName();
INT32 GetClassId();
void Dispose();
+ void ToSimpleXml(string &str, bool includeProlog);
void ToXml(string &str);
void SetSerializedXml(CREFSTRING strXml);
bool HasRasterProperty();
Modified: trunk/MgDev/Common/PlatformBase/Services/FeatureSchemaCollection.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/Services/FeatureSchemaCollection.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Common/PlatformBase/Services/FeatureSchemaCollection.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -200,6 +200,51 @@
}
}
+void MgFeatureSchemaCollection::ToSimpleXml(std::string & str)
+{
+ str = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
+ str.append("<FeatureSchemaCollection xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"FeatureSchemaCollection-3.3.0.xsd\">");
+
+ INT32 fcount = GetCount();
+ for (INT32 i = 0; i < fcount; i++)
+ {
+ Ptr<MgFeatureSchema> fs = GetItem(i);
+ str.append("<FeatureSchema>");
+
+ str.append("<Name>");
+ std::string mbName;
+ MgUtil::WideCharToMultiByte(fs->GetName(), mbName);
+ str.append(mbName);
+ str.append("</Name>");
+
+ str.append("<Description>");
+ std::string mbDesc;
+ MgUtil::WideCharToMultiByte(fs->GetDescription(), mbDesc);
+ str.append(mbDesc);
+ str.append("</Description>");
+
+ str.append("<Classes>");
+
+ Ptr<MgClassDefinitionCollection> classes = fs->GetClasses();
+ INT32 ccount = classes->GetCount();
+
+ for (INT32 j = 0; j < ccount; j++)
+ {
+ Ptr<MgClassDefinition> clsDef = classes->GetItem(j);
+ std::string mbCls;
+ clsDef->ToSimpleXml(mbCls, false);
+
+ str.append(mbCls);
+ }
+
+ str.append("</Classes>");
+
+ str.append("</FeatureSchema>");
+ }
+
+ str.append("</FeatureSchemaCollection>");
+}
+
/////////////////////////////////////////////////////////////////
/// <summary>
/// Returns the classId.
Modified: trunk/MgDev/Common/PlatformBase/Services/FeatureSchemaCollection.h
===================================================================
--- trunk/MgDev/Common/PlatformBase/Services/FeatureSchemaCollection.h 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Common/PlatformBase/Services/FeatureSchemaCollection.h 2017-04-27 12:44:20 UTC (rev 9181)
@@ -331,6 +331,8 @@
///
void Deserialize(MgStream* stream);
+ void ToSimpleXml(std::string& str);
+
protected:
/////////////////////////////////////////////////////////////////
Copied: trunk/MgDev/Common/PlatformBase/Services/GeoJsonWriter.cpp (from rev 9180, sandbox/jng/clean_json/Common/PlatformBase/Services/GeoJsonWriter.cpp)
===================================================================
--- trunk/MgDev/Common/PlatformBase/Services/GeoJsonWriter.cpp (rev 0)
+++ trunk/MgDev/Common/PlatformBase/Services/GeoJsonWriter.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -0,0 +1,509 @@
+#include "PlatformBase.h"
+#include <algorithm>
+#include <iterator>
+#include <sstream>
+
+MgGeoJsonWriter::MgGeoJsonWriter()
+{
+ m_agfRw = new MgAgfReaderWriter();
+}
+
+STRING MgGeoJsonWriter::FeatureToGeoJson(MgFeatureReader* featureReader, MgTransform* transform)
+{
+ Ptr<MgClassDefinition> clsDef = featureReader->GetClassDefinition();
+ Ptr<MgPropertyDefinitionCollection> idProps = clsDef->GetIdentityProperties();
+ if (idProps->GetCount() == 1)
+ {
+ INT32 idx = 0;
+ Ptr<MgPropertyDefinition> idProp = idProps->GetItem(idx);
+ return FeatureToGeoJson(featureReader, transform, idProp->GetName(), clsDef->GetDefaultGeometryPropertyName());
+ }
+ else
+ {
+ return FeatureToGeoJson(featureReader, transform, L"", L"");
+ }
+}
+
+STRING MgGeoJsonWriter::FeatureToGeoJson(MgReader* reader, MgTransform* transform, CREFSTRING idPropertyName, CREFSTRING geomPropName)
+{
+ STRING ret;
+ INT32 idIndex = -1;
+ INT32 gIndex = -1;
+ STRING idVal;
+ STRING geomVal;
+
+ std::vector<STRING> propVals;
+
+ MG_TRY()
+
+ CHECKARGUMENTNULL(reader, L"MgGeoJsonWriter.FeatureToGeoJson");
+
+ if (!idPropertyName.empty())
+ idIndex = reader->GetPropertyIndex(idPropertyName);
+ if (!geomPropName.empty())
+ {
+ gIndex = reader->GetPropertyIndex(geomPropName);
+ if (gIndex >= 0)
+ {
+ //Must check out as a geometry property
+ INT32 propType = reader->GetPropertyType(gIndex);
+ if (propType != MgPropertyType::Geometry)
+ gIndex = -1;
+ }
+ }
+
+ //Pre-load id and geometry values first
+ if (idIndex >= 0 && !reader->IsNull(idIndex))
+ {
+ ValueToString(reader, idIndex, idVal);
+ }
+ if (gIndex >= 0 && !reader->IsNull(gIndex))
+ {
+ try
+ {
+ Ptr<MgByteReader> agf = reader->GetGeometry(gIndex);
+ Ptr<MgGeometry> geom;
+ if (NULL != transform)
+ geom = m_agfRw->Read(agf, transform);
+ else
+ geom = m_agfRw->Read(agf);
+ ToGeoJson(geom, geomVal);
+ }
+ catch (MgException* ex)
+ {
+ SAFE_RELEASE(ex);
+ geomVal = L"\"geometry\": null";
+ }
+ }
+
+ //Iterate the other properties, skipping over the geometry and id ones if they have been read
+ INT32 propCount = reader->GetPropertyCount();
+ for (INT32 i = 0; i < propCount; i++)
+ {
+ STRING name = reader->GetPropertyName(i);
+ INT32 propType = reader->GetPropertyType(i);
+ if (!reader->IsNull(i))
+ {
+ if (idIndex != i && gIndex != i) //Non id/Non geom property
+ {
+ //GeoJSON only allows one geometry
+ if (propType == MgPropertyType::Geometry && geomVal.empty())
+ {
+ try
+ {
+ Ptr<MgByteReader> agf = reader->GetGeometry(i);
+ Ptr<MgGeometry> geom;
+ if (NULL != transform)
+ geom = m_agfRw->Read(agf, transform);
+ else
+ geom = m_agfRw->Read(agf);
+ ToGeoJson(geom, geomVal);
+ }
+ catch (MgException* ex)
+ {
+ SAFE_RELEASE(ex);
+ geomVal = L"\"geometry\": null";
+ }
+ }
+ else
+ {
+ STRING propFragment = L"\"";
+ propFragment += name;
+ propFragment += L"\": ";
+
+ STRING val;
+ ValueToString(reader, i, val);
+ propFragment += val;
+
+ propVals.push_back(propFragment);
+ }
+ }
+ }
+ else //null property
+ {
+ STRING propFragment = L"\"";
+ propFragment += name;
+ propFragment += L"\": null";
+
+ propVals.push_back(propFragment);
+ }
+ }
+
+ ret = L"{ \"type\": \"Feature\", "; //START FEATURE
+ if (!idVal.empty())
+ {
+ ret += L"\"id\": ";
+ ret += idVal;
+ ret += L", ";
+ }
+ if (!geomVal.empty())
+ {
+ ret += geomVal;
+ ret += L", ";
+ }
+ ret += L"\"properties\": {"; //START PROPERTIES
+ switch (propVals.size())
+ {
+ case 0:
+ break;
+ case 1:
+ ret += propVals[0];
+ break;
+ default:
+ //Implode the vector to a comma-delimited string of "key": <value> pairs
+ std::wostringstream os;
+ std::ostream_iterator<STRING, wchar_t> outIt(os, L",");
+ std::copy(propVals.begin(), propVals.end() - 1, outIt);
+ os << *propVals.rbegin();
+ ret += os.str();
+ break;
+ }
+ ret += L"}"; //END PROPERTIES
+ ret += L"}"; //END FEATURE
+
+ MG_CATCH_AND_THROW(L"MgGeoJsonWriter.FeatureToGeoJson")
+
+ return ret;
+}
+
+void MgGeoJsonWriter::ValueToString(MgReader* reader, INT32 index, REFSTRING str)
+{
+ INT32 propType = reader->GetPropertyType(index);
+ switch (propType)
+ {
+ case MgPropertyType::Boolean:
+ {
+ str = reader->GetBoolean(index) ? L"true" : L"false";
+ }
+ break;
+ case MgPropertyType::Byte:
+ {
+ MgUtil::Int32ToString(reader->GetByte(index), str);
+ }
+ break;
+ case MgPropertyType::DateTime:
+ {
+ Ptr<MgDateTime> dt = reader->GetDateTime(index);
+ str = L"\"";
+ str += dt->ToString();
+ str += L"\"";
+ }
+ break;
+ case MgPropertyType::Decimal:
+ case MgPropertyType::Double:
+ {
+ double val = reader->GetDouble(index);
+ MgUtil::DoubleToString(val, str);
+ }
+ break;
+ case MgPropertyType::Int16:
+ {
+ INT16 val = reader->GetInt16(index);
+ MgUtil::Int32ToString(val, str);
+ }
+ break;
+ case MgPropertyType::Int32:
+ {
+ INT32 val = reader->GetInt32(index);
+ MgUtil::Int32ToString(val, str);
+ }
+ break;
+ case MgPropertyType::Int64:
+ {
+ INT64 val = reader->GetInt64(index);
+ MgUtil::Int64ToString(val, str);
+ }
+ break;
+ case MgPropertyType::Single:
+ {
+ float val = reader->GetSingle(index);
+ MgUtil::SingleToString(val, str);
+ }
+ break;
+ case MgPropertyType::String:
+ {
+ str = L"\"";
+ STRING strVal = EscapeJsonString(reader->GetString(index));
+ str += strVal;
+ str += L"\"";
+ }
+ break;
+ }
+}
+
+STRING MgGeoJsonWriter::EscapeJsonString(CREFSTRING input)
+{
+ std::wostringstream ss;
+ for (STRING::const_iterator iter = input.begin(); iter != input.end(); iter++)
+ {
+ switch (*iter)
+ {
+ case '\\': ss << L"\\\\"; break;
+ case '"': ss << L"\\\""; break;
+ case '/': ss << L"\\/"; break;
+ case '\b': ss << L"\\b"; break;
+ case '\f': ss << L"\\f"; break;
+ case '\n': ss << L"\\n"; break;
+ case '\r': ss << L"\\r"; break;
+ case '\t': ss << L"\\t"; break;
+ default: ss << *iter; break;
+ }
+ }
+ return ss.str();
+}
+
+void MgGeoJsonWriter::ToGeoJson(MgGeometry* geom, REFSTRING str, bool bIncludePrefix)
+{
+ STRING prefix;
+ if (bIncludePrefix)
+ prefix = L"\"geometry\": ";
+
+ INT32 geomType = geom->GetGeometryType();
+ switch (geomType)
+ {
+ case MgGeometryType::Point:
+ {
+ MgPoint* pt = (MgPoint*)geom;
+ Ptr<MgCoordinate> coord = pt->GetCoordinate();
+ str += prefix;
+ str += L"{ \"type\": \"Point\", \"coordinates\": ";
+ STRING strCoords;
+ CoordinateToGeoJson(coord, strCoords);
+ str += strCoords;
+ str += L"}";
+ }
+ break;
+ case MgGeometryType::LineString:
+ {
+ str += prefix;
+ str += L"{ \"type\": \"LineString\", \"coordinates\": ";
+ MgLineString* line = (MgLineString*)geom;
+ Ptr<MgCoordinateIterator> coords = line->GetCoordinates();
+ STRING strCoords;
+ CoordinatesToGeoJson(coords, strCoords);
+ str += strCoords;
+ str += L"}";
+ }
+ break;
+ case MgGeometryType::Polygon:
+ {
+ str += prefix;
+ str += L"{ \"type\": \"Polygon\", \"coordinates\": ";
+ MgPolygon* poly = (MgPolygon*)geom;
+ STRING strPoly;
+ PolygonToGeoJson(poly, strPoly);
+ str += strPoly;
+ str += L"}";
+ }
+ break;
+ case MgGeometryType::MultiPoint:
+ {
+ str += prefix;
+ str += L"{ \"type\": \"MultiPoint\", \"coordinates\": ";
+ MgMultiPoint* multi = (MgMultiPoint*)geom;
+ STRING strMulti;
+ MultiPointToGeoJson(multi, strMulti);
+ str += strMulti;
+ str += L"}";
+ }
+ break;
+ case MgGeometryType::MultiLineString:
+ {
+ str += prefix;
+ str += L"{ \"type\": \"MultiLineString\", \"coordinates\": ";
+ MgMultiLineString* multi = (MgMultiLineString*)geom;
+ STRING strMulti;
+ MultiLineStringToGeoJson(multi, strMulti);
+ str += strMulti;
+ str += L"}";
+ }
+ break;
+ case MgGeometryType::MultiPolygon:
+ {
+ str += prefix;
+ str += L"{ \"type\": \"MultiPolygon\", \"coordinates\": ";
+ MgMultiPolygon* multi = (MgMultiPolygon*)geom;
+ STRING strMulti;
+ MultiPolygonToGeoJson(multi, strMulti);
+ str += strMulti;
+ str += L"}";
+ }
+ break;
+ case MgGeometryType::MultiGeometry:
+ {
+ str += prefix;
+ str += L"{ \"type\": \"GeometryCollection\", \"geometries\": [";
+ MgMultiGeometry* multi = (MgMultiGeometry*)geom;
+ bool bFirst = true;
+ INT32 count = multi->GetCount();
+ for (INT32 i = 0; i < count; i++)
+ {
+ if (!bFirst)
+ str += L",";
+
+ Ptr<MgGeometry> g = multi->GetGeometry(i);
+ STRING strGeom;
+ ToGeoJson(g, strGeom, false);
+
+ bFirst = false;
+ }
+ str += L"]";
+ str += L"}";
+ }
+ break;
+ default:
+ str = L"\"geometry\": null";
+ break;
+ }
+}
+
+void MgGeoJsonWriter::CoordinateToGeoJson(MgCoordinate* coord, REFSTRING str)
+{
+ str = L"[";
+ STRING sx;
+ MgUtil::DoubleToString(coord->GetX(), sx);
+ STRING sy;
+ MgUtil::DoubleToString(coord->GetY(), sy);
+ str += sx;
+ str += L", ";
+ str += sy;
+ str += L"]";
+}
+
+void MgGeoJsonWriter::CoordinatesToGeoJson(MgCoordinateIterator* coords, REFSTRING str)
+{
+ str = L"[";
+ bool bFirst = true;
+ while (coords->MoveNext())
+ {
+ if (!bFirst)
+ str += L",";
+
+ Ptr<MgCoordinate> coord = coords->GetCurrent();
+
+ str += L"[";
+ STRING sx;
+ MgUtil::DoubleToString(coord->GetX(), sx);
+ STRING sy;
+ MgUtil::DoubleToString(coord->GetY(), sy);
+ str += sx;
+ str += L", ";
+ str += sy;
+ str += L"]";
+
+ bFirst = false;
+ }
+ str += L"]";
+}
+
+void MgGeoJsonWriter::PolygonToGeoJson(MgPolygon* poly, REFSTRING str)
+{
+ str = L"[";
+
+ Ptr<MgRing> extRing = poly->GetExteriorRing();
+ if (NULL != extRing.p)
+ {
+ Ptr<MgCoordinateIterator> coords = extRing->GetCoordinates();
+ STRING strCoords;
+ CoordinatesToGeoJson(coords, strCoords);
+ str += strCoords;
+ }
+ INT32 irCount = poly->GetInteriorRingCount();
+ if (irCount > 0)
+ {
+ if (NULL != extRing.p)
+ {
+ str += L",";
+ }
+ for (INT32 i = 0; i < irCount; i++)
+ {
+ Ptr<MgRing> ir = poly->GetInteriorRing(i);
+ Ptr<MgCoordinateIterator> coords = ir->GetCoordinates();
+ STRING strCoords;
+ CoordinatesToGeoJson(coords, strCoords);
+ str += strCoords;
+ if (i < irCount - 1)
+ {
+ str += L",";
+ }
+ }
+ }
+ str += L"]";
+}
+
+void MgGeoJsonWriter::MultiPointToGeoJson(MgMultiPoint* multi, REFSTRING str)
+{
+ str = L"[";
+
+ bool bFirst = true;
+ INT32 count = multi->GetCount();
+ for (INT32 i = 0; i < count; i++)
+ {
+ if (!bFirst)
+ str += L",";
+
+ Ptr<MgPoint> point = multi->GetPoint(i);
+ Ptr<MgCoordinate> coord = point->GetCoordinate();
+ STRING coordStr;
+ CoordinateToGeoJson(coord, coordStr);
+
+ str += coordStr;
+
+ bFirst = false;
+ }
+
+ str += L"]";
+}
+
+void MgGeoJsonWriter::MultiLineStringToGeoJson(MgMultiLineString* multi, REFSTRING str)
+{
+ str = L"[";
+
+ bool bFirst = true;
+ INT32 count = multi->GetCount();
+ for (INT32 i = 0; i < count; i++)
+ {
+ if (!bFirst)
+ str += L",";
+
+ Ptr<MgLineString> line = multi->GetLineString(i);
+ Ptr<MgCoordinateIterator> coords = line->GetCoordinates();
+ STRING coordsStr;
+ CoordinatesToGeoJson(coords, coordsStr);
+
+ str += coordsStr;
+
+ bFirst = false;
+ }
+
+ str += L"]";
+}
+
+void MgGeoJsonWriter::MultiPolygonToGeoJson(MgMultiPolygon* multi, REFSTRING str)
+{
+ str = L"[";
+
+ bool bFirst = true;
+ INT32 count = multi->GetCount();
+ for (INT32 i = 0; i < count; i++)
+ {
+ if (!bFirst)
+ str += L",";
+
+ Ptr<MgPolygon> poly = multi->GetPolygon(i);
+ STRING strPoly;
+
+ PolygonToGeoJson(poly, strPoly);
+
+ str += strPoly;
+
+ bFirst = false;
+ }
+
+ str += L"]";
+}
+
+void MgGeoJsonWriter::Dispose()
+{
+ delete this;
+}
\ No newline at end of file
Copied: trunk/MgDev/Common/PlatformBase/Services/GeoJsonWriter.h (from rev 9180, sandbox/jng/clean_json/Common/PlatformBase/Services/GeoJsonWriter.h)
===================================================================
--- trunk/MgDev/Common/PlatformBase/Services/GeoJsonWriter.h (rev 0)
+++ trunk/MgDev/Common/PlatformBase/Services/GeoJsonWriter.h 2017-04-27 12:44:20 UTC (rev 9181)
@@ -0,0 +1,129 @@
+//
+// Copyright (C) 2004-2017 by Autodesk, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of version 2.1 of the GNU Lesser
+// General Public License as published by the Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+#ifndef _MGGEOJSONWRITER_H
+#define _MGGEOJSONWRITER_H
+
+/// \defgroup MgGeoJsonWriter MgGeoJsonWriter
+/// \ingroup Feature_Service_classes
+/// \{
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// A helper class to output GeoJSON from feature readers
+///
+class MG_PLATFORMBASE_API MgGeoJsonWriter : public MgGuardDisposable
+{
+PUBLISHED_API:
+ //////////////////////////////////////////////////////////////////
+ /// \brief
+ /// Constructs a MgGeoJsonWriter object
+ ///
+ /// <!-- Syntax in .Net, Java, and PHP -->
+ /// \htmlinclude DotNetSyntaxTop.html
+ /// MgGeoJsonWriter();
+ /// \htmlinclude SyntaxBottom.html
+ /// \htmlinclude JavaSyntaxTop.html
+ /// MgGeoJsonWriter();
+ /// \htmlinclude SyntaxBottom.html
+ /// \htmlinclude PHPSyntaxTop.html
+ /// MgGeoJsonWriter();
+ /// \htmlinclude SyntaxBottom.html
+ ///
+ MgGeoJsonWriter();
+
+ //////////////////////////////////////////////////////////////////
+ /// \brief
+ /// Converts the current feature in the given feature reader to GeoJSON
+ ///
+ /// \remarks
+ /// The id and geometry properties are inferred from the class definition returned by the feature reader
+ ///
+ /// <!-- Syntax in .Net, Java, and PHP -->
+ /// \htmlinclude DotNetSyntaxTop.html
+ /// string FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform);
+ /// \htmlinclude SyntaxBottom.html
+ /// \htmlinclude JavaSyntaxTop.html
+ /// String FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform);
+ /// \htmlinclude SyntaxBottom.html
+ /// \htmlinclude PHPSyntaxTop.html
+ /// string FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform);
+ /// \htmlinclude SyntaxBottom.html
+ ///
+ /// \param featureReader (MgFeatureReader)
+ /// The feature reader
+ ///
+ /// \param transform (MgTransform)
+ /// An optional transform
+ ///
+ /// \return
+ /// Returns the GeoJSON output as a string.
+ ///
+ STRING FeatureToGeoJson(MgFeatureReader* featureReader, MgTransform* transform);
+
+ //////////////////////////////////////////////////////////////////
+ /// \brief
+ /// Converts the current feature in the given feature reader to GeoJSON
+ ///
+ /// <!-- Syntax in .Net, Java, and PHP -->
+ /// \htmlinclude DotNetSyntaxTop.html
+ /// string FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform, string idPropertyName, string geomPropName);
+ /// \htmlinclude SyntaxBottom.html
+ /// \htmlinclude JavaSyntaxTop.html
+ /// String FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform, String idPropertyName, String geomPropName);
+ /// \htmlinclude SyntaxBottom.html
+ /// \htmlinclude PHPSyntaxTop.html
+ /// string FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform, string idPropertyName, string geomPropName);
+ /// \htmlinclude SyntaxBottom.html
+ ///
+ /// \param featureReader (MgFeatureReader)
+ /// The feature reader
+ ///
+ /// \param transform (MgTransform)
+ /// An optional transform
+ ///
+ /// \param idPropertyName (String/string)
+ /// The name of the id property. The value of the property specified will be written to the top-level "id" property of the GeoJSON
+ ///
+ /// \param geomPropName (String/string)
+ /// The name of the geometry property. The value of the property specified will be written to the top-level "geometry" property
+ /// of the GeoJSON. If this property is not specified, no geometry is written.
+ ///
+ /// \return
+ /// Returns the GeoJSON output as a string.
+ ///
+ STRING FeatureToGeoJson(MgReader* reader, MgTransform* transform, CREFSTRING idPropertyName, CREFSTRING geomPropName);
+
+protected:
+ virtual void Dispose();
+
+private:
+ static STRING EscapeJsonString(CREFSTRING str);
+ void ValueToString(MgReader* reader, INT32 index, REFSTRING str);
+ void ToGeoJson(MgGeometry* geom, REFSTRING str, bool bIncludePrefix = true);
+ void CoordinateToGeoJson(MgCoordinate* coord, REFSTRING str);
+ void CoordinatesToGeoJson(MgCoordinateIterator* coords, REFSTRING str);
+ void PolygonToGeoJson(MgPolygon* poly, REFSTRING str);
+ void MultiPointToGeoJson(MgMultiPoint* multi, REFSTRING str);
+ void MultiLineStringToGeoJson(MgMultiLineString* multi, REFSTRING str);
+ void MultiPolygonToGeoJson(MgMultiPolygon* multi, REFSTRING str);
+
+ Ptr<MgAgfReaderWriter> m_agfRw;
+};
+/// \}
+
+#endif
\ No newline at end of file
Copied: trunk/MgDev/Common/Schema/ClassDefinition-3.3.0.xsd (from rev 9180, sandbox/jng/clean_json/Common/Schema/ClassDefinition-3.3.0.xsd)
===================================================================
--- trunk/MgDev/Common/Schema/ClassDefinition-3.3.0.xsd (rev 0)
+++ trunk/MgDev/Common/Schema/ClassDefinition-3.3.0.xsd 2017-04-27 12:44:20 UTC (rev 9181)
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:element name="ClassDefinition" type="ClassDefinition">
+ <xs:annotation>
+ <xs:documentation>A FDO Class Definition.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:complexType name="ClassDefinition">
+ <xs:annotation>
+ <xs:documentation>A FDO Class Definition.</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="Name" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>The name of this class definition</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Description" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>The description of this class definition</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="IsAbstract" type="xs:boolean">
+ <xs:annotation>
+ <xs:documentation>Indicates if this class definition is abstract</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="IsComputed" type="xs:boolean">
+ <xs:annotation>
+ <xs:documentation>Indicates if this class definition is computed</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="DefaultGeometryPropertyName" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>The name of the designated geometry property of this class definition</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Properties" type="PropertyDefinitionCollection">
+ <xs:annotation>
+ <xs:documentation>The collection of properties in this class definition</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="PropertyDefinitionCollection">
+ <xs:annotation>
+ <xs:documentation>A collection of property definitions</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="Property" type="PropertyDefinition" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="PropertyDefinition">
+ <xs:annotation>
+ <xs:documentation>A FDO property definition</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="Name" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>The name of this property definition</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Description" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>The description of this property definition</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="PropertyType" type="xs:integer">
+ <xs:annotation>
+ <xs:documentation>The type of this property definition. The value here is within the same set of values from MgFeaturePropertyType</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="IsIdentity" type="xs:boolean">
+ <xs:annotation>
+ <xs:documentation>Indicates if this property is an identity property</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="DataType" type="xs:integer" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The data type of this data property. The value here is within the same set of values from MgPropertyType. Only applicable if this is a data property</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="DefaultValue" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The default value for this data property. Only applicable if this is a data property and the data type is string</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Length" type="xs:integer" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The maximum length for this data property. Only applicable if this is a data property and the data type is string</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Nullable" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Indicates if this property is nullable. Only applicable if this is a raster or data property.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="ReadOnly" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Indicates if this property is read-only. Only applicable if this is a raster, geometry or data property.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="IsAutoGenerated" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Indicates if this property is auto-generated. Only applicable if this is a data property and the data type is int.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Precision" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The precision (total number of digits) of this property. Only applicable if this is a data property and the data type is decimal.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Scale" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The scale (number of digits to the right of the decimal point) of this property. Only applicable if this is a data property and the data type is decimal.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="SpatialContextAssociation" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The spatial context name associated with this geometric property. Only applicable if this is a raster or geometry property.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="GeometryTypes" type="xs:integer" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>A bitmask that indicates the types which specify the categories of the geometries (point, line, surface, solid) that can be stored in this geometric property. Values here come from MgFeatureGeometricType.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="SpecificGeometryTypes" type="GeometryTypeInfo" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Indicates the specific geometry types that can be stored in this geometric property. Values here come from MgGeometryType.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="HasElevation" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Indicates if this property has elevation. Only applicable if this is a geometry property.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="HasMeasure" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Indicates if this property has measure. Only applicable if this is a geometry property.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="DefaultImageXSize" type="xs:integer" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The default size of the image file in the horizontal direction, in pixels (number of columns)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="DefaultImageYSize" type="xs:integer" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The default size of the image file in the vertical direction, in pixels (number of rows).</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="GeometryTypeInfo">
+ <xs:annotation>
+ <xs:documentation>Defines a list of geometric types</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="Type" type="xs:integer" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
\ No newline at end of file
Copied: trunk/MgDev/Common/Schema/FeatureSchemaCollection-3.3.0.xsd (from rev 9180, sandbox/jng/clean_json/Common/Schema/FeatureSchemaCollection-3.3.0.xsd)
===================================================================
--- trunk/MgDev/Common/Schema/FeatureSchemaCollection-3.3.0.xsd (rev 0)
+++ trunk/MgDev/Common/Schema/FeatureSchemaCollection-3.3.0.xsd 2017-04-27 12:44:20 UTC (rev 9181)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:include schemaLocation="ClassDefinition-3.3.0.xsd"/>
+ <xs:element name="FeatureSchemaCollection" type="FeatureSchemaCollection">
+ <xs:annotation>
+ <xs:documentation>A FDO Feature Schema Definition.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:complexType name="FeatureSchemaCollection">
+ <xs:sequence>
+ <xs:element name="FeatureSchema" type="FeatureSchema" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>The feature schemas in this collection</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="FeatureSchema">
+ <xs:annotation>
+ <xs:documentation>A FDO Feature Schema.</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="Name" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>The name of this feature schema</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Description" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>The description of this feature schema</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Classes" type="ClassDefinitionCollection">
+ <xs:annotation>
+ <xs:documentation>The collection of classes in this schema</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="ClassDefinitionCollection">
+ <xs:annotation>
+ <xs:documentation>A collection of FDO class definitions</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="ClassDefinition" type="ClassDefinition" />
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
\ No newline at end of file
Property changes on: trunk/MgDev/Desktop
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/2.4/MgDev/Desktop:7152
/branches/2.5/MgDev/Desktop:7511
/branches/2.6/MgDev/Desktop:8276-8286,8314-8315
/branches/3.0/MgDev/Desktop:8710
/sandbox/jng/convenience_apis/Desktop:8271-8363
/sandbox/jng/createruntimemap/Desktop:7486-7555
/sandbox/jng/dwftk/Desktop:8321-8324,8328-8329,8331,8352
/sandbox/jng/geos34x/Desktop:8256-8259
/sandbox/jng/v30/Desktop:8215-8216,8218-8219
/sandbox/rfc94/Desktop:5099-5163
+ /branches/2.4/MgDev/Desktop:7152
/branches/2.5/MgDev/Desktop:7511
/branches/2.6/MgDev/Desktop:8276-8286,8314-8315
/branches/3.0/MgDev/Desktop:8710
/sandbox/jng/clean_json/Desktop:8818-9180
/sandbox/jng/convenience_apis/Desktop:8271-8363
/sandbox/jng/createruntimemap/Desktop:7486-7555
/sandbox/jng/dwftk/Desktop:8321-8324,8328-8329,8331,8352
/sandbox/jng/geos34x/Desktop:8256-8259
/sandbox/jng/v30/Desktop:8215-8216,8218-8219
/sandbox/rfc94/Desktop:5099-5163
Modified: trunk/MgDev/Server/src/Services/Feature/FeatureOperationFactory.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/FeatureOperationFactory.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Server/src/Services/Feature/FeatureOperationFactory.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -160,6 +160,7 @@
{
case VERSION_SUPPORTED(1,0):
case VERSION_SUPPORTED(2,0):
+ case VERSION_SUPPORTED(3,3): //This is 2.0 with optional clean JSON output
handler.reset(new MgOpGetCapabilities());
break;
default:
Modified: trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -277,7 +277,9 @@
MG_LOG_TRACE_ENTRY(L"MgServerFeatureService::GetCapabilities()");
Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
- if (userInfo->GetApiVersion() != MG_API_VERSION(1,0,0) && userInfo->GetApiVersion() != MG_API_VERSION(2,0,0))
+ if (userInfo->GetApiVersion() != MG_API_VERSION(1,0,0) &&
+ userInfo->GetApiVersion() != MG_API_VERSION(2,0,0) &&
+ userInfo->GetApiVersion() != MG_API_VERSION(3,3,0)) //This is 2.0.0 with optional clean JSON output
{
throw new MgInvalidOperationVersionException(
L"MgServerFeatureService.GetCapabilities", __LINE__, __WFILE__, NULL, L"", NULL);
Property changes on: trunk/MgDev/Server/src/Services/Mapping/MappingUtil.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/2.4/MgDev/Server/src/Services/Mapping/MappingUtil.cpp:6738-6741,6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev/Server/src/Services/Mapping/MappingUtil.cpp:8365
/sandbox/adsk/2.4j/Server/src/Services/Mapping/MappingUtil.cpp:6327-6535
/sandbox/adsk/3.1n/Server/src/Services/Mapping/MappingUtil.cpp:8942
/sandbox/jng/createruntimemap/Server/src/Services/Mapping/MappingUtil.cpp:7486-7555
/sandbox/rfc94/Server/src/Services/Mapping/MappingUtil.cpp:5099-5163
/trunk/MgDev/Server/src/Services/Mapping/MappingUtil.cpp:6250-6326
+ /branches/2.4/MgDev/Server/src/Services/Mapping/MappingUtil.cpp:6738-6741,6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev/Server/src/Services/Mapping/MappingUtil.cpp:8365
/sandbox/adsk/2.4j/Server/src/Services/Mapping/MappingUtil.cpp:6327-6535
/sandbox/adsk/3.1n/Server/src/Services/Mapping/MappingUtil.cpp:8942
/sandbox/jng/clean_json/Server/src/Services/Mapping/MappingUtil.cpp:8818-9180
/sandbox/jng/createruntimemap/Server/src/Services/Mapping/MappingUtil.cpp:7486-7555
/sandbox/rfc94/Server/src/Services/Mapping/MappingUtil.cpp:5099-5163
Modified: trunk/MgDev/Server/src/UnitTesting/TestMisc.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestMisc.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Server/src/UnitTesting/TestMisc.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -593,6 +593,26 @@
}
}
+void TestMisc::TestCase_ApiVersionCheck()
+{
+ try
+ {
+ //Just making sure this macro behaves as we expect
+ CPPUNIT_ASSERT_MESSAGE("Expected 3.4.0 >= 3.3.0", MG_API_VERSION(3, 4, 0) >= MG_API_VERSION(3, 3, 0));
+ CPPUNIT_ASSERT_MESSAGE("Expected 3.3.0 >= 3.3.0", MG_API_VERSION(3, 3, 0) >= MG_API_VERSION(3, 3, 0));
+ }
+ catch (MgException* e)
+ {
+ STRING message = e->GetDetails(TEST_LOCALE);
+ SAFE_RELEASE(e);
+ CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+ }
+ catch (...)
+ {
+ throw;
+ }
+}
+
void TestMisc::TestCase_MapLayerCollections()
{
try
Modified: trunk/MgDev/Server/src/UnitTesting/TestMisc.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestMisc.h 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Server/src/UnitTesting/TestMisc.h 2017-04-27 12:44:20 UTC (rev 9181)
@@ -30,6 +30,7 @@
CPPUNIT_TEST(TestCase_833);
CPPUNIT_TEST(TestCase_1304);
CPPUNIT_TEST(TestCase_MapLayerCollections);
+ CPPUNIT_TEST(TestCase_ApiVersionCheck);
CPPUNIT_TEST(TestEnd); // This must be the very last unit test
CPPUNIT_TEST_SUITE_END();
@@ -49,6 +50,7 @@
void TestCase_1304();
void TestCase_MapLayerCollections();
void TestCase_CreateMapWithInitialDisplayParams();
+ void TestCase_ApiVersionCheck();
private:
Ptr<MgSiteConnection> m_siteConnection;
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/csenumeratecategoriesform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/csenumeratecategoriesform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/csenumeratecategoriesform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -24,6 +24,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/csenumeratecoordinatesystemsform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/csenumeratecoordinatesystemsform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/csenumeratecoordinatesystemsform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -26,6 +26,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/describedrawingform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/describedrawingform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/describedrawingform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -26,6 +26,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/describeschemaform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/describeschemaform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/describeschemaform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -30,6 +30,10 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
+ Simple: <input type="text" name="SIMPLE" value="0" ID="TextSimple">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratecontainersform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratecontainersform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratecontainersform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -20,6 +20,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+<p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratecoordinatesystemsform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratecoordinatesystemsform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratecoordinatesystemsform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -12,7 +12,14 @@
<form name="input" action="" method="get" ID="Form1">
<b>Category:</b>
<input type="text" name="CATEGORY" value="Lat Longs" size="50" ID="Text1"><br>
+ <p> Format:
+ <select name="FORMAT">
+ <option value="text/xml">text/xml</option>
+ <option value="application/json">application/json</option>
+ </select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="button" value="Execute" onclick="Execute(CATEGORY.value)">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedatastoresform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedatastoresform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedatastoresform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -27,6 +27,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</P>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedrawinglayers.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedrawinglayers.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedrawinglayers.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -27,6 +27,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedrawingsectionresources.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedrawingsectionresources.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedrawingsectionresources.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -22,6 +22,8 @@
<option value="text/xml">text/xml</option>
<option value="application/json">application/json</option>
</select>
+ <p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
<P>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</FORM>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedrawingsections.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedrawingsections.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratedrawingsections.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -21,6 +21,9 @@
<option value="text/xml">text/xml</option>
<option value="application/json">application/json</option>
</select>
+ <p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ </P>
<p><input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset"></p>
</FORM>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerategroupsform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerategroupsform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerategroupsform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -20,6 +20,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+<p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset"></form>
</body>
</html>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeraterepositoriesform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeraterepositoriesform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeraterepositoriesform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -22,6 +22,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+<p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateresourcedataform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateresourcedataform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateresourcedataform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -22,6 +22,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+<p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateresourcereferencesform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateresourcereferencesform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateresourcereferencesform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -22,6 +22,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+<p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateresourcesform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateresourcesform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateresourcesform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -28,6 +28,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+<p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratetemplatesform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratetemplatesform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratetemplatesform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -20,6 +20,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+<p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateunmanageddataform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateunmanageddataform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateunmanageddataform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -37,6 +37,8 @@
<option value="text/xml">text/xml</option>
<option value="application/json">application/json</option>
</select>
+<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
<p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateusersform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateusersform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumerateusersform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -22,6 +22,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+<p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratewidgetsform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratewidgetsform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/enumeratewidgetsform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -21,6 +21,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+<p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getcapabilitiesform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getcapabilitiesform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getcapabilitiesform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -28,6 +28,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getclassdefinitionform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getclassdefinitionform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getclassdefinitionform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -30,6 +30,10 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
+ Simple: <input type="text" name="SIMPLE" value="0" ID="TextSimple">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getclassesform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getclassesform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getclassesform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -28,6 +28,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getconnectpropertyvaluesform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getconnectpropertyvaluesform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getconnectpropertyvaluesform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -30,6 +30,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getfdocacheinfoform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getfdocacheinfoform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getfdocacheinfoform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -23,6 +23,8 @@
<option value="text/xml">text/xml</option>
<option value="application/json">application/json</option>
</select>
+ <p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
<p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getfeatureprovidersform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getfeatureprovidersform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getfeatureprovidersform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -24,6 +24,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getidentitypropertiesform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getidentitypropertiesform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getidentitypropertiesform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -30,6 +30,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getlongtransactionsform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getlongtransactionsform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getlongtransactionsform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -28,6 +28,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getrepositorycontentform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getrepositorycontentform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getrepositorycontentform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -22,6 +22,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+<p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getrepositoryheaderform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getrepositoryheaderform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getrepositoryheaderform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -22,6 +22,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+<p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getresourcecontentform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getresourcecontentform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getresourcecontentform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -22,6 +22,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+<p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getresourceheaderform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getresourceheaderform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getresourceheaderform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -22,6 +22,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+<p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getschemamappingform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getschemamappingform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getschemamappingform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -27,6 +27,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</P>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getschemasform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getschemasform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getschemasform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -26,6 +26,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteinfoform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteinfoform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteinfoform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -24,6 +24,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getsitestatusform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getsitestatusform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getsitestatusform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -24,6 +24,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteversionform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteversionform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteversionform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -24,6 +24,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getspatialcontextsform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getspatialcontextsform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getspatialcontextsform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -28,6 +28,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/gettileprovidersform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/gettileprovidersform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/gettileprovidersform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -19,6 +19,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</div>
</form>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getvisiblemapextentform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getvisiblemapextentform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getvisiblemapextentform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -49,6 +49,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</div>
</form>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/selectaggregatesform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/selectaggregatesform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/selectaggregatesform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -36,6 +36,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/selectfeaturesform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/selectfeaturesform.html 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/selectfeaturesform.html 2017-04-27 12:44:20 UTC (rev 9181)
@@ -36,6 +36,8 @@
<option value="application/json">application/json</option>
</select>
<p>
+ Clean JSON: <input type="text" name="CLEAN" value="0" ID="TextClean">
+ <p>
<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
</form>
</body>
Modified: trunk/MgDev/Web/src/DotNetUnmanagedApi/PlatformBase/PlatformBaseApiGen.xml
===================================================================
--- trunk/MgDev/Web/src/DotNetUnmanagedApi/PlatformBase/PlatformBaseApiGen.xml 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/DotNetUnmanagedApi/PlatformBase/PlatformBaseApiGen.xml 2017-04-27 12:44:20 UTC (rev 9181)
@@ -146,6 +146,7 @@
<Header path="../../../../Common/PlatformBase/Services/FeatureSchema.h" />
<Header path="../../../../Common/PlatformBase/Services/FeatureSchemaCollection.h" />
<Header path="../../../../Common/PlatformBase/Services/FeatureService.h" />
+ <Header path="../../../../Common/PlatformBase/Services/GeoJsonWriter.h" />
<Header path="../../../../Common/PlatformBase/Services/GeometricPropertyDefinition.h" />
<Header path="../../../../Common/PlatformBase/Services/GeometryProperty.h" />
<Header path="../../../../Common/PlatformBase/Services/GeometryTypeInfo.h" />
Modified: trunk/MgDev/Web/src/HttpHandler/HttpCreateRuntimeMap.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpCreateRuntimeMap.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/HttpCreateRuntimeMap.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -139,7 +139,8 @@
// There are multiple supported versions
INT32 version = m_userInfo->GetApiVersion();
if (version != MG_API_VERSION(2,6,0) &&
- version != MG_API_VERSION(3,0,0))
+ version != MG_API_VERSION(3,0,0) &&
+ version != MG_API_VERSION(3,3,0))
{
throw new MgInvalidOperationVersionException(
L"MgHttpCreateRuntimeMap.ValidateOperationVersion", __LINE__, __WFILE__, NULL, L"", NULL);
Modified: trunk/MgDev/Web/src/HttpHandler/HttpDescribeRuntimeMap.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpDescribeRuntimeMap.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/HttpDescribeRuntimeMap.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -119,7 +119,8 @@
// There are multiple supported versions
INT32 version = m_userInfo->GetApiVersion();
if (version != MG_API_VERSION(2,6,0) &&
- version != MG_API_VERSION(3,0,0))
+ version != MG_API_VERSION(3,0,0) &&
+ version != MG_API_VERSION(3,3,0))
{
throw new MgInvalidOperationVersionException(
L"MgHttpDescribeRuntimeMap.ValidateOperationVersion", __LINE__, __WFILE__, NULL, L"", NULL);
Modified: trunk/MgDev/Web/src/HttpHandler/HttpDescribeSchema.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpDescribeSchema.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/HttpDescribeSchema.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -41,6 +41,17 @@
m_schemaName = params->GetParameterValue(MgHttpResourceStrings::reqFeatSchema);
m_classNames = MgStringCollection::ParseCollection(
params->GetParameterValue(MgHttpResourceStrings::reqFeatClassNames), L".");
+
+ m_bSimple = false;
+ // Get simple flag (SIMPLE). Only recognize this flag for 3.3.0 and above
+ if (m_userInfo->GetApiVersion() >= MG_API_VERSION(3, 3, 0))
+ {
+ STRING simple = params->GetParameterValue(MgHttpResourceStrings::reqFeatSimple);
+ if (simple.length() > 0)
+ {
+ m_bSimple = (simple == L"1");
+ }
+ }
}
/// <summary>
@@ -64,13 +75,24 @@
// Create Proxy Feature Service instance
Ptr<MgFeatureService> service = (MgFeatureService*)(CreateService(MgServiceType::FeatureService));
- // Call the C++ API.
- STRING xmlSchema = service->DescribeSchemaAsXml(m_resource, m_schemaName, m_classNames);
-
- // Convert to multibyte
string mbXmlSchema;
- MgUtil::WideCharToMultiByte(xmlSchema, mbXmlSchema);
+ if (m_bSimple)
+ {
+ // Call the C++ API.
+ Ptr<MgFeatureSchemaCollection> schemas = service->DescribeSchema(m_resource, m_schemaName, m_classNames);
+ // Get the simple XML
+ schemas->ToSimpleXml(mbXmlSchema);
+ }
+ else
+ {
+ // Call the C++ API.
+ STRING xmlSchema = service->DescribeSchemaAsXml(m_resource, m_schemaName, m_classNames);
+
+ // Convert to multibyte
+ MgUtil::WideCharToMultiByte(xmlSchema, mbXmlSchema);
+ }
+
// Create a byte reader.
Ptr<MgByteReader> byteReader = MgUtil::GetByteReader(mbXmlSchema, (STRING*)&MgMimeType::Xml);
Modified: trunk/MgDev/Web/src/HttpHandler/HttpDescribeSchema.h
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpDescribeSchema.h 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/HttpDescribeSchema.h 2017-04-27 12:44:20 UTC (rev 9181)
@@ -47,6 +47,7 @@
Ptr<MgResourceIdentifier> m_resource;
STRING m_schemaName;
Ptr<MgStringCollection> m_classNames;
+ bool m_bSimple;
};
#endif // HTTPDESCRIBESCHEMA_H_
Modified: trunk/MgDev/Web/src/HttpHandler/HttpGetClassDefinition.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpGetClassDefinition.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/HttpGetClassDefinition.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -36,6 +36,17 @@
Ptr<MgHttpRequestParam> params = hRequest->GetRequestParam();
m_resId = params->GetParameterValue(MgHttpResourceStrings::reqFeatResourceId);
+
+ m_bSimple = false;
+ // Get simple flag (SIMPLE). Only recognize this flag for 3.3.0 and above
+ if (m_userInfo->GetApiVersion() >= MG_API_VERSION(3, 3, 0))
+ {
+ STRING simple = params->GetParameterValue(MgHttpResourceStrings::reqFeatSimple);
+ if (simple.length() > 0)
+ {
+ m_bSimple = (simple == L"1");
+ }
+ }
}
/// <summary>
@@ -66,8 +77,16 @@
// call the C++ APIs
Ptr<MgClassDefinition> classDef = service->GetClassDefinition(&resId, schema, className);
string xml;
- classDef->ToXml(xml);
+ if (m_bSimple)
+ {
+ classDef->ToSimpleXml(xml, true);
+ }
+ else
+ {
+ classDef->ToXml(xml);
+ }
+
// Create a byte reader.
Ptr<MgByteReader> byteReader = MgUtil::GetByteReader(xml, (STRING*)&MgMimeType::Xml);
Modified: trunk/MgDev/Web/src/HttpHandler/HttpGetClassDefinition.h
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpGetClassDefinition.h 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/HttpGetClassDefinition.h 2017-04-27 12:44:20 UTC (rev 9181)
@@ -45,6 +45,7 @@
private:
STRING m_resId;
+ bool m_bSimple;
};
#endif // _FS_GET_CLASS_DEFINITION_H
Modified: trunk/MgDev/Web/src/HttpHandler/HttpGetTileProviders.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpGetTileProviders.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/HttpGetTileProviders.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -51,7 +51,7 @@
ValidateCommonParameters();
INT32 version = m_userInfo->GetApiVersion();
- if (version == MG_API_VERSION(3,0,0))
+ if (version >= MG_API_VERSION(3,0,0))
{
// Get Proxy Tile Service instance
Ptr<MgTileService> service = (MgTileService*)(CreateService(MgServiceType::TileService));
@@ -80,7 +80,8 @@
// There are multiple supported versions
INT32 version = m_userInfo->GetApiVersion();
- if (version != MG_API_VERSION(3,0,0))
+ if (version != MG_API_VERSION(3,0,0) &&
+ version != MG_API_VERSION(3,3,0))
{
throw new MgInvalidOperationVersionException(
L"MgHttpGetTileProviders.ValidateOperationVersion", __LINE__, __WFILE__, NULL, L"", NULL);
Modified: trunk/MgDev/Web/src/HttpHandler/HttpQueryMapFeatures.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpQueryMapFeatures.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/HttpQueryMapFeatures.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -72,7 +72,7 @@
m_featureFilter = params->GetParameterValue(MgHttpResourceStrings::reqRenderingFeatureFilter);
INT32 version = m_userInfo->GetApiVersion();
- if (version == MG_API_VERSION(2,6,0))
+ if (version >= MG_API_VERSION(2,6,0))
{
m_requestData = 0;
STRING strReqData = params->GetParameterValue(MgHttpResourceStrings::reqRenderingRequestData);
@@ -142,7 +142,7 @@
{
featureDescriptionInfo = controller.QueryMapFeatures(m_mapName, layerNames, filterGeometry, selectionVariant, m_featureFilter, m_maxFeatures, m_persist, m_layerAttributeFilter);
}
- else if (version == MG_API_VERSION(2, 6, 0))
+ else if (version >= MG_API_VERSION(2, 6, 0))
{
featureDescriptionInfo = controller.QueryMapFeatures(m_mapName, layerNames, filterGeometry, selectionVariant, m_featureFilter, m_maxFeatures, m_persist, m_layerAttributeFilter, m_requestData, m_selectionColor, m_selectionFormat);
}
@@ -167,7 +167,8 @@
// There are multiple supported versions
INT32 version = m_userInfo->GetApiVersion();
if (version != MG_API_VERSION(1,0,0) &&
- version != MG_API_VERSION(2,6,0))
+ version != MG_API_VERSION(2,6,0) &&
+ version != MG_API_VERSION(3,3,0))
{
throw new MgInvalidOperationVersionException(
L"MgHttpQueryMapFeatures.ValidateOperationVersion", __LINE__, __WFILE__, NULL, L"", NULL);
Modified: trunk/MgDev/Web/src/HttpHandler/HttpRequestResponseHandler.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpRequestResponseHandler.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/HttpRequestResponseHandler.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -35,6 +35,8 @@
{
MG_HTTP_HANDLER_TRY()
+ m_bCleanJson = false;
+
// Check that this HTTP operation is enabled in webconfig.ini
STRING disableProperty;
switch (GetRequestClassification())
@@ -178,6 +180,16 @@
m_userInfo->SetClientIp(clientIp);
}
+ // Get clean json flag (CLEAN). Only recognize this flag for 3.3.0 and above
+ if (version >= MG_API_VERSION(3, 3, 0))
+ {
+ STRING cleanJson = hrParam->GetParameterValue(MgHttpResourceStrings::reqClean);
+ if (cleanJson.length() > 0)
+ {
+ m_bCleanJson = (cleanJson == L"1");
+ }
+ }
+
// Short circuit the authentication check if no username or session is supplied.
// This will ensure that load balancing works correctly if browsers send an
// unauthenticated then an authenticated request.
@@ -231,7 +243,8 @@
if (version != MG_API_VERSION(1,0,0) &&
version != MG_API_VERSION(1,2,0) &&
version != MG_API_VERSION(2,0,0) &&
- version != MG_API_VERSION(2,2,0))
+ version != MG_API_VERSION(2,2,0) &&
+ version != MG_API_VERSION(3,3,0))
{
throw new MgInvalidOperationVersionException(
L"MgHttpRequestResponseHandler.ValidateOperationVersion", __LINE__, __WFILE__, NULL, L"", NULL);
@@ -275,6 +288,6 @@
m_responseFormat == MgMimeType::Json)
{
MgXmlJsonConvert convert;
- convert.ToJson(byteReader);
+ convert.ToJson(byteReader, m_bCleanJson);
}
}
Modified: trunk/MgDev/Web/src/HttpHandler/HttpRequestResponseHandler.h
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpRequestResponseHandler.h 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/HttpRequestResponseHandler.h 2017-04-27 12:44:20 UTC (rev 9181)
@@ -125,6 +125,7 @@
Ptr<MgHttpRequest> m_hRequest;
STRING m_version;
STRING m_responseFormat;
+ bool m_bCleanJson;
Ptr<MgUserInformation> m_userInfo;
Ptr<MgSiteConnection> m_siteConn;
};
Modified: trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -82,6 +82,7 @@
const STRING MgHttpResourceStrings::reqClientAgent = L"CLIENTAGENT";
const STRING MgHttpResourceStrings::reqClientIp = L"CLIENTIP";
const STRING MgHttpResourceStrings::reqResponseFormat = L"FORMAT";
+const STRING MgHttpResourceStrings::reqClean = L"CLEAN";
// Predefined Resource Service Request Parameters
const STRING MgHttpResourceStrings::reqType = L"TYPE";
@@ -152,6 +153,7 @@
const STRING MgHttpResourceStrings::reqFeatActiveOnly = L"ACTIVEONLY";
const STRING MgHttpResourceStrings::reqFeatComputedProperties = L"COMPUTED_PROPERTIES";
const STRING MgHttpResourceStrings::reqFeatComputedAliases = L"COMPUTED_ALIASES";
+const STRING MgHttpResourceStrings::reqFeatSimple = L"SIMPLE";
// Feature Service Operation Requests
const STRING MgHttpResourceStrings::opGetFeatureProviders = L"GETFEATUREPROVIDERS";
Modified: trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.h
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.h 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.h 2017-04-27 12:44:20 UTC (rev 9181)
@@ -86,6 +86,7 @@
static const STRING reqClientAgent;
static const STRING reqClientIp;
static const STRING reqResponseFormat;
+ static const STRING reqClean;
// PREDEFINED RESOURCE REQUEST PARAMETERS
static const STRING reqType;
@@ -127,6 +128,7 @@
static const STRING reqFeatActiveOnly;
static const STRING reqFeatComputedProperties;
static const STRING reqFeatComputedAliases;
+ static const STRING reqFeatSimple;
// PREDEFINED DRAWING REQUEST PARAMETERS
static const STRING reqDrawingResourceId;
Modified: trunk/MgDev/Web/src/HttpHandler/HttpSelectFeatures.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpSelectFeatures.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/HttpSelectFeatures.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -110,7 +110,7 @@
Ptr<MgFeatureReader> featureReader = service->SelectFeatures(&resId, m_className, qryOptions);
//MgByteSource owns this and will clean it up when done
- ByteSourceImpl* bsImpl = new MgReaderByteSourceImpl(featureReader, m_responseFormat);
+ ByteSourceImpl* bsImpl = new MgReaderByteSourceImpl(featureReader, m_responseFormat, m_bCleanJson);
Ptr<MgByteSource> byteSource = new MgByteSource(bsImpl);
byteSource->SetMimeType(m_responseFormat);
Modified: trunk/MgDev/Web/src/HttpHandler/HttpSelectFeaturesSpatially.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpSelectFeaturesSpatially.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/HttpSelectFeaturesSpatially.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -120,7 +120,7 @@
Ptr<MgDataReader> dataReader = service->SelectAggregate(&resId, m_className, qryOptions);
//MgByteSource owns this and will clean it up when done
- ByteSourceImpl* bsImpl = new MgReaderByteSourceImpl(dataReader, m_responseFormat);
+ ByteSourceImpl* bsImpl = new MgReaderByteSourceImpl(dataReader, m_responseFormat, m_bCleanJson);
Ptr<MgByteSource> byteSource = new MgByteSource(bsImpl);
byteSource->SetMimeType(m_responseFormat);
Modified: trunk/MgDev/Web/src/HttpHandler/JsonDoc.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/JsonDoc.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/JsonDoc.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -112,6 +112,30 @@
node->Element[name] = value;
}
+void MgJsonDoc::Add(const char * name, double value)
+{
+ MgJsonNode *node = m_tree.top();
+ node->Element[StaticString(name)] = value;
+}
+
+void MgJsonDoc::Add(const string & name, double value)
+{
+ MgJsonNode *node = m_tree.top();
+ node->Element[name] = value;
+}
+
+void MgJsonDoc::Add(const char * name, INT32 value)
+{
+ MgJsonNode *node = m_tree.top();
+ node->Element[StaticString(name)] = (Json::Value::Int)value;
+}
+
+void MgJsonDoc::Add(const string & name, INT32 value)
+{
+ MgJsonNode *node = m_tree.top();
+ node->Element[name] = (Json::Value::Int)value;
+}
+
void MgJsonDoc::AddAttribute(const char *name, const char *value)
{
this->Add("@" + string(name), value);
@@ -142,6 +166,26 @@
this->Add("@" + name, value);
}
+void MgJsonDoc::AddAttribute(const char* name, double value)
+{
+ this->Add("@" + string(name), value);
+}
+
+void MgJsonDoc::AddAttribute(const string &name, double value)
+{
+ this->Add("@" + name, value);
+}
+
+void MgJsonDoc::AddAttribute(const char* name, INT32 value)
+{
+ this->Add("@" + string(name), value);
+}
+
+void MgJsonDoc::AddAttribute(const string &name, INT32 value)
+{
+ this->Add("@" + name, value);
+}
+
void MgJsonDoc::BeginArray(const char *name)
{
Value element(Json::arrayValue);
@@ -193,6 +237,24 @@
node->Element[index] = value;
}
+void MgJsonDoc::SetArrayValue(int index, bool value)
+{
+ MgJsonNode *node = m_tree.top();
+ node->Element[index] = Json::Value(value);
+}
+
+void MgJsonDoc::SetArrayValue(int index, double value)
+{
+ MgJsonNode *node = m_tree.top();
+ node->Element[index] = Json::Value(value);
+}
+
+void MgJsonDoc::SetArrayValue(int index, INT32 value)
+{
+ MgJsonNode *node = m_tree.top();
+ node->Element[index] = Json::Value(value);
+}
+
void MgJsonDoc::AppendArrayValue(const char *value)
{
MgJsonNode *node = m_tree.top();
Modified: trunk/MgDev/Web/src/HttpHandler/JsonDoc.h
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/JsonDoc.h 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/JsonDoc.h 2017-04-27 12:44:20 UTC (rev 9181)
@@ -77,12 +77,20 @@
void Add(const string &name, const string &value);
void Add(const char *name, bool value);
void Add(const string &name, bool value);
+ void Add(const char* name, double value);
+ void Add(const string &name, double value);
+ void Add(const char* name, INT32 value);
+ void Add(const string &name, INT32 value);
void AddAttribute(const char *name, const char *value);
void AddAttribute(const char *name, const string &value);
void AddAttribute(const string &name, const char *value);
void AddAttribute(const string &name, const string &value);
void AddAttribute(const char *name, bool value);
void AddAttribute(const string &name, bool value);
+ void AddAttribute(const char* name, double value);
+ void AddAttribute(const string &name, double value);
+ void AddAttribute(const char* name, INT32 value);
+ void AddAttribute(const string &name, INT32 value);
void BeginArray(const char *name);
void BeginArray(int size, const char *name);
@@ -90,6 +98,9 @@
void EndArray();
void SetArrayValue(int index, const char *value);
void SetArrayValue(int index, const string &value);
+ void SetArrayValue(int index, bool value);
+ void SetArrayValue(int index, double value);
+ void SetArrayValue(int index, INT32 value);
void AppendArrayValue(const char *value);
void AppendArrayValue(const string &value);
Modified: trunk/MgDev/Web/src/HttpHandler/ReaderByteSourceImpl.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/ReaderByteSourceImpl.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/ReaderByteSourceImpl.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -17,7 +17,7 @@
#include "ReaderByteSourceImpl.h"
#include "PlatformBase.h"
-MgReaderByteSourceImpl::MgReaderByteSourceImpl(MgReader* reader, CREFSTRING format)
+MgReaderByteSourceImpl::MgReaderByteSourceImpl(MgReader* reader, CREFSTRING format, bool bCleanJson)
{
m_reader = SAFE_ADDREF(reader);
m_format = format;
@@ -26,6 +26,7 @@
m_bReadHeader = false;
m_bInternalReaderHasMore = true;
m_bFirstRecord = true;
+ m_bCleanJson = bCleanJson;
}
MgReaderByteSourceImpl::~MgReaderByteSourceImpl()
@@ -62,51 +63,67 @@
{
if (m_format == MgMimeType::Json)
{
- //How this looks:
- //
- // { //outer JSON start
- // "ResponseElementName": //root element name
- // { //root JSON property start
- // <header JSON pair>,
- // "BodyElementName":[ //body JSON array start
- //
- jsonbuf = "{\"";
- jsonbuf += m_reader->GetResponseElementName();
- jsonbuf += "\":{";
- m_reader->HeaderToStringUtf8(buf);
- std::string jsonbuf2;
- MgXmlJsonConvert convert;
- convert.ToJson(buf, jsonbuf2);
- //This will have redudant outer { }, so strip them
- jsonbuf2.erase(0, 1);
- jsonbuf2.erase(jsonbuf2.length() - 2, 1);
- //HACK: To match the original output, we have to array-ify this object (crazy? yes!)
- //
- //We currently have something like this
- //
- // "HeaderElementName":{
- // <prop1>:<val1>,
- // <prop2>:<val2>
- // }
- //
- //We have to change it to this
- //
- // "HeaderElementName":[{
- // <prop1>:<val1>,
- // <prop2>:<val2>
- // }]
+ if (m_bCleanJson)
+ {
+ //How this looks:
+ //
+ // {
+ // "type":"FeatureCollection",
+ // "features": [
+ jsonbuf = "{";
+ jsonbuf += " \"type\": \"FeatureCollection\",";
+ jsonbuf += " \"features\": [";
- //Find first instance of ": and insert [ after it. We use ": because a feature
- //reader puts out xs:schema as the header element name
- jsonbuf2.insert(jsonbuf2.find("\":") + 2, "[");
- //Append ] to the end
- jsonbuf2.append("]");
- jsonbuf += jsonbuf2;
- jsonbuf += ",\"";
- jsonbuf += m_reader->GetBodyElementName();
- jsonbuf += "\":[";
+ m_buf += jsonbuf;
+ }
+ else
+ {
+ //How this looks:
+ //
+ // { //outer JSON start
+ // "ResponseElementName": //root element name
+ // { //root JSON property start
+ // <header JSON pair>,
+ // "BodyElementName":[ //body JSON array start
+ //
+ jsonbuf = "{\"";
+ jsonbuf += m_reader->GetResponseElementName();
+ jsonbuf += "\":{";
+ m_reader->HeaderToStringUtf8(buf);
+ std::string jsonbuf2;
+ MgXmlJsonConvert convert;
+ convert.ToJson(buf, jsonbuf2);
+ //This will have redudant outer { }, so strip them
+ jsonbuf2.erase(0, 1);
+ jsonbuf2.erase(jsonbuf2.length() - 2, 1);
+ //HACK: To match the original output, we have to array-ify this object (crazy? yes!)
+ //
+ //We currently have something like this
+ //
+ // "HeaderElementName":{
+ // <prop1>:<val1>,
+ // <prop2>:<val2>
+ // }
+ //
+ //We have to change it to this
+ //
+ // "HeaderElementName":[{
+ // <prop1>:<val1>,
+ // <prop2>:<val2>
+ // }]
- m_buf += jsonbuf;
+ //Find first instance of ": and insert [ after it. We use ": because a feature
+ //reader puts out xs:schema as the header element name
+ jsonbuf2.insert(jsonbuf2.find("\":") + 2, "[");
+ //Append ] to the end
+ jsonbuf2.append("]");
+ jsonbuf += jsonbuf2;
+ jsonbuf += ",\"";
+ jsonbuf += m_reader->GetBodyElementName();
+ jsonbuf += "\":[";
+
+ m_buf += jsonbuf;
+ }
m_bReadHeader = true;
}
else if (m_format == MgMimeType::Xml)
@@ -147,35 +164,62 @@
{
if (m_format == MgMimeType::Json)
{
- m_reader->CurrentToStringUtf8(buf);
- //The body is a valid full XML element, so no need for gymnastics like its
- //surrounding elements
- MgXmlJsonConvert convert;
- convert.ToJson(buf, jsonbuf);
+ if (m_bCleanJson)
+ {
+ MgGeoJsonWriter geoJsonWriter;
+ STRING sGeoJson;
+ if (m_reader->GetReaderType() == MgReaderType::FeatureReader)
+ {
+ MgFeatureReader* fr = static_cast<MgFeatureReader*>(m_reader.p);
+ sGeoJson = geoJsonWriter.FeatureToGeoJson(fr, NULL);
+ }
+ else
+ {
+ sGeoJson = geoJsonWriter.FeatureToGeoJson(m_reader, NULL, L"", L"");
+ }
- //Strip outer { }
- jsonbuf.erase(0, 1);
- jsonbuf.erase(jsonbuf.length() - 2, 1);
- //HACK: Same as the header, this needs to be array-ified to match the old output
- //
- //Find first instance of ": and insert [ after it.
- jsonbuf.insert(jsonbuf.find("\":") + 2, "[");
- //Append ] to the end
- jsonbuf.append("]");
- //Put back in outer { }
- jsonbuf = "{" + jsonbuf;
- jsonbuf += "}";
-
- if (!m_bFirstRecord)
- {
- m_buf += ",";
+ if (!m_bFirstRecord)
+ {
+ m_buf += ",";
+ }
+ else
+ {
+ m_bFirstRecord = false;
+ }
+ m_buf += MgUtil::WideCharToMultiByte(sGeoJson);
}
else
{
- m_bFirstRecord = false;
+ m_reader->CurrentToStringUtf8(buf);
+ //The body is a valid full XML element, so no need for gymnastics like its
+ //surrounding elements
+ MgXmlJsonConvert convert;
+ convert.ToJson(buf, jsonbuf);
+
+ //Strip outer { }
+ jsonbuf.erase(0, 1);
+ jsonbuf.erase(jsonbuf.length() - 2, 1);
+ //HACK: Same as the header, this needs to be array-ified to match the old output
+ //
+ //Find first instance of ": and insert [ after it.
+ jsonbuf.insert(jsonbuf.find("\":") + 2, "[");
+ //Append ] to the end
+ jsonbuf.append("]");
+ //Put back in outer { }
+ jsonbuf = "{" + jsonbuf;
+ jsonbuf += "}";
+
+ if (!m_bFirstRecord)
+ {
+ m_buf += ",";
+ }
+ else
+ {
+ m_bFirstRecord = false;
+ }
+
+ m_buf += jsonbuf;
}
-
- m_buf += jsonbuf;
}
else if (m_format == MgMimeType::Xml)
{
@@ -192,11 +236,21 @@
{
if (m_format == MgMimeType::Json)
{
- // How this looks:
- // ] //End of body JSON array
- // } //End of root JSON property
- // } //End of outer JSON
- m_buf += "]}}";
+ if (m_bCleanJson)
+ {
+ // How this looks:
+ // ] //End of root FeatureCollection
+ // } //End of GeoJSON
+ m_buf += "]}";
+ }
+ else
+ {
+ // How this looks:
+ // ] //End of body JSON array
+ // } //End of root JSON property
+ // } //End of outer JSON
+ m_buf += "]}}";
+ }
}
else if (m_format == MgMimeType::Xml)
{
Modified: trunk/MgDev/Web/src/HttpHandler/ReaderByteSourceImpl.h
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/ReaderByteSourceImpl.h 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/ReaderByteSourceImpl.h 2017-04-27 12:44:20 UTC (rev 9181)
@@ -29,7 +29,7 @@
DECLARE_CLASSNAME(MgReaderByteSourceImpl)
public:
- MgReaderByteSourceImpl(MgReader* reader, CREFSTRING format);
+ MgReaderByteSourceImpl(MgReader* reader, CREFSTRING format, bool bCleanJson);
virtual ~MgReaderByteSourceImpl();
///////////////////////////////////////////////////////////////////////////
@@ -85,6 +85,7 @@
Ptr<MgReader> m_reader;
STRING m_format;
+ bool m_bCleanJson;
bool m_bReadHeader;
bool m_bInternalReaderHasMore;
bool m_bFirstRecord;
Modified: trunk/MgDev/Web/src/HttpHandler/XmlJsonConvert.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/XmlJsonConvert.cpp 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/XmlJsonConvert.cpp 2017-04-27 12:44:20 UTC (rev 9181)
@@ -22,8 +22,14 @@
#include <string>
#include <map>
#include <vector>
+#include <set>
using namespace std;
+static map<string, INT32> s_elementPathTypeMap;
+static set<string> s_multiElementPaths;
+
+bool MgXmlJsonConvert::m_isInitialized = MgXmlJsonConvert::Initialize();
+
MgXmlJsonConvert::MgXmlJsonConvert()
{
}
@@ -32,20 +38,20 @@
{
}
-void MgXmlJsonConvert::ToJson(Ptr<MgByteReader> &byteReader)
+void MgXmlJsonConvert::ToJson(Ptr<MgByteReader> &byteReader, bool bClean)
{
string xmlDoc;
byteReader->ToStringUtf8(xmlDoc);
string jsonDoc;
- this->ToJson(xmlDoc, jsonDoc);
+ this->ToJson(xmlDoc, jsonDoc, bClean);
Ptr<MgByteSource> byteSource = new MgByteSource(
(unsigned char*)jsonDoc.c_str(), (INT32)jsonDoc.length());
byteSource->SetMimeType(MgMimeType::Json);
byteReader.Attach(byteSource->GetReader());
}
-void MgXmlJsonConvert::ToJson(const string &xmlString, string &jsonString)
+void MgXmlJsonConvert::ToJson(const string &xmlString, string &jsonString, bool bClean)
{
// Parse into DOM
m_xmlUtil.ParseString(xmlString.c_str());
@@ -53,7 +59,7 @@
string nodeName = MgUtil::WideCharToMultiByte(X2W(root->getNodeName()));
m_jsonDoc.BeginObject(nodeName);
{
- XmlToJsonNode((DOMNode *)root);
+ XmlToJsonNode((DOMNode *)root, bClean);
}
m_jsonDoc.EndObject();
@@ -61,7 +67,7 @@
}
// XmlToJSONnode: Output an XmlElement, possibly as part of a higher array
-void MgXmlJsonConvert::XmlToJsonNode(DOMNode *node)
+void MgXmlJsonConvert::XmlToJsonNode(DOMNode *node, bool bClean)
{
// Build a sorted list of key-value pairs
// where key is case-sensitive nodeName
@@ -76,19 +82,58 @@
if (node->hasAttributes())
{
DOMNamedNodeMap *attributes = node->getAttributes();
- int attributeCount = attributes->getLength();
+ XMLSize_t attributeCount = attributes->getLength();
DOMNode *attribute;
string nodeValue;
- for (int i = 0; i < attributeCount; i++)
+ for (XMLSize_t i = 0; i < attributeCount; i++)
{
attribute = attributes->item(i);
MgUtil::WideCharToMultiByte(X2W(attribute->getNodeName()), nodeName);
- MgUtil::WideCharToMultiByte(X2W(attribute->getNodeValue()), nodeValue);
+ STRING wNodeValue = X2W(attribute->getNodeValue());
+ MgUtil::WideCharToMultiByte(wNodeValue, nodeValue);
- // Write the attribute as a single array element
- m_jsonDoc.BeginArray(1, "@" + nodeName);
- m_jsonDoc.SetArrayValue(0, nodeValue);
- m_jsonDoc.EndArray();
+ if (bClean)
+ {
+ int type;
+ if (GetAttributeType(attribute, node, type))
+ {
+ switch (type)
+ {
+ case XML_DATA_TYPE_BOOLEAN:
+ {
+ bool b = MgUtil::StringToBoolean(wNodeValue);
+ m_jsonDoc.AddAttribute(nodeName, b);
+ }
+ break;
+ case XML_DATA_TYPE_NUM_INT:
+ {
+ INT32 i = MgUtil::StringToInt32(wNodeValue);
+ m_jsonDoc.AddAttribute(nodeName, i);
+ }
+ break;
+ case XML_DATA_TYPE_NUM_DOUBLE:
+ {
+ double d = MgUtil::StringToDouble(wNodeValue);
+ m_jsonDoc.AddAttribute(nodeName, d);
+ }
+ break;
+ default:
+ m_jsonDoc.AddAttribute(nodeName, nodeValue);
+ break;
+ }
+ }
+ else //Type assumed to be string
+ {
+ m_jsonDoc.AddAttribute(nodeName, nodeValue);
+ }
+ }
+ else
+ {
+ // Write the attribute as a single array element
+ m_jsonDoc.BeginArray(1, "@" + nodeName);
+ m_jsonDoc.SetArrayValue(0, nodeValue);
+ m_jsonDoc.EndArray();
+ }
}
}
@@ -140,7 +185,28 @@
if (nodeList->size() == 1)
{
childNode = (*nodeList)[0];
- this->ProcessObjectNode(childNode);
+ if (bClean)
+ {
+ bool bMultiple = false;
+ IsMultiple(childNode, bMultiple);
+
+ //If this node is known to house more than one element, then we must write
+ //a JSON array, even if there's only one element to write
+ if (bMultiple)
+ {
+ m_jsonDoc.BeginArray(1, nodeName);
+ this->ProcessArrayNode(0, childNode, bClean);
+ m_jsonDoc.EndArray();
+ }
+ else
+ {
+ this->ProcessObjectNode(childNode, bClean);
+ }
+ }
+ else
+ {
+ this->ProcessObjectNode(childNode, bClean);
+ }
}
else
{
@@ -150,7 +216,7 @@
for (int i = 0; i < nodeListLength; i++)
{
childNode = (*nodeList)[i];
- this->ProcessArrayNode(i, childNode);
+ this->ProcessArrayNode(i, childNode, bClean);
}
}
m_jsonDoc.EndArray();
@@ -173,20 +239,58 @@
return isValidText;
}
-void MgXmlJsonConvert::ProcessObjectNode(DOMNode *node)
+void MgXmlJsonConvert::ProcessObjectNode(DOMNode *node, bool bClean)
{
short nodeType = node->getNodeType();
string nodeName;
MgUtil::WideCharToMultiByte(X2W(node->getNodeName()), nodeName);
if (nodeType == DOMNode::TEXT_NODE)
{
- string textContent;
- MgUtil::WideCharToMultiByte(X2W(node->getTextContent()), textContent);
+ STRING wTextContent = X2W(node->getTextContent());
+ string textContent = MgUtil::WideCharToMultiByte(wTextContent);
- // Write the text as a single array element
- m_jsonDoc.BeginArray(1, nodeName);
- m_jsonDoc.SetArrayValue(0, textContent);
- m_jsonDoc.EndArray();
+ if (bClean)
+ {
+ int type;
+ if (GetElementType(node, type))
+ {
+ switch (type)
+ {
+ case XML_DATA_TYPE_BOOLEAN:
+ {
+ bool b = MgUtil::StringToBoolean(wTextContent);
+ m_jsonDoc.Add(nodeName, b);
+ }
+ break;
+ case XML_DATA_TYPE_NUM_INT:
+ {
+ INT32 i = MgUtil::StringToInt32(wTextContent);
+ m_jsonDoc.Add(nodeName, i);
+ }
+ break;
+ case XML_DATA_TYPE_NUM_DOUBLE:
+ {
+ double d = MgUtil::StringToDouble(wTextContent);
+ m_jsonDoc.Add(nodeName, d);
+ }
+ break;
+ default:
+ m_jsonDoc.Add(nodeName, textContent);
+ break;
+ }
+ }
+ else //Type assumed to be string
+ {
+ m_jsonDoc.Add(nodeName, textContent);
+ }
+ }
+ else
+ {
+ // Write the text as a single array element
+ m_jsonDoc.BeginArray(1, nodeName);
+ m_jsonDoc.SetArrayValue(0, textContent);
+ m_jsonDoc.EndArray();
+ }
return;
}
else if (nodeType == DOMNode::ELEMENT_NODE)
@@ -207,14 +311,52 @@
DOMNode *childNode = childNodes->item(0);
if (childNode->getNodeType() == DOMNode::TEXT_NODE)
{
- string textContent;
- MgUtil::WideCharToMultiByte(X2W(childNode->getTextContent()), textContent);
+ STRING wTextContent = X2W(childNode->getTextContent());
+ string textContent = MgUtil::WideCharToMultiByte(wTextContent);
if (this->ValidateTextContent(textContent))
{
- // Write the text as a single array element
- m_jsonDoc.BeginArray(1, nodeName);
- m_jsonDoc.SetArrayValue(0, textContent);
- m_jsonDoc.EndArray();
+ if (bClean)
+ {
+ int type;
+ if (GetElementType(node, type))
+ {
+ switch (type)
+ {
+ case XML_DATA_TYPE_BOOLEAN:
+ {
+ bool b = MgUtil::StringToBoolean(wTextContent);
+ m_jsonDoc.Add(nodeName, b);
+ }
+ break;
+ case XML_DATA_TYPE_NUM_INT:
+ {
+ INT32 i = MgUtil::StringToInt32(wTextContent);
+ m_jsonDoc.Add(nodeName, i);
+ }
+ break;
+ case XML_DATA_TYPE_NUM_DOUBLE:
+ {
+ double d = MgUtil::StringToDouble(wTextContent);
+ m_jsonDoc.Add(nodeName, d);
+ }
+ break;
+ default:
+ m_jsonDoc.Add(nodeName, textContent);
+ break;
+ }
+ }
+ else //Type assumed to be string
+ {
+ m_jsonDoc.Add(nodeName, textContent);
+ }
+ }
+ else
+ {
+ // Write the text as a single array element
+ m_jsonDoc.BeginArray(1, nodeName);
+ m_jsonDoc.SetArrayValue(0, textContent);
+ m_jsonDoc.EndArray();
+ }
}
return;
}
@@ -222,16 +364,25 @@
}
}
- m_jsonDoc.BeginArray(1, nodeName);
- m_jsonDoc.BeginArrayObject(0);
+ if (bClean)
{
- this->XmlToJsonNode(node);
+ m_jsonDoc.BeginObject(nodeName);
+ this->XmlToJsonNode(node, bClean);
+ m_jsonDoc.EndObject();
}
- m_jsonDoc.EndArrayObject();
- m_jsonDoc.EndArray();
+ else
+ {
+ m_jsonDoc.BeginArray(1, nodeName);
+ m_jsonDoc.BeginArrayObject(0);
+ {
+ this->XmlToJsonNode(node, bClean);
+ }
+ m_jsonDoc.EndArrayObject();
+ m_jsonDoc.EndArray();
+ }
}
-void MgXmlJsonConvert::ProcessArrayNode(int index, DOMNode *node)
+void MgXmlJsonConvert::ProcessArrayNode(int index, DOMNode *node, bool bClean)
{
short nodeType = node->getNodeType();
string nodeName;
@@ -254,7 +405,9 @@
XMLSize_t childNodeCount = childNodes->getLength();
if (childNodeCount == 0)
{
- m_jsonDoc.SetArrayValue(index, NULL);
+ // Write the node as a zero array element
+ m_jsonDoc.BeginArrayObject(index);
+ m_jsonDoc.EndArrayObject();
return;
}
else if (childNodeCount == 1)
@@ -263,10 +416,49 @@
if (childNode->getNodeType() == DOMNode::TEXT_NODE)
{
string textContent;
- MgUtil::WideCharToMultiByte(X2W(childNode->getTextContent()), textContent);
+ STRING wTextContent = X2W(node->getTextContent());
+ MgUtil::WideCharToMultiByte(wTextContent, textContent);
if (this->ValidateTextContent(textContent))
{
- m_jsonDoc.SetArrayValue(index, textContent);
+ if (bClean)
+ {
+ int type;
+ if (GetElementType(node, type))
+ {
+ switch (type)
+ {
+ case XML_DATA_TYPE_BOOLEAN:
+ {
+ bool b = MgUtil::StringToBoolean(wTextContent);
+ m_jsonDoc.SetArrayValue(index, b);
+ }
+ break;
+ case XML_DATA_TYPE_NUM_INT:
+ {
+ INT32 i = MgUtil::StringToInt32(wTextContent);
+ m_jsonDoc.SetArrayValue(index, i);
+ }
+ break;
+ case XML_DATA_TYPE_NUM_DOUBLE:
+ {
+ double d = MgUtil::StringToDouble(wTextContent);
+ m_jsonDoc.SetArrayValue(index, d);
+ }
+ break;
+ default:
+ m_jsonDoc.SetArrayValue(index, textContent);
+ break;
+ }
+ }
+ else //Type assumed to be string
+ {
+ m_jsonDoc.SetArrayValue(index, textContent);
+ }
+ }
+ else
+ {
+ m_jsonDoc.SetArrayValue(index, textContent);
+ }
}
return;
}
@@ -277,7 +469,674 @@
// Write the node as a single array element
m_jsonDoc.BeginArrayObject(index);
{
- this->XmlToJsonNode(node);
+ this->XmlToJsonNode(node, bClean);
}
m_jsonDoc.EndArrayObject();
}
+
+bool MgXmlJsonConvert::GetAttributePath(DOMNode * attribute, DOMNode * parent, string & path, const XMLCh * suffix)
+{
+ if (NULL != attribute)
+ {
+ STRING elPath = L"/@";
+ elPath += X2W(attribute->getNodeName());
+ if (NULL != suffix)
+ {
+ STRING ws;
+ ws = X2W(suffix);
+ elPath += ws;
+ }
+ DOMNode* currentNode = parent;
+ while (NULL != currentNode)
+ {
+ DOMNode::NodeType nt = currentNode->getNodeType();
+ if (nt == DOMNode::ELEMENT_NODE)
+ {
+ STRING pathPart = L"/";
+ pathPart += X2W(currentNode->getNodeName());
+ elPath = pathPart + elPath;
+ currentNode = currentNode->getParentNode();
+ if (NULL == currentNode)
+ break;
+ }
+ else
+ {
+ break;
+ }
+ }
+ path = MgUtil::WideCharToMultiByte(elPath);
+ return true;
+ }
+ return false;
+}
+
+bool MgXmlJsonConvert::GetElementPath(DOMNode * node, string & path, const XMLCh * suffix)
+{
+ if (NULL != node)
+ {
+ STRING elPath = L"/";
+ if (node->getNodeType() == DOMNode::ATTRIBUTE_NODE)
+ {
+ elPath += L"@";
+ }
+ elPath += X2W(node->getNodeName());
+ if (NULL != suffix)
+ {
+ STRING ws;
+ ws = X2W(suffix);
+ elPath += ws;
+ }
+ DOMNode* currentNode = node->getParentNode();
+ while (NULL != currentNode)
+ {
+ DOMNode::NodeType nt = currentNode->getNodeType();
+ if (nt == DOMNode::ELEMENT_NODE)
+ {
+ STRING pathPart = L"/";
+ pathPart += X2W(currentNode->getNodeName());
+ elPath = pathPart + elPath;
+ currentNode = currentNode->getParentNode();
+ if (NULL == currentNode)
+ break;
+ }
+ else
+ {
+ break;
+ }
+ }
+ path = MgUtil::WideCharToMultiByte(elPath);
+ return true;
+ }
+ return false;
+}
+
+bool MgXmlJsonConvert::GetAttributeType(DOMNode * attribute, DOMNode * parent, int & type, const XMLCh * suffix)
+{
+ string path;
+ if (GetAttributePath(attribute, parent, path, suffix))
+ {
+ if (s_elementPathTypeMap.find(path) != s_elementPathTypeMap.end())
+ {
+ type = s_elementPathTypeMap[path];
+ return true;
+ }
+ }
+ return false;
+}
+
+
+bool MgXmlJsonConvert::GetElementType(DOMNode * node, int & type, const XMLCh * suffix)
+{
+ string path;
+ if (GetElementPath(node, path, suffix))
+ {
+ if (s_elementPathTypeMap.find(path) != s_elementPathTypeMap.end())
+ {
+ type = s_elementPathTypeMap[path];
+ return true;
+ }
+ }
+ return false;
+}
+
+bool MgXmlJsonConvert::IsMultiple(DOMNode * node, bool & isMultiple, const XMLCh * suffix)
+{
+ string path;
+ if (GetElementPath(node, path, suffix))
+ {
+ isMultiple = (s_multiElementPaths.find(path) != s_multiElementPaths.end());
+ return true;
+ }
+ return false;
+}
+
+bool MgXmlJsonConvert::Initialize()
+{
+ //ApplicationDefinition-1.0.0.xsd
+ s_elementPathTypeMap["/ApplicationDefinition/MapSet/MapGroup/InitialView/CenterX"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ApplicationDefinition/MapSet/MapGroup/InitialView/CenterY"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ApplicationDefinition/MapSet/MapGroup/InitialView/Scale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ApplicationDefinition/WidgetSet/Widget/Disabled"] = XML_DATA_TYPE_BOOLEAN;
+ //ApplicationDefinitionInfo-1.0.0.xsd
+ s_elementPathTypeMap["/ApplicationDefinitionWidgetInfoSet/WidgetInfo/StandardUi"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/ApplicationDefinitionWidgetInfoSet/WidgetInfo/Parameter/IsMandatory"] = XML_DATA_TYPE_BOOLEAN;
+ //DataStoreList-1.0.0.xsd
+ s_elementPathTypeMap["/DataStoreList/DataStore/FdoEnabled"] = XML_DATA_TYPE_BOOLEAN;
+ //DrawingSource-1.0.0.xsd
+ s_elementPathTypeMap["/DrawingSource/Sheet/Extent/MinX"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/DrawingSource/Sheet/Extent/MinY"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/DrawingSource/Sheet/Extent/MaxX"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/DrawingSource/Sheet/Extent/MaxY"] = XML_DATA_TYPE_NUM_DOUBLE;
+ //FdoLongTransactionList-1.0.0.xsd
+ s_elementPathTypeMap["/FdoLongTransactionList/LongTransaction/@IsActive"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FdoLongTransactionList/LongTransaction/@IsFrozen"] = XML_DATA_TYPE_BOOLEAN;
+ //FdoSpatialContextList-1.0.0.xsd
+ s_elementPathTypeMap["/FdoSpatialContextList/SpatialContext/@IsActive"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FdoSpatialContextList/SpatialContext/XYTolerance"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/FdoSpatialContextList/SpatialContext/ZTolerance"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/FdoSpatialContextList/SpatialContext/Extent/LowerLeftCoordinate/X"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/FdoSpatialContextList/SpatialContext/Extent/LowerLeftCoordinate/Y"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/FdoSpatialContextList/SpatialContext/Extent/UpperRightCoordinate/X"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/FdoSpatialContextList/SpatialContext/Extent/UpperRightCoordinate/Y"] = XML_DATA_TYPE_NUM_DOUBLE;
+ //FdoProviderCapabilities-1.1.0.xsd
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Geometry/Dimensionality"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Connection/SupportsLocking"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Connection/SupportsTimeout"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Connection/SupportsTransactions"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Connection/SupportsLongTransactions"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Connection/SupportsSQL"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Connection/SupportsConfiguration"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Connection/SupportsSavePoint"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Schema/SupportsInheritance"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Schema/SupportsMultipleSchemas"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Schema/SupportsObjectProperties"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Schema/SupportsAssociationProperties"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Schema/SupportsSchemaOverrides"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Schema/SupportsNetworkModel"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Schema/SupportsAutoIdGeneration"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Schema/SupportsDataStoreScopeUniqueIdGeneration"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Schema/SupportsSchemaModification"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Command/SupportsParameters"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Command/SupportsTimeout"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Command/SupportsSelectExpressions"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Command/SupportsSelectFunctions"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Command/SupportsSelectDistinct"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Command/SupportsSelectOrdering"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Command/SupportsSelectGrouping"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Filter/SupportsGeodesicDistance"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Filter/SupportsNonLiteralGeometricOperations"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Raster/SupportsRaster"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Raster/SupportsStitching"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Raster/SupportsSubsampling"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Topology/SupportsTopology"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Topology/SupportsTopologicalHierarchy"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Topology/BreaksCurveCrossingsAutomatically"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Topology/ActivatesTopologyByArea"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Topology/ConstrainsFeatureMovements"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Expression/FunctionDefinitionList/FunctionDefinition/IsAggregate"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderCapabilities/Expression/FunctionDefinitionList/FunctionDefinition/IsSupportsVariableArgumentsList"] = XML_DATA_TYPE_BOOLEAN;
+ //FeatureProviderRegistry-1.0.0.xsd
+ s_elementPathTypeMap["/FeatureProviderRegistry/FeatureProvider/ConnectionProperties/ConnectionProperty/@Required"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderRegistry/FeatureProvider/ConnectionProperties/ConnectionProperty/@Protected"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureProviderRegistry/FeatureProvider/ConnectionProperties/ConnectionProperty/@Enumerable"] = XML_DATA_TYPE_BOOLEAN;
+ //FeatureSource-1.0.0.xsd
+ s_elementPathTypeMap["/FeatureSource/Extension/AttributeRelate/ForceOneToOne"] = XML_DATA_TYPE_BOOLEAN;
+ //LayerDefinition-2.4.0.xsd
+ s_elementPathTypeMap["/LayerDefinition/DrawingLayerDefinition/Opacity"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/DrawingLayerDefinition/MinScale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/DrawingLayerDefinition/MaxScale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/Opacity"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/MinScale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/MaxScale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/AreaTypeStyle/AreaRule/Label/AdvancedPlacement/ScaleLimit"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/AreaTypeStyle/ShowInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/LineTypeStyle/LineRule/Label/AdvancedPlacement/ScaleLimit"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/LineTypeStyle/ShowInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/PointTypeStyle/PointRule/Label/AdvancedPlacement/ScaleLimit"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/PointTypeStyle/DisplayAsText"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/PointTypeStyle/AllowOverpost"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/PointTypeStyle/ShowInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/PointTypeStyle/PointRule/Label/MaintainAspect"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/PointTypeStyle/PointRule/PointSymbolization2D/Mark/MaintainAspect"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/PointTypeStyle/PointRule/PointSymbolization2D/Image/MaintainAspect"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/PointTypeStyle/PointRule/PointSymbolization2D/Font/MaintainAspect"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/PointTypeStyle/PointRule/PointSymbolization2D/Font/Bold"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/PointTypeStyle/PointRule/PointSymbolization2D/Font/Italic"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/PointTypeStyle/PointRule/PointSymbolization2D/Font/Underlined"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/PointTypeStyle/PointRule/PointSymbolization2D/W2D/MaintainAspect"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/PointTypeStyle/PointRule/PointSymbolization2D/Block/MaintainAspect"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LayerDefinition/VectorLayerDefinition/VectorScaleRange/CompositeTypeStyle/ShowInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/Opacity"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/Label/AdvancedPlacement/ScaleLimit"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/Color/Bands/RedBand/LowBand"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/Color/Bands/RedBand/HighBand"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/Color/Bands/RedBand/LowChannel"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/Color/Bands/RedBand/HighChannel"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/Color/Bands/GreenBand/LowBand"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/Color/Bands/GreenBand/HighBand"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/Color/Bands/GreenBand/LowChannel"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/Color/Bands/GreenBand/HighChannel"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/Color/Bands/BlueBand/LowBand"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/Color/Bands/BlueBand/HighBand"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/Color/Bands/BlueBand/LowChannel"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/Color/Bands/BlueBand/HighChannel"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/HillShade/Azimuth"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/HillShade/Altitude"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/HillShade/ScaleFactor"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/BrightnessFactor"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule/ContrastFactor"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/SurfaceStyle/ZeroValue"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/SurfaceStyle/ScaleFactor"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/MinScale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/MaxScale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LayerDefinition/GridLayerDefinition/GridScaleRange/RebuildFactor"] = XML_DATA_TYPE_NUM_DOUBLE;
+ //LoadProcedure-2.2.0.xsd
+ s_elementPathTypeMap["/LoadProcedure/RasterLoadProcedure/GeoReferenceOverride/LocationX"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LoadProcedure/RasterLoadProcedure/GeoReferenceOverride/LocationY"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LoadProcedure/RasterLoadProcedure/GeoReferenceOverride/ScaleX"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LoadProcedure/RasterLoadProcedure/GeoReferenceOverride/ScaleY"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LoadProcedure/RasterLoadProcedure/SubsampleFactor"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LoadProcedure/RasterLoadProcedure/GenerateSpatialDataSources"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/RasterLoadProcedure/GenerateLayers"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/RasterLoadProcedure/GenerateMaps"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/RasterLoadProcedure/GenerateSymbolLibraries"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/DwgLoadProcedure/Generalization"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LoadProcedure/DwgLoadProcedure/ClosedPolylinesToPolygons"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/DwgLoadProcedure/GenerateSpatialDataSources"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/DwgLoadProcedure/GenerateLayers"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/DwgLoadProcedure/GenerateMaps"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/DwgLoadProcedure/GenerateSymbolLibraries"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/DwgLoadProcedure/LayerComponents/LayerComponent/Selected"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/SdfLoadProcedure/Generalization"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LoadProcedure/SdfLoadProcedure/GenerateSpatialDataSources"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/SdfLoadProcedure/GenerateLayers"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/SdfLoadProcedure/GenerateMaps"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/SdfLoadProcedure/GenerateSymbolLibraries"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/SQLiteLoadProcedure/Generalization"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LoadProcedure/SQLiteLoadProcedure/GenerateSpatialDataSources"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/SQLiteLoadProcedure/GenerateLayers"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/SQLiteLoadProcedure/GenerateMaps"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/SQLiteLoadProcedure/GenerateSymbolLibraries"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/ShpLoadProcedure/Generalization"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/LoadProcedure/ShpLoadProcedure/GenerateSpatialDataSources"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/ShpLoadProcedure/GenerateLayers"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/ShpLoadProcedure/GenerateMaps"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/ShpLoadProcedure/GenerateSymbolLibraries"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/LoadProcedure/ShpLoadProcedure/ConvertToSdf"] = XML_DATA_TYPE_BOOLEAN;
+ //MapDefinition-2.4.0.xsd
+ s_elementPathTypeMap["/MapDefinition/Extents/MinX"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/MapDefinition/Extents/MinY"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/MapDefinition/Extents/MaxX"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/MapDefinition/Extents/MaxY"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/MapDefinition/BaseMapDefinition/FiniteDisplayScale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/MapDefinition/MapLayer/Selectable"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/MapDefinition/MapLayer/ShowInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/MapDefinition/MapLayer/ExpandInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/MapDefinition/MapLayer/Visible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/MapDefinition/MapLayerGroup/ShowInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/MapDefinition/MapLayerGroup/ExpandInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/MapDefinition/MapLayerGroup/Visible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/MapDefinition/BaseMapDefinition/BaseMapLayerGroup/ShowInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/MapDefinition/BaseMapDefinition/BaseMapLayerGroup/ExpandInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/MapDefinition/BaseMapDefinition/BaseMapLayerGroup/Visible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/MapDefinition/BaseMapDefinition/BaseMapLayerGroup/BaseMapLayer/ShowInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/MapDefinition/BaseMapDefinition/BaseMapLayerGroup/BaseMapLayer/ExpandInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/MapDefinition/BaseMapDefinition/BaseMapLayerGroup/BaseMapLayer/Visible"] = XML_DATA_TYPE_BOOLEAN;
+ //PrintLayout-1.0.0.xsd
+ s_elementPathTypeMap["/PrintLayout/PageProperties/BackgroundColor/Red"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/PrintLayout/PageProperties/BackgroundColor/Blue"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/PrintLayout/PageProperties/BackgroundColor/Green"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/PrintLayout/LayoutProperties/ShowTitle"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/PrintLayout/LayoutProperties/ShowLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/PrintLayout/LayoutProperties/ShowScaleBar"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/PrintLayout/LayoutProperties/ShowNorthArrow"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/PrintLayout/LayoutProperties/ShowURL"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/PrintLayout/LayoutProperties/ShowDateTime"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/PrintLayout/LayoutProperties/ShowCustomLogos"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/PrintLayout/LayoutProperties/ShowCustomText"] = XML_DATA_TYPE_BOOLEAN;
+ //ProfileResult-2.4.0.xsd
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderMap/LayerCount"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderMap/Scale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderMap/RenderTime"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderMap/CreateImageTime"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderMap/Extents/MinX"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderMap/Extents/MinY"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderMap/Extents/MaxX"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderMap/Extents/MaxY"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderDynamicOverlay/LayerCount"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderDynamicOverlay/Scale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderDynamicOverlay/RenderTime"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderDynamicOverlay/CreateImageTime"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderLayer/RenderTime"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderLayer/ScaleRange/MinScale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderLayer/ScaleRange/MaxScale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderLayers/RenderTime"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderSelection/RenderTime"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderWatermark/RenderTime"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderWatermarks/RenderTime"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/ProfileResult/ProfileRenderLabels/RenderTime"] = XML_DATA_TYPE_NUM_DOUBLE;
+ //ResourceList-1.0.0.xsd
+ s_elementPathTypeMap["/ResourceList/ResourceFolder/Depth"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/ResourceList/ResourceFolder/NumberOfFolders"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/ResourceList/ResourceFolder/NumberOfDocuments"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/ResourceList/ResourceDocument/Depth"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/ResourceList/ResourceFolder/ResourceFolderHeader/Security/Inherited"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/ResourceList/ResourceDocument/ResourceDocumentHeader/Security/Inherited"] = XML_DATA_TYPE_BOOLEAN;
+ //RuntimeMap-2.6.0.xsd
+ s_elementPathTypeMap["/RuntimeMap/DisplayDpi"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/RuntimeMap/Group/Type"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/RuntimeMap/Group/DisplayInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/RuntimeMap/Group/ExpandInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/RuntimeMap/Group/Visible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/RuntimeMap/Group/ActuallyVisible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/RuntimeMap/Layer/Type"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/RuntimeMap/Layer/ScaleRange/MinScale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/RuntimeMap/Layer/ScaleRange/MaxScale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/RuntimeMap/Layer/ScaleRange/FeatureStyle/Type"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/RuntimeMap/Layer/Selectable"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/RuntimeMap/Layer/DisplayInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/RuntimeMap/Layer/ExpandInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/RuntimeMap/Layer/Visible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/RuntimeMap/Layer/ActuallyVisible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/RuntimeMap/FiniteDisplayScale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/RuntimeMap/CoordinateSystem/MetersPerUnit"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/RuntimeMap/Extents/LowerLeftCoordinate/X"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/RuntimeMap/Extents/LowerLeftCoordinate/Y"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/RuntimeMap/Extents/UpperRightCoordinate/X"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/RuntimeMap/Extents/UpperRightCoordinate/Y"] = XML_DATA_TYPE_NUM_DOUBLE;
+ //RuntimeMap-3.0.0.xsd
+ s_elementPathTypeMap["/RuntimeMap/TileWidth"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/RuntimeMap/TileHeight"] = XML_DATA_TYPE_NUM_INT;
+ //SiteInformation-1.0.0.xsd
+ s_elementPathTypeMap["/SiteInformation/SiteServer/OperatingSystem/AvailablePhysicalMemory"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/SiteServer/OperatingSystem/TotalPhysicalMemory"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/SiteServer/OperatingSystem/AvailableVirtualMemory"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/SiteServer/OperatingSystem/TotalVirtualMemory"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Statistics/AdminOperationsQueueCount"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Statistics/ClientOperationsQueueCount"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Statistics/SiteOperationsQueueCount"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Statistics/AverageOperationTime"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Statistics/CpuUtilization"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Statistics/TotalOperationTime"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Statistics/ActiveConnections"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Statistics/TotalConnections"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Statistics/TotalOperationsProcessed"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Statistics/TotalOperationsReceived"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Statistics/Uptime"] = XML_DATA_TYPE_NUM_INT;
+ //SiteInformation-2.2.0.xsd
+ s_elementPathTypeMap["/SiteInformation/Server/OperatingSystem/AvailablePhysicalMemory"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/OperatingSystem/TotalPhysicalMemory"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/OperatingSystem/AvailableVirtualMemory"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/OperatingSystem/TotalVirtualMemory"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/Statistics/AdminOperationsQueueCount"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/Statistics/ClientOperationsQueueCount"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/Statistics/SiteOperationsQueueCount"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/Statistics/AverageOperationTime"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/Statistics/CpuUtilization"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/Statistics/WorkingSet"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/Statistics/VirtualMemory"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/Statistics/TotalOperationTime"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/Statistics/ActiveConnections"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/Statistics/TotalConnections"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/Statistics/TotalOperationsProcessed"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/Statistics/TotalOperationsReceived"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/Statistics/Uptime"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/Statistics/CacheSize"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/SiteInformation/Server/Statistics/CacheDroppedEntries"] = XML_DATA_TYPE_NUM_INT;
+ //UnmanagedDataList-1.0.0.xsd
+ s_elementPathTypeMap["/UnmanagedDataList/UnmanagedDataFolder/NumberOfFolders"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/UnmanagedDataList/UnmanagedDataFolder/NumberOfFiles"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/UnmanagedDataList/UnmanagedDataFile/Size"] = XML_DATA_TYPE_NUM_INT;
+ //WebLayout-2.6.0.xsd
+ s_elementPathTypeMap["/WebLayout/PointSelectionBuffer"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/WebLayout/InformationPane/Width"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/WebLayout/InformationPane/LegendVisible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/WebLayout/InformationPane/PropertiesVisible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/WebLayout/TaskPane/Width"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/WebLayout/CommandSet/Command/MatchLimit"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/WebLayout/CommandSet/Command/DisableIfSelectionEmpty"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/WebLayout/Map/InitialView/CenterX"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/WebLayout/Map/InitialView/CenterY"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/WebLayout/Map/InitialView/Scale"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/WebLayout/EnablePingServer"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/WebLayout/ToolBar/Visible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/WebLayout/InformationPane/Visible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/WebLayout/ContextMenu/Visible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/WebLayout/TaskPane/Visible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/WebLayout/TaskPane/TaskBar/Visible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/WebLayout/StatusBar/Visible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/WebLayout/ZoomControl/Visible"] = XML_DATA_TYPE_BOOLEAN;
+ //WatermarkDefinition-2.4.0.xsd
+ s_elementPathTypeMap["/WatermarkDefinition/Position/XYPosition/XPosition/Offset"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/WatermarkDefinition/Position/XYPosition/YPosition/Offset"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/WatermarkDefinition/Position/TilePosition/TileWidth"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/WatermarkDefinition/Position/TilePosition/TileHeight"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/WatermarkDefinition/Appearance/Transparency"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/WatermarkDefinition/Appearance/Rotation"] = XML_DATA_TYPE_NUM_DOUBLE;
+ //TileSetDefinition-3.0.0.xsd
+ s_elementPathTypeMap["/TileSetDefinition/Extents/MinX"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/TileSetDefinition/Extents/MinY"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/TileSetDefinition/Extents/MaxX"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/TileSetDefinition/Extents/MaxY"] = XML_DATA_TYPE_NUM_DOUBLE;
+ s_elementPathTypeMap["/TileSetDefinition/BaseMapLayerGroup/Visible"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/TileSetDefinition/BaseMapLayerGroup/ShowInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/TileSetDefinition/BaseMapLayerGroup/ExpandInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/TileSetDefinition/BaseMapLayerGroup/BaseMapLayer/Selectable"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/TileSetDefinition/BaseMapLayerGroup/BaseMapLayer/ShowInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/TileSetDefinition/BaseMapLayerGroup/BaseMapLayer/ExpandInLegend"] = XML_DATA_TYPE_BOOLEAN;
+ //TileProviderList-3.0.0.xsd
+ s_elementPathTypeMap["/TileProviderList/TileProvider/ConnectionProperties/ConnectionProperty/@Required"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/TileProviderList/TileProvider/ConnectionProperties/ConnectionProperty/@Protected"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/TileProviderList/TileProvider/ConnectionProperties/ConnectionProperty/@Enumerable"] = XML_DATA_TYPE_BOOLEAN;
+ //FeatureSchemaCollection-3.3.0.xsd
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/IsAbstract"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/IsComputed"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/PropertyType"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/DataType"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/Length"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/Nullable"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/ReadOnly"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/IsAutoGenerated"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/IsIdentity"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/Precision"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/Scale"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/GeometryTypes"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/SpecificGeometryTypes/Type"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/HasElevation"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/HasMeasure"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/DefaultImageXSize"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/DefaultImageYSize"] = XML_DATA_TYPE_NUM_INT;
+ //ClassDefinition-3.3.0.xsd
+ s_elementPathTypeMap["/ClassDefinition/IsAbstract"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/ClassDefinition/IsComputed"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/ClassDefinition/Properties/Property/PropertyType"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/ClassDefinition/Properties/Property/DataType"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/ClassDefinition/Properties/Property/Length"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/ClassDefinition/Properties/Property/Nullable"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/ClassDefinition/Properties/Property/ReadOnly"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/ClassDefinition/Properties/Property/IsAutoGenerated"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/ClassDefinition/Properties/Property/IsIdentity"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/ClassDefinition/Properties/Property/Precision"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/ClassDefinition/Properties/Property/Scale"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/ClassDefinition/Properties/Property/GeometryTypes"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/ClassDefinition/Properties/Property/SpecificGeometryTypes/Type"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/ClassDefinition/Properties/Property/HasElevation"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/ClassDefinition/Properties/Property/HasMeasure"] = XML_DATA_TYPE_BOOLEAN;
+ s_elementPathTypeMap["/ClassDefinition/Properties/Property/DefaultImageXSize"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/ClassDefinition/Properties/Property/DefaultImageYSize"] = XML_DATA_TYPE_NUM_INT;
+ //Miscellaneous MapGuide response types that don't have a formal schema
+ s_elementPathTypeMap["/SessionTimeout/Value"] = XML_DATA_TYPE_NUM_INT;
+ s_elementPathTypeMap["/FeatureInformation/SelectedFeatures/SelectedLayer/LayerMetadata/Property/Type"] = XML_DATA_TYPE_NUM_INT;
+
+ // ====================================================================================================================
+ // Element paths below basically correspond to XML Schema elements that have minOccurs="1|0" and maxOccurs="unbounded"
+ // ====================================================================================================================
+
+ //FeatureSource-1.0.0.xsd
+ s_multiElementPaths.insert("/FeatureSource/Parameter");
+ s_multiElementPaths.insert("/FeatureSource/SupplementalSpatialContextInfo");
+ s_multiElementPaths.insert("/FeatureSource/Extension");
+ s_multiElementPaths.insert("/FeatureSource/Extension/CalculatedProperty");
+ s_multiElementPaths.insert("/FeatureSource/Extension/AttributeRelate");
+ s_multiElementPaths.insert("/FeatureSource/Extension/AttributeRelate/RelateProperty");
+ //DrawingSource-1.0.0.xsd
+ s_multiElementPaths.insert("/DrawingSource/Sheet");
+ //LayerDefinition-2.4.0.xsd (schema has been additive, so this includes older versions as well)
+ s_multiElementPaths.insert("/LayerDefinition/VectorLayerDefinition/PropertyMapping");
+ s_multiElementPaths.insert("/LayerDefinition/VectorLayerDefinition/VectorScaleRange");
+ s_multiElementPaths.insert("/LayerDefinition/VectorLayerDefinition/VectorScaleRange/AreaTypeStyle/AreaRule");
+ s_multiElementPaths.insert("/LayerDefinition/VectorLayerDefinition/VectorScaleRange/LineTypeStyle/LineRule");
+ s_multiElementPaths.insert("/LayerDefinition/VectorLayerDefinition/VectorScaleRange/LineTypeStyle/LineRule/LineSymbolization2D");
+ s_multiElementPaths.insert("/LayerDefinition/VectorLayerDefinition/VectorScaleRange/PointTypeStyle/PointRule");
+ s_multiElementPaths.insert("/LayerDefinition/VectorLayerDefinition/VectorScaleRange/CompositeTypeStyle/CompositeRule");
+ s_multiElementPaths.insert("/LayerDefinition/VectorLayerDefinition/VectorScaleRange/CompositeTypeStyle/CompositeRule/CompositeSymbolization/SymbolInstance");
+ s_multiElementPaths.insert("/LayerDefinition/VectorLayerDefinition/VectorScaleRange/CompositeTypeStyle/CompositeRule/CompositeSymbolization/SymbolInstance/ParameterOverrides/Override");
+ s_multiElementPaths.insert("/LayerDefinition/GridLayerDefinition/GridScaleRange");
+ s_multiElementPaths.insert("/LayerDefinition/GridLayerDefinition/GridScaleRange/ColorStyle/ColorRule");
+ //SymbolDefinition-2.4.0.xsd (schema has been additive, so this includes older versions as well)
+ s_multiElementPaths.insert("/SimpleSymbolDefinition/ParameterDefinition/Parameter");
+ s_multiElementPaths.insert("/CompoundSymbolDefinition/SimpleSymbol");
+ s_multiElementPaths.insert("/SimpleSymbolDefinition/Graphics/Path");
+ s_multiElementPaths.insert("/SimpleSymbolDefinition/Graphics/Image");
+ s_multiElementPaths.insert("/SimpleSymbolDefinition/Graphics/Text");
+ //MapDefinition-2.4.0.xsd (schema has been additive, so this includes older versions as well)
+ s_multiElementPaths.insert("/MapDefinition/MapLayer");
+ s_multiElementPaths.insert("/MapDefinition/MapLayerGroup");
+ s_multiElementPaths.insert("/MapDefinition/BaseMapDefinition/BaseLayerGroup");
+ s_multiElementPaths.insert("/MapDefinition/BaseMapDefinition/BaseLayerGroup/BaseMapLayer");
+ s_multiElementPaths.insert("/MapDefinition/Watermarks/Watermark");
+ //WebLayout-2.6.0.xsd (schema has been additive, so this includes older versions as well)
+ s_multiElementPaths.insert("/WebLayout/ToolBar/Button");
+ s_multiElementPaths.insert("/WebLayout/ToolBar/Button/SubItem");
+ s_multiElementPaths.insert("/WebLayout/ContextMenu/MenuItem");
+ s_multiElementPaths.insert("/WebLayout/ContextMenu/MenuItem/SubItem");
+ s_multiElementPaths.insert("/WebLayout/TaskPane/TaskBar/MenuButton");
+ s_multiElementPaths.insert("/WebLayout/CommandSet/Command");
+ //LoadProcedure-2.2.0.xsd (schema has been additive, so this includes older versions as well)
+ s_multiElementPaths.insert("/LoadProcedure/SdfLoadProcedure/SourceFile");
+ s_multiElementPaths.insert("/LoadProcedure/SdfLoadProcedure/ResourceId");
+ s_multiElementPaths.insert("/LoadProcedure/DwfLoadProcedure/SourceFile");
+ s_multiElementPaths.insert("/LoadProcedure/DwfLoadProcedure/ResourceId");
+ s_multiElementPaths.insert("/LoadProcedure/ShpLoadProcedure/SourceFile");
+ s_multiElementPaths.insert("/LoadProcedure/ShpLoadProcedure/ResourceId");
+ s_multiElementPaths.insert("/LoadProcedure/DwgLoadProcedure/SourceFile");
+ s_multiElementPaths.insert("/LoadProcedure/DwgLoadProcedure/ResourceId");
+ s_multiElementPaths.insert("/LoadProcedure/DwgLoadProcedure/FileComponents/FileComponent");
+ s_multiElementPaths.insert("/LoadProcedure/DwgLoadProcedure/LayerComponents/LayerComponent");
+ s_multiElementPaths.insert("/LoadProcedure/RasterLoadProcedure/SourceFile");
+ s_multiElementPaths.insert("/LoadProcedure/RasterLoadProcedure/ResourceId");
+ s_multiElementPaths.insert("/LoadProcedure/RasterLoadProcedure/GeoReferenceOverride");
+ s_multiElementPaths.insert("/LoadProcedure/SQLiteLoadProcedure/SourceFile");
+ s_multiElementPaths.insert("/LoadProcedure/SQLiteLoadProcedure/ResourceId");
+ //PrintLayout-1.0.0.xsd
+ s_multiElementPaths.insert("/PrintLayout/CustomLogos/Logo");
+ s_multiElementPaths.insert("/PrintLayout/CustomText/Text");
+ //ApplicationDefinition-1.0.0.xsd
+ s_multiElementPaths.insert("/ApplicationDefinition/WidgetSet");
+ s_multiElementPaths.insert("/ApplicationDefinition/WidgetSet/Container");
+ s_multiElementPaths.insert("/ApplicationDefinition/WidgetSet/Container/Item");
+ s_multiElementPaths.insert("/ApplicationDefinition/WidgetSet/Container/Item/Item");
+ s_multiElementPaths.insert("/ApplicationDefinition/MapSet/MapGroup");
+ s_multiElementPaths.insert("/ApplicationDefinition/MapSet/MapGroup/Map");
+ //ApplicationDefinitionInfo-1.0.0.xsd
+ s_multiElementPaths.insert("/ApplicationDefinitionWidgetInfoSet/WidgetInfo");
+ s_multiElementPaths.insert("/ApplicationDefinitionWidgetInfoSet/WidgetInfo/ContainableBy");
+ s_multiElementPaths.insert("/ApplicationDefinitionWidgetInfoSet/WidgetInfo/Parameter");
+ s_multiElementPaths.insert("/ApplicationDefinitionWidgetInfoSet/WidgetInfo/Parameter/AllowedValue");
+ s_multiElementPaths.insert("/ApplicationDefinitionContainerInfoSet/ContainerInfo");
+ s_multiElementPaths.insert("/ApplicationDefinitionTemplateInfoSet/TemplateInfo");
+ s_multiElementPaths.insert("/ApplicationDefinitionTemplateInfoSet/TemplateInfo/Panel");
+ //BatchPropertyCollection-1.0.0.xsd
+ s_multiElementPaths.insert("/BatchPropertyCollection/PropertyCollection");
+ s_multiElementPaths.insert("/BatchPropertyCollection/PropertyCollection/Property");
+ //ClassDefinition-3.3.0.xsd
+ s_multiElementPaths.insert("/ClassDefinition/Properties/Property");
+ s_multiElementPaths.insert("/ClassDefinition/Properties/Property/SpecificGeometryTypes/Type");
+ //DataStoreList-1.0.0.xsd
+ s_multiElementPaths.insert("/DataStoreList/DataStore");
+ //DrawingSectionList-1.0.0.xsd
+ s_multiElementPaths.insert("/DrawingSectionList/Section");
+ //DrawingSectionResourceList-1.0.0.xsd
+ s_multiElementPaths.insert("/DrawingSectionResourceList/SectionResource");
+ //FdoLongTransactionList-1.0.0.xsd
+ s_multiElementPaths.insert("/FdoLongTransactionList/LongTransaction");
+ //FdoProviderCapabilities-1.0.0.xsd
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Connection/SpatialContextExtent/Type");
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Schema/Class/Type");
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Schema/Data/Type");
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Command/SupportedCommands/Type");
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Filter/Condition/Type");
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Filter/Spatial/Operation");
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Filter/Distance/Operation");
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Expression/Type/Name");
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Expression/FunctionDefinitionList/FunctionDefinition");
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Expression/FunctionDefinitionList/FunctionDefinition/ArgumentDefinitionList/ArgumentDefinition");
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Geometry/Types/Type");
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Geometry/Components/Type");
+ //FdoProviderCapabilities-1.1.0.xsd
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Schema/SupportedAutoGeneratedTypes");
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Expression/FunctionDefinitionList/FunctionDefinition/SignatureDefinitionCollection/SignatureDefinition");
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Expression/FunctionDefinitionList/FunctionDefinition/SignatureDefinitionCollection/SignatureDefinition/ArgumentDefinitionList/ArgumentDefinition");
+ s_multiElementPaths.insert("/FeatureProviderCapabilities/Expression/FunctionDefinitionList/FunctionDefinition/SignatureDefinitionCollection/SignatureDefinition/ArgumentDefinitionList/ArgumentDefinition/PropertyValueConstraintList/Value");
+ //FdoSpatialContextList-1.0.0.xsd
+ s_multiElementPaths.insert("/FdoSpatialContextList/SpatialContext");
+ //FeatureProviderRegistry-1.0.0.xsd
+ s_multiElementPaths.insert("/FeatureProviderRegistry/FeatureProvider");
+ s_multiElementPaths.insert("/FeatureProviderRegistry/FeatureProvider/ConnectionProperties/ConnectionProperty");
+ s_multiElementPaths.insert("/FeatureProviderRegistry/FeatureProvider/ConnectionProperties/ConnectionProperty/Value");
+ //FeatureSchemaCollection-3.3.0.xsd
+ s_multiElementPaths.insert("/FeatureSchemaCollection/FeatureSchema");
+ s_multiElementPaths.insert("/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition");
+ s_multiElementPaths.insert("/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property");
+ s_multiElementPaths.insert("/FeatureSchemaCollection/FeatureSchema/Classes/ClassDefinition/Properties/Property/SpecificGeometryTypes/Type");
+ //Group-1.0.0.xsd
+ s_multiElementPaths.insert("/Group/Users/User");
+ //GroupList-1.0.0.xsd
+ s_multiElementPaths.insert("/GroupList/Group");
+ //ProfileResult-2.4.0.xsd
+ s_multiElementPaths.insert("/ProfileResult/ProfileRenderMap/ProfileRenderLayers/ProfileRenderLayer");
+ s_multiElementPaths.insert("/ProfileResult/ProfileRenderMap/ProfileRenderSelection/ProfileSelectedRenderLayer");
+ s_multiElementPaths.insert("/ProfileResult/ProfileRenderMap/ProfileRenderWatermarks/ProfileRenderWatermark");
+ //RepositoryList-1.0.0.xsd
+ s_multiElementPaths.insert("/RepositoryList/Repository");
+ //ResourceDataList-1.0.0.xsd
+ s_multiElementPaths.insert("/ResourceDataList/ResourceData");
+ //ResourceDocumentHeader-1.0.0.xsd
+ s_multiElementPaths.insert("/ResourceDocumentHeader/Metadata/Simple/Property");
+ //ResourceList-1.0.0.xsd
+ s_multiElementPaths.insert("/ResourceList/ResourceFolder");
+ s_multiElementPaths.insert("/ResourceList/ResourceFolder/ResourceFolderHeader/Security/Users/User"); //ResourceSecurity-1.0.0.xsd
+ s_multiElementPaths.insert("/ResourceList/ResourceFolder/ResourceFolderHeader/Security/Groups/Group"); //ResourceSecurity-1.0.0.xsd
+ s_multiElementPaths.insert("/ResourceList/ResourceDocument");
+ s_multiElementPaths.insert("/ResourceList/ResourceDocument/ResourceDocumentHeader/Security/Users/User"); //ResourceSecurity-1.0.0.xsd
+ s_multiElementPaths.insert("/ResourceList/ResourceDocument/ResourceDocumentHeader/Security/Groups/Group"); //ResourceSecurity-1.0.0.xsd
+ s_multiElementPaths.insert("/ResourceList/ResourceDocument/ResourceDocumentHeader/Metadata/Simple/Property");
+ //ResourcePackageManifest-1.0.0.xsd
+ s_multiElementPaths.insert("/ResourcePackageManifest/Operations/Operation");
+ s_multiElementPaths.insert("/ResourcePackageManifest/Operations/Operation/Parameters/Parameter");
+ //ResourceReferenceList-1.0.0.xsd
+ s_multiElementPaths.insert("/ResourceReferenceList/ResourceId");
+ //RuntimeMap-2.6.0.xsd
+ s_multiElementPaths.insert("/RuntimeMap/Group");
+ s_multiElementPaths.insert("/RuntimeMap/Layer");
+ s_multiElementPaths.insert("/RuntimeMap/Layer/ScaleRange");
+ s_multiElementPaths.insert("/RuntimeMap/Layer/ScaleRange/FeatureStyle");
+ s_multiElementPaths.insert("/RuntimeMap/Layer/ScaleRange/FeatureStyle/Rule");
+ s_multiElementPaths.insert("/RuntimeMap/FiniteDisplayScale");
+ //SelectAggregate-1.0.0.xsd
+ s_multiElementPaths.insert("/PropertySet/PropertyDefinitions/PropertyDefinition");
+ s_multiElementPaths.insert("/PropertySet/Properties/PropertyCollection");
+ s_multiElementPaths.insert("/PropertySet/Properties/PropertyCollection/Property");
+ //ServerList-1.0.0.xsd
+ s_multiElementPaths.insert("/ServerList/Server");
+ //SqlSelect-1.0.0.xsd
+ s_multiElementPaths.insert("/RowSet/ColumnDefinitions");
+ s_multiElementPaths.insert("/RowSet/ColumnDefinitions/Column");
+ s_multiElementPaths.insert("/RowSet/Rows/Row");
+ s_multiElementPaths.insert("/RowSet/Rows/Row/Column");
+ //StringCollection-1.0.0.xsd
+ s_multiElementPaths.insert("/StringCollection/Item");
+ //TileSetDefinition-3.0.0.xsd
+ s_multiElementPaths.insert("/TileSetDefinition/TileStoreParameters/Parameter");
+ s_multiElementPaths.insert("/TileSetDefinition/BaseMapLayerGroup");
+ s_multiElementPaths.insert("/TileSetDefinition/BaseMapLayerGroup/BaseMapLayer");
+ //TileProviderList-1.0.0.xsd
+ s_multiElementPaths.insert("/TileProviderList/TileProvider");
+ s_multiElementPaths.insert("/TileProviderList/TileProvider/ConnectionProperties/ConnectionProperty");
+ s_multiElementPaths.insert("/TileProviderList/TileProvider/ConnectionProperties/ConnectionProperty/Value");
+ //UnmanagedDataList-1.0.0.xsd
+ s_multiElementPaths.insert("/UnmanagedDataList/UnmanagedDataFolder");
+ s_multiElementPaths.insert("/UnmanagedDataList/UnmanagedDataFile");
+ //UserList-1.0.0.xsd
+ s_multiElementPaths.insert("/UserList/User");
+ s_multiElementPaths.insert("/UserList/Group");
+ //Miscellaneous MapGuide response types that don't have a formal schema
+ s_multiElementPaths.insert("/FeatureInformation/FeatureSet/Layer");
+ s_multiElementPaths.insert("/FeatureInformation/FeatureSet/Layer/Class/ID");
+ s_multiElementPaths.insert("/FeatureInformation/SelectedFeatures/SelectedLayer");
+ s_multiElementPaths.insert("/FeatureInformation/SelectedFeatures/SelectedLayer/LayerMetadata/Property");
+ s_multiElementPaths.insert("/FeatureInformation/SelectedFeatures/SelectedLayer/Feature");
+ s_multiElementPaths.insert("/FeatureInformation/SelectedFeatures/SelectedLayer/Feature/Property");
+
+ return true;
+}
\ No newline at end of file
Modified: trunk/MgDev/Web/src/HttpHandler/XmlJsonConvert.h
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/XmlJsonConvert.h 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/HttpHandler/XmlJsonConvert.h 2017-04-27 12:44:20 UTC (rev 9181)
@@ -22,6 +22,11 @@
#include "System/XmlUtil.h"
#include "JsonDoc.h"
+#define XML_DATA_TYPE_NUM_INT 1
+#define XML_DATA_TYPE_NUM_DOUBLE 2
+#define XML_DATA_TYPE_BOOLEAN 3
+#define XML_DATA_TYPE_STRING 4
+
/// \cond INTERNAL
class MgXmlJsonConvert
{
@@ -36,19 +41,30 @@
/// Methods
public:
- void ToJson(Ptr<MgByteReader> &byteReader);
- void ToJson(const string &xmlString, string &jsonString);
+ void ToJson(Ptr<MgByteReader> &byteReader, bool bClean = false);
+ void ToJson(const string &xmlString, string &jsonString, bool bClean = false);
private:
- void XmlToJsonNode(DOMNode *node);
+ void XmlToJsonNode(DOMNode *node, bool bClean);
bool ValidateTextContent(const string &textContent);
- void ProcessObjectNode(DOMNode *node);
- void ProcessArrayNode(int index, DOMNode *node);
+ void ProcessObjectNode(DOMNode *node, bool bClean);
+ void ProcessArrayNode(int index, DOMNode *node, bool bClean);
+ static bool GetAttributePath(DOMNode* attribute, DOMNode* parent, string& path, const XMLCh* suffix = NULL);
+ static bool GetAttributeType(DOMNode* attribute, DOMNode* parent, int& type, const XMLCh* suffix = NULL);
+
+ static bool GetElementPath(DOMNode* node, string& path, const XMLCh* suffix = NULL);
+ static bool GetElementType(DOMNode* node, int& type, const XMLCh* suffix = NULL);
+ static bool IsMultiple(DOMNode* node, bool& isMultiple, const XMLCh* suffix = NULL);
/// Data Members
private:
MgXmlUtil m_xmlUtil;
MgJsonDoc m_jsonDoc;
+
+private:
+ static bool Initialize();
+private:
+ static bool m_isInitialized;
};
/// \endcond
Modified: trunk/MgDev/Web/src/MapGuideApi/MapGuideApiGen.xml
===================================================================
--- trunk/MgDev/Web/src/MapGuideApi/MapGuideApiGen.xml 2017-04-24 15:14:11 UTC (rev 9180)
+++ trunk/MgDev/Web/src/MapGuideApi/MapGuideApiGen.xml 2017-04-27 12:44:20 UTC (rev 9181)
@@ -325,6 +325,7 @@
<Header path="../../../Common/PlatformBase/Services/FeatureSchema.h" />
<Header path="../../../Common/PlatformBase/Services/FeatureSchemaCollection.h" />
<Header path="../../../Common/PlatformBase/Services/FeatureService.h" />
+ <Header path="../../../Common/PlatformBase/Services/GeoJsonWriter.h" />
<Header path="../../../Common/PlatformBase/Services/GeometricPropertyDefinition.h" />
<Header path="../../../Common/PlatformBase/Services/GeometryProperty.h" />
<Header path="../../../Common/PlatformBase/Services/GeometryTypeInfo.h" />
Property changes on: trunk/MgDev/Web/src/viewerfiles
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/2.4/MgDev/Web/src/viewerfiles:6738-6741,6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev/Web/src/viewerfiles:8288-8292,8297
/branches/3.1/MgDev/Web/src/viewerfiles:9058-9059
/sandbox/adsk/2.2gp/Web/src/viewerfiles:5392
/sandbox/adsk/3.0m/Web/src/viewerfiles:8607
/sandbox/jng/createruntimemap/Web/src/viewerfiles:7486-7555
/sandbox/jng/v30/Web/src/viewerfiles:8226-8227
+ /branches/2.4/MgDev/Web/src/viewerfiles:6738-6741,6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev/Web/src/viewerfiles:8288-8292,8297
/branches/3.1/MgDev/Web/src/viewerfiles:9058-9059
/sandbox/adsk/2.2gp/Web/src/viewerfiles:5392
/sandbox/adsk/3.0m/Web/src/viewerfiles:8607
/sandbox/jng/clean_json/Web/src/viewerfiles:8818-9180
/sandbox/jng/createruntimemap/Web/src/viewerfiles:7486-7555
/sandbox/jng/v30/Web/src/viewerfiles:8226-8227
More information about the mapguide-commits
mailing list