[mapguide-commits] r9578 - in trunk/MgDev: . Server/src/Services/Feature

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Jul 17 10:44:35 PDT 2019


Author: jng
Date: 2019-07-17 10:44:35 -0700 (Wed, 17 Jul 2019)
New Revision: 9578

Added:
   trunk/MgDev/Server/src/Services/Feature/OpGetWfsFeatureTotal.cpp
   trunk/MgDev/Server/src/Services/Feature/OpGetWfsFeatureTotal.h
Modified:
   trunk/MgDev/
Log:
Merged revision(s) 9576-9577 from sandbox/jng/wfs_hits:
Add missing files
........


Index: trunk/MgDev
===================================================================
--- trunk/MgDev	2019-07-17 17:41:32 UTC (rev 9577)
+++ trunk/MgDev	2019-07-17 17:44:35 UTC (rev 9578)

Property changes on: trunk/MgDev
___________________________________________________________________
Modified: svn:mergeinfo
## -30,6 +30,6 ##
 /sandbox/jng/utfgrid:9179-9212
 /sandbox/jng/v30:8212-8227
 /sandbox/jng/v4:9511-9519
-/sandbox/jng/wfs_hits:9569-9575
+/sandbox/jng/wfs_hits:9569-9577
 /sandbox/rfc94:5099-5163
 /trunk/MgDev:9397-9399
\ No newline at end of property
Copied: trunk/MgDev/Server/src/Services/Feature/OpGetWfsFeatureTotal.cpp (from rev 9577, sandbox/jng/wfs_hits/Server/src/Services/Feature/OpGetWfsFeatureTotal.cpp)
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/OpGetWfsFeatureTotal.cpp	                        (rev 0)
+++ trunk/MgDev/Server/src/Services/Feature/OpGetWfsFeatureTotal.cpp	2019-07-17 17:44:35 UTC (rev 9578)
@@ -0,0 +1,103 @@
+//
+//  Copyright (C) 2004-2019 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
+//
+
+#include "ServerFeatureServiceDefs.h"
+#include "OpGetWfsFeatureTotal.h"
+#include "ServerFeatureService.h"
+#include "LogManager.h"
+
+MgOpGetWfsFeatureTotal::MgOpGetWfsFeatureTotal() { }
+
+MgOpGetWfsFeatureTotal::~MgOpGetWfsFeatureTotal() { }
+
+void MgOpGetWfsFeatureTotal::Execute()
+{
+    ACE_DEBUG((LM_DEBUG, ACE_TEXT("  (%t) MgOpGetWfsFeatureTotal::Execute()\n")));
+
+    MG_LOG_OPERATION_MESSAGE(L"GetWfsFeatureTotal");
+
+    MG_FEATURE_SERVICE_TRY()
+
+        MG_LOG_OPERATION_MESSAGE_INIT(m_packet.m_OperationVersion, m_packet.m_NumArguments);
+
+    ACE_ASSERT(m_stream != NULL);
+
+    if (4 == m_packet.m_NumArguments)
+    {
+        // Get the feature source
+        Ptr<MgResourceIdentifier> featureSourceId = (MgResourceIdentifier*)m_stream->GetObject();
+
+        // Get the schema name
+        STRING featureClass;
+        m_stream->GetString(featureClass);
+
+        // Get the filter
+        STRING filter;
+        m_stream->GetString(filter);
+
+        // Get the sort criteria
+        INT32 maxFeatures;
+        m_stream->GetInt32(maxFeatures);
+
+        BeginExecution();
+
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(featureSourceId->ToString().c_str());
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(featureClass.c_str());
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(filter.c_str());
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(maxFeatures);
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+        Validate();
+
+        // Execute the operation
+        INT32 total = m_service->GetWfsFeatureTotal(featureSourceId, featureClass, filter, maxFeatures);
+
+        // Write the response
+        EndExecution(total);
+    }
+    else
+    {
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+    }
+
+    if (!m_argsRead)
+    {
+        throw new MgOperationProcessingException(L"MgOpGetWfsReader.Execute",
+            __LINE__, __WFILE__, NULL, L"", NULL);
+    }
+
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgOpGetWfsReader.Execute")
+
+        if (mgException != NULL)
+        {
+            // Failed operation
+            MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+        }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_FEATURE_SERVICE_THROW()
+}
\ No newline at end of file

Copied: trunk/MgDev/Server/src/Services/Feature/OpGetWfsFeatureTotal.h (from rev 9577, sandbox/jng/wfs_hits/Server/src/Services/Feature/OpGetWfsFeatureTotal.h)
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/OpGetWfsFeatureTotal.h	                        (rev 0)
+++ trunk/MgDev/Server/src/Services/Feature/OpGetWfsFeatureTotal.h	2019-07-17 17:44:35 UTC (rev 9578)
@@ -0,0 +1,33 @@
+//
+//  Copyright (C) 2004-2019 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 MG_OP_GET_WFS_FEATURE_TOTAL_H
+#define MG_OP_GET_WFS_FEATURE_TOTAL_H
+
+#include "FeatureOperation.h"
+
+class MgOpGetWfsFeatureTotal : public MgFeatureOperation
+{
+public:
+    MgOpGetWfsFeatureTotal();
+    virtual ~MgOpGetWfsFeatureTotal();
+
+public:
+    virtual void Execute();
+};
+
+#endif
\ No newline at end of file



More information about the mapguide-commits mailing list