Esempio n. 1
0
 *     @SWG\Get(
 *        path="/services/getschemamapping.{type}",
 *        operationId="GetSchemaMapping",
 *        summary="Gets schema mapping of a feature source",
 *        tags={"services"},
 *          @SWG\Parameter(name="session", in="query", required=false, type="string", description="Your MapGuide Session ID"),
 *          @SWG\Parameter(name="provider", in="query", required=true, type="string", description="The FDO Provider"),
 *          @SWG\Parameter(name="connection", in="query", required=true, type="string", description="The partial connection string"),
 *          @SWG\Parameter(name="type", in="path", required=true, type="string", description="xml or json", enum={"json", "xml"}),
 *        @SWG\Response(response=400, description="You supplied a bad request due to one or more missing or invalid parameters"),
 *        @SWG\Response(response=401, description="Session ID or MapGuide credentials not specified"),
 *        @SWG\Response(response=500, description="An error occurred during the operation")
 *     )
 */
$app->get("/services/getschemamapping.:format", function ($format) use($app) {
    $ctrl = new MgFeatureServiceController($app);
    $ctrl->GetSchemaMapping($format);
});
/**
 *     @SWG\Post(
 *        path="/services/copyresource",
 *        operationId="CopyResource",
 *        summary="Copies a resource from one resource ID to another",
 *        tags={"services"},
 *          @SWG\Parameter(name="source", in="formData", required=true, type="string", description="The Source Resource ID"),
 *          @SWG\Parameter(name="destination", in="formData", required=true, type="string", description="The Target Resource ID"),
 *          @SWG\Parameter(name="overwrite", in="formData", required=false, type="boolean", description="Indicates whether to overwrite the target resource if it exists"),
 *        @SWG\Response(response=400, description="You supplied a bad request due to one or more missing or invalid parameters"),
 *        @SWG\Response(response=401, description="Session ID or MapGuide credentials not specified"),
 *        @SWG\Response(response=500, description="An error occurred during the operation")
 *     )
Esempio n. 2
0
 *        summary="Queries features from the specified feature source",
 *        tags={"session"},
 *          @SWG\Parameter(name="session", in="path", required=true, type="string", description="Your MapGuide Session ID"),
 *          @SWG\Parameter(name="resName", in="path", required=true, type="string", description="The feature source name"),
 *          @SWG\Parameter(name="schemaName", in="path", required=true, type="string", description="The FDO schema name"),
 *          @SWG\Parameter(name="className", in="path", required=true, type="string", description="The class name"),
 *          @SWG\Parameter(name="aggregateType", in="path", required=true, type="string", description="aggregate type", enum={"count", "bbox", "distinctvalues"}),
 *          @SWG\Parameter(name="type", in="path", required=true, type="string", description="xml or json", enum={"json", "xml"}),
 *        @SWG\Response(response=400, description="You supplied a bad request due to one or more missing or invalid parameters"),
 *        @SWG\Response(response=401, description="Session ID or MapGuide credentials not specified"),
 *        @SWG\Response(response=500, description="An error occurred during the operation")
 *     )
 */
$app->get("/session/:sessionId/:resName.FeatureSource/aggregates.:format/:type/:schemaName/:className", function ($sessionId, $resName, $format, $type, $schemaName, $className) use($app) {
    $resId = new MgResourceIdentifier("Session:{$sessionId}//{$resName}.FeatureSource");
    $ctrl = new MgFeatureServiceController($app);
    $ctrl->SelectAggregates($resId, $schemaName, $className, $type, $format);
});
//========================= Resource Service APIs ================================
/**
 *     @SWG\Get(
 *        path="/session/{session}/{resName}/datalist.{type}",
 *        operationId="EnumerateResourceData",
 *        summary="Lists the resource data for a given resource",
 *        tags={"session"},
 *          @SWG\Parameter(name="session", in="path", required=true, type="string", description="Your MapGuide Session ID"),
 *          @SWG\Parameter(name="resName", in="path", required=true, type="string", description="The resource name (including extension)"),
 *          @SWG\Parameter(name="type", in="path", required=true, type="string", description="xml or json", enum={"json", "xml"}),
 *        @SWG\Response(response=400, description="You supplied a bad request due to one or more missing or invalid parameters"),
 *        @SWG\Response(response=401, description="Session ID or MapGuide credentials not specified"),
 *        @SWG\Response(response=500, description="An error occurred during the operation")
Esempio n. 3
0
 *          @SWG\Parameter(name="connection", in="query", required=true, type="string", description="The partial connection string"),
 *          @SWG\Parameter(name="type", in="path", required=true, type="string", description="xml or json", enum={"json", "xml"}),
 *        @SWG\Response(response=400, description="You supplied a bad request due to one or more missing or invalid parameters"),
 *        @SWG\Response(response=401, description="Session ID or MapGuide credentials not specified"),
 *        @SWG\Response(response=500, description="An error occurred during the operation")
 *     )
 */
$app->get("/providers/:providerName/datastores.:format", function ($providerName, $format) use($app) {
    $ctrl = new MgFeatureServiceController($app);
    $ctrl->EnumerateDataStores($providerName, $format);
});
/**
 *     @SWG\Get(
 *        path="/providers/{providerName}/connectvalues.{type}/{propName}",
 *        operationId="GetConnectPropertyValues",
 *        summary="Enumerates the available values for a given connection property.",
 *        tags={"providers"},
 *          @SWG\Parameter(name="session", in="query", required=false, type="string", description="Your MapGuide Session ID"),
 *          @SWG\Parameter(name="providerName", in="path", required=true, type="string", description="The FDO Provider"),
 *          @SWG\Parameter(name="propName", in="path", required=true, type="string", description="The FDO Provider"),
 *          @SWG\Parameter(name="connection", in="query", required=false, type="string", description="The partial connection string"),
 *          @SWG\Parameter(name="type", in="path", required=true, type="string", description="xml or json", enum={"json", "xml"}),
 *        @SWG\Response(response=400, description="You supplied a bad request due to one or more missing or invalid parameters"),
 *        @SWG\Response(response=401, description="Session ID or MapGuide credentials not specified"),
 *        @SWG\Response(response=500, description="An error occurred during the operation")
 *     )
 */
$app->get("/providers/:providerName/connectvalues.:format/:propName", function ($providerName, $format, $propName) use($app) {
    $ctrl = new MgFeatureServiceController($app);
    $ctrl->GetConnectPropertyValues($providerName, $propName, $format);
});