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

Class FMELibrary

object --+
         |
        FMELibrary

init()

FME Library class.

Contains shared objects used by multiple features. Appearances and textures for all features are stored in this library.

Instance Methods [hide private]
 
__decIterRef__(args)
 
__incIterRef__(args)
 
__init__()
x.__init__(...) initializes x; see help(type(x)) for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
int
addAppearance(appearance)
This routine adds the appearance object to the Library.
int
addGeometryDefinition(geometryDef)
This routine adds the Geometry Definition object to the Library.
int
addTexture(texture)
This routine adds the Texture object to the Library.
None
deleteAppearance(appearanceReference)
Deletes the appearance with the appearanceReference index.
None
deleteGeometryDefinition(geometryDefinitionReference)
Deletes the Geometry Definition with the geometryDefinitionReference index.
None
deleteTexture(textureReference)
Deletes the Texture with the textureReference index.
FMEAppearance or None
getAppearanceCopy(appearanceReference)
This routine returns a copy of the referenced Appearance object from the Library.
FMEGeometry or None
getGeometryDefinitionCopy(geometryDefinitionReference)
This routine returns a copy of the referenced Geometry Definition object from the Library.If there is no such Geometry Definition in the Library, None is returned.
FMETexture or None
getTextureCopy(textureReference)
This routine returns a copy of the referenced Texture object from the Library.
bool
hasEntry(reference)
Returns true if the library has an object with the specified reference number.
int
hasType(reference)
Returns the FME_LibraryObjectType if library has an object with the specified reference number.
None
replaceAppearance(appearanceReference, newAppearance)
Replaces the Appearance with a new one at index = appearanceReference.
None
replaceGeometryDefinition(geometryDefinitionReference, newGeometryDefinition)
Replaces the GeometryDefinition with a new one at index = geometryDefinitionReference.
None
replaceTexture(textureReference, newTexture)
Replaces the Texture with a new one at index = textureReference.

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

addAppearance(appearance)

 

This routine adds the appearance object to the Library. (If the appearance passed in is None, this appearance is will not be added to the Library.) There is no checking for duplicates when adding an appearance. This call will always add the appearance to the Library, even if an identical appearance already exists therein. If addition is successful, the method returns a unique appearance reference 'key' that is associated with the appearance. If there are any errors in operation, an exception is raised. If the appearance is successfully added to the library, the libraryconsumes the appearance.

Parameters:
  • appearance (FMEAppearance) - The appearance object that will be added to the library.
Returns: int
The unique appearance reference 'key'.@raise FMEException: An exception is raised if an error occurred.

addGeometryDefinition(geometryDef)

 

This routine adds the Geometry Definition object to the Library. (If the Geometry Definition passed in is None, this Geometry Definition will not be added to the Library.) There is no checking for duplicates when adding a Geometry Definition. This call will always add the Geometry Definition to the Library, even if an identical one already exists therein. If there are any errors in operation an exception is raised. If addition is successful, a unique geometry definition reference 'key' that is associated with the Geometry Definition is returned.

Parameters:
  • geometryDef (FMEGeometry) - The geometry defintion object that will be added to the library.
Returns: int
The unique geometry defintion reference 'key'.@raise FMEException: An exception is raised if an error occurred.

addTexture(texture)

 

This routine adds the Texture object to the Library. (If the Texture passed in is None, this Texture is will not be added to the Library.) There is no checking for duplicates when adding a Texture. This call will always add the Texture to the Library, even if an identical Texture already exists therein. If addition is successful, a unique texture reference 'key' that is associated with the Texture is returned. If there are any errors in operation, an exception is raised. If the texture is successfully added to the library, the library consumes the texture.

Parameters:
  • texture (FMETexture) - The texture object that will be added to the library.
Returns: int
The unique texture reference 'key'.@raise FMEException: An exception is raised if an error occurred.

deleteAppearance(appearanceReference)

 

Deletes the appearance with the appearanceReference index. Throws an exception if the current shared object is not of appearance type.

Parameters:
  • appearanceReference (int) - The appearanceReference index of the appearance to be deleted from the library.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

deleteGeometryDefinition(geometryDefinitionReference)

 

Deletes the Geometry Definition with the geometryDefinitionReference index. Throws an exception if the current shared object is not of geometry definition type.

Parameters:
  • geometryDefinitionReference (int) - The geometryDefinitionReference index of the appearance to be deleted from the library.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

deleteTexture(textureReference)

 

Deletes the Texture with the textureReference index. Throws an exception if the current shared object is not of texture type.

Parameters:
  • textureReference (int) - The textureReference index of the appearance to be deleted from the library.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

getAppearanceCopy(appearanceReference)

 

This routine returns a copy of the referenced Appearance object from the Library. If there is no such Appearance in the Library, None is returned.

Parameters:
  • appearanceReference (int) - The appearance Reference.
Returns: FMEAppearance or None
The appearance copy None.

getGeometryDefinitionCopy(geometryDefinitionReference)

 

This routine returns a copy of the referenced Geometry Definition object from the Library.If there is no such Geometry Definition in the Library, None is returned.

Parameters:
  • geometryDefinitionReference (int) - The Geometry Definition Reference.
Returns: FMEGeometry or None
The geometry definition or None.

getTextureCopy(textureReference)

 

This routine returns a copy of the referenced Texture object from the Library. If there is no such Texture in the Library, None is returned.

Parameters:
  • textureReference (int) - The texture Reference.
Returns: FMETexture or None
The texture or None.

hasEntry(reference)

 

Returns true if the library has an object with the specified reference number.

Parameters:
  • reference (int) - The reference to search the library for.
Returns: bool
Returns True if the library has an object with the specified reference number, or False otherwise.

hasType(reference)

 

Returns the FME_LibraryObjectType if library has an object with the specified reference number. Throws an exception if the supplied reference refers to an object without a valid object type, or if there is no object within the Library with the supplied reference number. Use hasEntry() to determine if the library contains the specified reference.

Parameters:
  • reference (int) - The reference to search the library for.
Returns: int
If the library has an object with the specified reference number the FME_LibraryObjectType is returned, otherwise an exception is thrown.
Raises:
  • FMEException - An exception is raised if an error occurred.

replaceAppearance(appearanceReference, newAppearance)

 

Replaces the Appearance with a new one at index = appearanceReference. A FMEException is thrown if newAppearance is None, appearanceReference is not a valid index ,or the existing shared object is not an appearance type. If the newAppearance successfully replaces the existing appearance, the library consumes the newAppearance.

Parameters:
  • appearanceReference (int) - The index of the Appearance to replace.
  • newAppearance (FMEAppearance) - The new appearance to replace the original with.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

replaceGeometryDefinition(geometryDefinitionReference, newGeometryDefinition)

 

Replaces the GeometryDefinition with a new one at index = geometryDefinitionReference. A FMEException is thrown if newGeometryDefinition is None, geometryDefinitionReference is not a valid index or the existing shared object is not a geometry definition type.

Parameters:
  • geometryDefinitionReference (int) - The index of the geometry to replace.
  • newGeometryDefinition (FMEGeometry) - The new geometry definition to replace the original with.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

replaceTexture(textureReference, newTexture)

 

Replaces the Texture with a new one at index = textureReference. A FMEException is thrown if newTexture is None, textureReference is not a valid index or the existing shared object is not an texture type. If the newTexture successfully replaces the existing texture, the library consumes the newTexture.

Parameters:
  • textureReference (int) - The index of the Texture to replace.
  • newTexture (FMETexture) - The new texture to replace the original with.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.