span8
span4
span8
span4
Data delivery may make use of the following components
As a learning exercise,here are two different ways to access the Data Download service.Try them out to get a feel for working with it directly and through the REST API.
To retrieve a workspace's published parameters using REST API,you can visit
http://
Responses are also available in JSON or XML - set the Accept header,or use the parameter "accept",which can be set to "json" or "xml".有关更多信息,see the API documentation at http://
The most thorough explanation of how to build a good workspace for data download is found in the FME Server Tutorial.See the sectionUsing Parameters with FME Server.You may also wish to sign up for afree training sessionwhich covers this material.
Common techniques for building a Data Download workspace include:
Once you have built a workspace,you will need to build a web form to collect user input and submit the request to run the workspace.
Using the instructions for the REST interface above,retrieve the parameters for the workspace.You will need the "name" of each parameter,and its "value" options.
See the resources atW3Schoolsfor more information about HTML forms.
For a working example of a simple form you can modify and interact with live,see theRun Job Synchronously demoon the FME Server Developer Playground
If you just want to link to the data after submitting the form,you can request an HTML response from FME Server.This will return a web page with a link to the data.The styling of the response pagecan be customized.
See "Next Steps" below if you want to do something more complex.
If you use the Data Streaming service,you can create a workspace that outputs XML or JSON,and parse it using JavaScript,or simply display the data immediately.For more information about parsing XML and JSON,see these resources onXMLandJSON.
You can also run a workspace through the data download service in "async" mode to have it send an email upon completion.You will need to configure an email subscriber to the DATADOWNLOAD_ASYNC_JOB_SUCCESS topic.SeeSending Email Part 1for more details.
Creating a static form is all very well,but what if you don't know ahead of time what the options of the published parameters will be?The solution is to populate the form dynamically.
To see interactive examples of using JavaScript to dynamically generate a form,look at thePopulate Forms Dynamicallydemo at the FME Server Developer Playground.Also look into the FMEServer.gnerateFormItems() call in theFME Server JavaScript API doc.
To restrict the use of the web form to authenticated users,you can also request a username and password,and generate a token.The token must be appended as a parameter.A token can be generated on the fly by asking for a username and password.SeeRequest a Tokenon the FME Server Developer Playground.
Alternatively,for public access,you could assign the fmeguest role permissions to run the workspace through the REST interface.See the FME Server Documentation onPermissions.
Or,if you already have Active Directory setup in your organization,leverage it to define security roles in FME Server usingActive Directory groups.
So far,we've hinted at what you can do with a workspace URL request link once you've generated it,but here are some specific suggestions:
Stream the data instead of downloading.To use streaming,simply publish to the Data Streaming service instead of Data Download.Great for PDF,KML,HTML,RSS and more.
Create a more complex download zip file by writing additional files and directories to the output directory.
Send a custom email with an attachment or a link to the data.Read the introductory material atEmail in FME Serverand then work through theSending emailtutorial.
Integrate a web map
Since FME Server 2013,an FTP Subscriber is included.This means you can automatically upload the results of a transformation to an FTP site.See theFTP subscriber documentationfor more details.
Allow users to interactively select an area of interest,and send them only the relevant data.Demos are available using:
In some cases,you may wish to change some settings or configure components differently for better data distribution:
Converting to PostGIS: Write to an Existing Table
Viewing and Inspecting PostGIS Data
Converting to PostGIS: Create,Drop or Truncate a Table
Performing spatial queries on database tables using the FeatureReader
Writing custom data types to an Oracle table
Writing to Database Tables that contain Multiple Geometry Columns
Handling Data that contains Multiple Geometry columns
Let the Database Do the Work: Reading
Read Oracle Sequence Nextval and use in Counter
Making use of Oracle Sequences when working with Oracle Tables
© 2019 亚搏在线Safe Software Inc |Legal