fmeobjects.FMESession¶

FMESession.configure (configRow) |
Passes the configuration information to the session. |
FMESession.decodeFromFMEParsableText (…) |
This method performs a modification of the unicode string from parsable FME encoded text back to a non-encoded form. |
FMESession.encodeToFMEParsableText (inputText) |
This method performs a modification of the six.text_type to parsable FME encoded text. |
FMESession.fmeBuildNumber () |
Returns the current build number of FME. |
FMESession.fmeHome () |
Returns directory FME was installed into. |
FMESession.fmeVersion () |
Returns the current version of FME. |
FMESession.getAllProperties () |
Returns a list of all property values. |
FMESession.getLastErrorMsg () |
Returns the last error message that FME encountered. |
FMESession.getLastErrorNum () |
Returns the last error number that FME encountered. |
FMESession.getLastErrorStackTrace () |
Get the stack trace associated with the last error that FME encountered. |
FMESession.getProperties (propertyCategory, …) |
This method is used to retrieve a variety of information on a FMESession or use a session to perform certain operations. |
FMESession.getSchemaFeatures (macros, prefix, …) |
Retrieves the schema features defined in the DEF lines that are prefixed with ‘prefix’ in the ‘schemaFile’. |
FMESession.getSettings (keyword) |
Returns the values of the keyword for the session configuration. |
FMESession.logSettings (keyword) |
Dumps the current session configuration to the logfile. |
FMESession.updateSettings (keyword, value) |
Adds a new keyword and value to the session configuration. |
-
class
FMESession
¶ Bases:
object
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 bestring
. Applicable directives can be found in the FME Configuration section of the ‘FME Fundamentals’ documentation.Raises: FMEException – An exception is raised if an error occurred. -
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
configure
(configRow)¶ Passes the configuration information to the session. One use of this function is to define configuration lines for functions.
Parameters: configRow (list[str]) – The configuration information. Return type: None Raises: FMEException – An exception is raised if an error occurred.
-
decodeFromFMEParsableText
(parsableText)¶ This method performs a modification of the unicode string 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.
Parameters: parsableText (six.string_types) – FME encoded text as a string or unicode. Return type: unicode Returns: Non-encoded text as unicode.
-
encodeToFMEParsableText
(inputText)¶ This method performs a modification of the
six.text_type
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.Parameters: inputText (six.text_type) – Non-encoded text. Return type: unicode Returns: FME encoded text.
-
fmeHome
()¶ Returns directory FME was installed into.
Return type: str Returns: The home directory of FME.
-
getAllProperties
()¶ Returns a list of all property values.
Return type: dict 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: str Returns: The last error message.
-
getLastErrorNum
()¶ Returns the last error number that FME encountered.
Return type: int Returns: The last error number.
-
getLastErrorStackTrace
()¶ Get the stack trace associated with the last error that FME encountered.
Return type: str
-
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 strings 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: list[str] Returns: A list of strings 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: Raises: FMEException – An exception is raised if there was a problem in adding the new keyword and value.
-