fmeobjects.FMESession
|
Passes the configuration information to the session. |
This method performs a modification of the str from parsable FME encoded text back to a non-encoded form. |
|
|
This method performs a modification of the |
Returns the current build number of FME. |
|
Returns directory FME was installed into. |
|
Returns the current version of FME. |
|
Returns a list of all property values. |
|
Returns the last error message that FME encountered. |
|
Returns the last error number that FME encountered. |
|
Get the stack trace associated with the last error that FME encountered. |
|
|
This method is used to retrieve a variety of information on a |
|
Retrieves the schema features defined in the DEF lines that are prefixed with 'prefix' in the 'schemaFile'. |
|
Returns the values of the keyword for the session configuration. |
|
Dumps the current session configuration to the logfile. |
|
Adds a new keyword and value to the session configuration. |
- class FMESession
FME Session Class
init(directives)
This object initializes the FMEObjects system. In order for the passed-in directives to take effect, this must be the first object created in your application.
- Parameters:
directives (dict) – Specify one or more additional directives to the session. All objects in the
dict
must bestr
.- Raises:
FMEException – An exception is raised if an error occurred.
- __init__(*args, **kwargs)
- configure(configRow)
Passes the configuration information to the session. One use of this function is to define configuration lines for functions.
- Parameters:
- Return type:
None
- Raises:
FMEException – An exception is raised if an error occurred.
- decodeFromFMEParsableText(parsableText)
This method performs a modification of the str from parsable FME encoded text back to a non-encoded form. For example, ‘<semicolon>’ will be replaced with ‘;’. If the decoding fails for a particular character sequence, the resulting output will retain that character sequence.
- encodeToFMEParsableText(inputText)
This method performs a modification of the
str
to parsable FME encoded text. For example, ‘;’ will be replaced with the character sequence ‘<semicolon>’. If the encoding fails for a particular character sequence, the resulting output will retain that character sequence.
- fmeHome()
Returns directory FME was installed into.
- Return type:
- Returns:
The home directory of FME.
- getAllProperties()
Returns a list of all property values.
- Return type:
- Returns:
The returned
dict
will contain a mapping of each property to its value for all properties found.- Raises:
FMEException – An exception is raised if no properties were found.
- getLastErrorMsg()
Returns the last error message that FME encountered.
- Return type:
- Returns:
The last error message.
- getLastErrorNum()
Returns the last error number that FME encountered.
- Return type:
- Returns:
The last error number.
- getLastErrorStackTrace()
Get the stack trace associated with the last error that FME encountered.
- Return type:
- getProperties(propertyCategory, properties)
This method is used to retrieve a variety of information on a
FMESession
or use a session to perform certain operations. The operation performed is determined by a combination of the ‘propertyCategory’ specified and the ‘propertyConfig’ information passed in.- Parameters:
- Return type:
- Returns:
The properties requested. This value is empty in cases where actions are performed.
- Raises:
FMEException – An exception is raised if there was a problem in performing the specified getProperties operation.
- getSchemaFeatures(macros, prefix, schemaFile, schemaFeatures)
Retrieves the schema features defined in the DEF lines that are prefixed with ‘prefix’ in the ‘schemaFile’.
- Parameters:
- Return type:
- Raises:
FMEException – An exception is raised if there was a problem retrieving the schema features.
- getSettings(keyword)
Returns the values of the keyword for the session configuration. The list of str returned will be empty if the keyword is invalid or does not exist in the current session.
- Parameters:
keyword (str) – The keyword for the session configuration.
- Return type:
- Returns:
A list of str containing the settings, or an empty list if the keyword is invalid or does not exist.
- Raises:
FMEException – An exception is raised if an error occurred.
- logSettings(keyword)
Dumps the current session configuration to the logfile. No action will be performed if the keyword is unrecognized.
- Parameters:
keyword (str) – The keyword for the session configuration.
- Return type:
None
- updateSettings(keyword, value)
Adds a new keyword and value to the session configuration.
- Parameters:
- Return type:
None
- Raises:
FMEException – An exception is raised if there was a problem in adding the new keyword and value.