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

Class FMEFactoryPipeline


init(MultipleInvocations)

Creates a new factory pipeline object.

init(name)

Constructs a factory pipeline object.

Parameters

Returns: FMEFactoryPipeline

init(name, directives)

Constructs a factory pipeline object.

Parameters

Returns: FMEFactoryPipeline

Instance Methods [hide private]
 
__init__(MultipleInvocations)
x.__init__(...) initializes x; see help(type(x)) for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
None
addFactories(factoryDefFile)
This method is used to add a set of factories to the end of the factory pipeline.
None
addFactory(factoryDef, delimiter)
This method is used to add a new factory to the end of the factory pipeline.
None
allDone()
This method is used to indicate that no more features will be entering the pipeline.
None
configureFunction(functionConfig)
This method is used to specify configuration lines for functions such as @Lookup, @Relate, and @Sql, which require configuration information to operate.
string
getErrorMessage()
If allDone() returns an error, the whole message produced can be retrieved with this method.
FMEFeature or None
getOutputFeature()
This method is used to fetch a feature ready for output from the pipeline.
None
processFeature(feature)
This method is used to insert a feature into the pipeline for processing.
None
setCallback(function)
This method is used to specify the name of a function that will be called by the pipeline when a feature is ready for output.

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__(MultipleInvocations)
(Constructor)

 

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

Overrides: object.__init__

__new__(T, S, ...)

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

addFactories(factoryDefFile)

 

This method is used to add a set of factories to the end of the factory pipeline. If unsuccessful, this method throws an exception.

Parameters:
  • factoryDefFile (string) - Specifies the name of a file containing the factory definitions.
Returns: None
Raises:
  • FMEException - An FMEException is raised if there was an error.

addFactory(factoryDef, delimiter)

 

This method is used to add a new factory to the end of the factory pipeline. If factoryDef is a list of stringsthe factory to be added is specified as a set of tokens; one token for every whitespace-delimited string in the factory definition. Each token is represented as one entry in the 'factoryDef' parameter.

For example, the PolygonFactory show below is be specified using 20 tokens:

  • FACTORY_DEF * PolygonFactory
  • FACTORY_NAME SamplePolygon
  • INPUT FEATURE_TYPE *
  • GROUP_BY someAttr_
  • VERTEX_NODED
  • REMOVE_CORRIDORS
  • OUTPUT POLYGON FEATURE_TYPE poly
  • OUTPUT LINE FEATURE_TYPE line

If factoryDef is a string, it specifies the factory to be added as an ASCII character string. The 'delimiter' parameter specifies the string to be used as delimiter when parsing the 'factoryDef' string for tokens.@type factoryDef: list of strings or String

Parameters:
  • factoryDef - Specifies the factory definition to be added.
  • delimiter ((Optional) String) - Only to be specified if factoryDef is a string, defaults to .
Returns: None
Raises:
  • FMEException - An FMEException is raised if there was an error.

allDone()

 

This method is used to indicate that no more features will be entering the pipeline. Any factories in the pipeline that are still holding features will release them when this method is called. This method can only be called once on per pipeline.

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

configureFunction(functionConfig)

 

This method is used to specify configuration lines for functions such as @Lookup, @Relate, and @Sql, which require configuration information to operate.

Parameters:
  • functionConfig (list of strings) - The configuration information for a function.
Returns: None
Raises:
  • FMEException - An FMEException is raised if there was an error.

getErrorMessage()

 

If allDone() returns an error, the whole message produced can be retrieved with this method.

Returns: string
The error message from allDone().

getOutputFeature()

 

This method is used to fetch a feature ready for output from the pipeline. If no feature is ready for output, an exception is thrown. This method should not be used if the setCallback() method has been called on the pipeline.

Returns: FMEFeature or None
The feature ready for output or None if all the features have been outputted.
Raises:
  • FMEException - An FMEException is raised if there was an error.

processFeature(feature)

 

This method is used to insert a feature into the pipeline for processing. On output the feature is returned void of all attributes and geometry.

Parameters:
  • feature (FMEFeature) - The feature to insert into the pipeline.
Returns: None
Raises:
  • FMEException - An FMEException is raised if there was an error.

setCallback(function)

 

This method is used to specify the name of a function that will be called by the pipeline when a feature is ready for output. If a callback function is specified, features must not be retrieved using the getOutputFeature() method.

Parameters:
  • function (Callable) - The function to provide FME for use as a callback function. The passed in function must take in a FMEFeature as the parameter and return True on success, and False upon failure.

    bool( function )(FMEFeature feature)

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