## org.eclipse.emf.ecore.xmi
Interface XMLResource.ResourceEntityHandler

All Known Implementing Classes:
  ResourceEntityHandlerImpl

Enclosing interface:
  XMLResource

    public static interface XMLResource.ResourceEntityHandler

An interface for a resource entity handler. It is used during load to record entities and is used during save to assign entity names to values representing cross resource URI references.

See Also:
  `ResourceEntityHandlerImpl`

Method Summary
`java.lang.String` `getEntityName(java.lang.String entityValue)` Returns the name associated with the entity value; a new name will be generated if there is not yet a name associated with the entity value.
`java.util.Map<java.lang.String,java.lang.String>` `getNameToValueMap()` Returns the map of entity names to entity values to be recorded in the document during save.
`void` `handleEntity(java.lang.String entityName, java.lang.String entityValue)` Records the entity name to entity value mapping.
`void` `reset()` Resets the state of the entity handler when a resource is first loaded or is reloaded.

Method Detail

### reset

    void reset()

  Resets the state of the entity handler when a resource is first loaded or is reloaded.

### handleEntity

    void handleEntity(java.lang.String entityName,
                      java.lang.String entityValue)

  Records the entity name to entity value mapping.

  Parameters:
    `entityName` - the name of the entity.
    `entityValue` - the associated value of the entity.

### getEntityName

    java.lang.String getEntityName(java.lang.String entityValue)

  Returns the name associated with the entity value; a new name will be generated if there is not yet a name associated with the entity value.

  Parameters:
    `entityValue` - the entity value for which a named entity is needed.
  Returns:
    the name associated with the entity value.

### getNameToValueMap

    java.util.Map<java.lang.String,java.lang.String> getNameToValueMap()

  Returns the map of entity names to entity values to be recorded in the document during save.

  Returns:
    the map of entity names to entity values to be recorded in the document during save.

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.