Export
is used to exports a specified set of Landmarks. It is available only in synchronous mode.
The following is an example for using Export
:
getlist_output = landmark_handle.call('GetList', {'Type': u'Landmark', 'Filter': {'LandmarkName': u'land1'}})
The following table summarizes the specification of Export
:
Interface | IDataSource |
Description | Imports a set of Landmarks. |
Response Model | Synchronous |
Pre-condition | IDataSource interface is loaded. |
Post-condition | The default or active database is opened for reading landmarks and categories. A default database is created, if it does not exist and is set as active. Landmarks is exported to the specified file. |
Input Parameters
Input parameter specifies the Type and Data for performing the operation.
|
Output Parameters
Output parameters contain ErrorCode
, and ErrorMessage
if the operation fails.
|
Errors
The following table lists the error codes and their values:
|
Error Messages
The following table lists the error messages and their description:
|
Example
The following sample code illustrates how to export a set of landmarks:
import scriptext landmark_handle = scriptext.load('Service.Landmarks', 'IDataSource') try: getlist_output = landmark_handle.call('GetList', {'Type': u'Landmark', 'Filter': {'LandmarkName': u'land1'}}) getlist_error = getlist_output['ErrorCode'] if getlist_error != 0: print "GetList error" else: retval = getlist_output['ReturnValue'] id_val = retval['id'] export_output = landmark_handle.call('Export', {'Type': u'Landmark', 'Data': {'DestinationFile': u'c:\data\export_land.txt', 'idList': [id_val], 'MimeType': 'application/vnd.nokia.landmarkcollection+xml'}}) export_error = export_output['ErrorCode'] if export_error != 0: print "Export unsuccessful" else: print "Landmark ecported" except scriptext.ScriptextError, err: print "Error performing the operation : ", err
See About this document... for information on suggesting changes.