org.deckfour.xes.info.impl
Class XAttributeNameMapImpl

java.lang.Object
  extended by org.deckfour.xes.info.impl.XAttributeNameMapImpl
All Implemented Interfaces:
XAttributeNameMap

public class XAttributeNameMapImpl
extends Object
implements XAttributeNameMap

Implements an attribute name mapping.

Author:
Christian W. Guenther (christian@deckfour.org)

Constructor Summary
XAttributeNameMapImpl(String name)
          Creates a new attribute name mapping instance.
 
Method Summary
 String getMappingName()
          Returns the name of this mapping.
 String map(String attributeKey)
          Returns the name mapped onto the provided attribute key by this mapping.
 String map(XAttribute attribute)
          Returns the name mapped onto the provided attribute by this mapping.
 void registerMapping(String attributeKey, String alias)
          Registers a mapping for a given attribute key.
 void registerMapping(XAttribute attribute, String alias)
          Registers a mapping for a given attribute.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XAttributeNameMapImpl

public XAttributeNameMapImpl(String name)
Creates a new attribute name mapping instance.

Parameters:
name - Name of the mapping.
Method Detail

getMappingName

public String getMappingName()
Description copied from interface: XAttributeNameMap
Returns the name of this mapping.

Specified by:
getMappingName in interface XAttributeNameMap
Returns:
The name of this mapping.

map

public String map(XAttribute attribute)
Description copied from interface: XAttributeNameMap
Returns the name mapped onto the provided attribute by this mapping. If no mapping for the given attribute is provided by this map, null is returned.

Specified by:
map in interface XAttributeNameMap
Parameters:
attribute - Attribute to retrieve mapping for.
Returns:
The mapping for the given attribute, or null, if no such mapping exists.

map

public String map(String attributeKey)
Description copied from interface: XAttributeNameMap
Returns the name mapped onto the provided attribute key by this mapping. If no mapping for the given attribute key is provided by this map, null is returned.

Specified by:
map in interface XAttributeNameMap
Parameters:
attributeKey - Attribute key to retrieve mapping for.
Returns:
The mapping for the given attribute key, or null, if no such mapping exists.

registerMapping

public void registerMapping(XAttribute attribute,
                            String alias)
Registers a mapping for a given attribute.

Parameters:
attribute - Attribute for which to register a mapping.
alias - Alias string to map the attribute to.

registerMapping

public void registerMapping(String attributeKey,
                            String alias)
Registers a mapping for a given attribute key.

Parameters:
attributeKey - Attribute key for which to register a mapping.
alias - Alias string to map the attribute key to.

toString

public String toString()
Overrides:
toString in class Object