Package org.deckfour.xes.info.impl
Class XAttributeNameMapImpl
- java.lang.Object
-
- org.deckfour.xes.info.impl.XAttributeNameMapImpl
-
- All Implemented Interfaces:
XAttributeNameMap
public class XAttributeNameMapImpl extends java.lang.Object implements XAttributeNameMap
Implements an attribute name mapping.- Author:
- Christian W. Guenther (christian@deckfour.org)
-
-
Constructor Summary
Constructors Constructor Description XAttributeNameMapImpl(java.lang.String name)Creates a new attribute name mapping instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMappingName()Returns the name of this mapping.java.lang.Stringmap(java.lang.String attributeKey)Returns the name mapped onto the provided attribute key by this mapping.java.lang.Stringmap(XAttribute attribute)Returns the name mapped onto the provided attribute by this mapping.voidregisterMapping(java.lang.String attributeKey, java.lang.String alias)Registers a mapping for a given attribute key.voidregisterMapping(XAttribute attribute, java.lang.String alias)Registers a mapping for a given attribute.java.lang.StringtoString()
-
-
-
Method Detail
-
getMappingName
public java.lang.String getMappingName()
Description copied from interface:XAttributeNameMapReturns the name of this mapping.- Specified by:
getMappingNamein interfaceXAttributeNameMap- Returns:
- The name of this mapping.
-
map
public java.lang.String map(XAttribute attribute)
Description copied from interface:XAttributeNameMapReturns the name mapped onto the provided attribute by this mapping. If no mapping for the given attribute is provided by this map,nullis returned.- Specified by:
mapin interfaceXAttributeNameMap- Parameters:
attribute- Attribute to retrieve mapping for.- Returns:
- The mapping for the given attribute, or
null, if no such mapping exists.
-
map
public java.lang.String map(java.lang.String attributeKey)
Description copied from interface:XAttributeNameMapReturns the name mapped onto the provided attribute key by this mapping. If no mapping for the given attribute key is provided by this map,nullis returned.- Specified by:
mapin interfaceXAttributeNameMap- 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, java.lang.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(java.lang.String attributeKey, java.lang.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 java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-