Module fmeobjects :: Class FMEUniversalWriter
[hide private]
[frames] | no frames]

Class FMEUniversalWriter


init(writerName, cacheFeatures, directives)

Create a FME writer to write data to a format or system. Only the writer's type mneumonic, as found in the FME Reference Manual Part II, need be passed in. Any parameters needed for the writer will be passed to it via its `open' call.

Instance Methods [hide private]
 
__init__(writerName, cacheFeatures, directives)
x.__init__(...) initializes x; see help(type(x)) for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
None
abort()
Terminate the writer mid-stream.
None
addSchema(feature)
Provide either a generic FME theme definition or a format specific definition for a theme.
None
close()
Close the writer.
None
commitTransaction()
Commit the current Transaction.
list
getSchemaFeatures()
Get a list of the definition features for the writer.
None
open(datasetName, parameters)
Open the writer.
None
rollbackTransaction()
Rollback the current Transaction.
None
startTransaction()
Start a new transaction.
None
write(feature)
Write the next feature to the data source.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(writerName, cacheFeatures, directives)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • writerName (string)
  • directives (dict or list of strings) - Specify one or more additional directives to the writer. All elements in this collection must be strings. A list should be used if one key is to be set to multiple values. If a list is passed in, key-value pairs such as those in a Dict must be placed side by side. For example, the key should be placed in the first list element, followed by the value for the key.

    All the directives applicable to the reader are allowed for the writer. However, the writer will ignore the IDLIST directive. It also interprets the user pipeline directive in a slightly different way -- for the writer, features are sent through the user pipeline BEFORE being sent to the output writer.

Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

abort()

 

Terminate the writer mid-stream.

Returns: None
Raises:
  • FMEException - An FMEException is raised if there was an error.

addSchema(feature)

 

Provide either a generic FME theme definition or a format specific definition for a theme.

Parameters:
  • feature (FMEFeature) - The feature containing the theme definition.
Returns: None
Raises:
  • FMEException - An FMEException is raised if there was an error.

close()

 

Close the writer.

Returns: None
Raises:
  • FMEException - An FMEException is raised if there was an error.

commitTransaction()

 

Commit the current Transaction. For formats or systems which do not have the notion of a Transaction, nothing is done.

Returns: None
Raises:
  • FMEException - An FMEException is raised if there was an error.

getSchemaFeatures()

 

Get a list of the definition features for the writer. This enables applications to determine exactly what the definition features look like in the destination system.

Returns: list
Raises:
  • FMEException - An FMEException is raised if there was an error.

open(datasetName, parameters)

 

Open the writer.

Parameters:
  • datasetName (string) - The name of the dataset.
  • parameters (list of strings) - A list of parameters.
Returns: None
Raises:
  • FMEException - An FMEException is raised if there was an error.

rollbackTransaction()

 

Rollback the current Transaction. For formats or systems which do not have the notion of a Transaction, nothing is done.

Returns: None
Raises:
  • FMEException - An FMEException is raised if there was an error.

startTransaction()

 

Start a new transaction. For formats or systems which do not have the notion of a Transaction, nothing is done.

Returns: None
Raises:
  • FMEException - An FMEException is raised if there was an error.

write(feature)

 

Write the next feature to the data source.

Parameters:
  • feature (FMEFeature) - The next feature to write.
Returns: None
Raises:
  • FMEException - An FMEException is raised if there was an error.