org.deckfour.xes.info.impl
Class XAttributeInfoImpl

java.lang.Object
  extended by org.deckfour.xes.info.impl.XAttributeInfoImpl
All Implemented Interfaces:
XAttributeInfo

public class XAttributeInfoImpl
extends Object
implements XAttributeInfo

This class provides aggregate information about attributes within one container in the log type hierarchy. For example, it may store information about all event attributes in a log.

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

Constructor Summary
XAttributeInfoImpl()
          Creates a new attribute information registry.
 
Method Summary
 Collection<String> getAttributeKeys()
          Provides access to prototypes of all registered attributes' keys.
 Collection<XAttribute> getAttributes()
          Provides access to prototypes of all registered attributes.
 Collection<XAttribute> getAttributesForExtension(XExtension extension)
          For a given extension, returns prototypes of all registered attributes defined by that extension.
 Collection<XAttribute> getAttributesForType(Class<? extends XAttribute> type)
          For a given type, returns prototypes of all registered attributes with that type.
 Collection<XAttribute> getAttributesWithoutExtension()
          Returns prototypes of all registered attributes defined by no extension.
 int getFrequency(String key)
          Returns the total frequency, i.e.
 int getFrequency(XAttribute attribute)
          Returns the total frequency, i.e.
 Collection<String> getKeysForExtension(XExtension extension)
          For a given extension, returns the keys of all registered attributes defined by that extension.
 Collection<String> getKeysForType(Class<? extends XAttribute> type)
          For a given type, returns the keys of all registered attributes with that type.
 Collection<String> getKeysWithoutExtension()
          Returns keys of all registered attributes defined by no extension.
 double getRelativeFrequency(String key)
          Returns the relative frequency, i.e.
 double getRelativeFrequency(XAttribute attribute)
          Returns the relative frequency, i.e.
 void register(XAttribute attribute)
          Registers a concrete attribute with this registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XAttributeInfoImpl

public XAttributeInfoImpl()
Creates a new attribute information registry.

Method Detail

getAttributes

public Collection<XAttribute> getAttributes()
Description copied from interface: XAttributeInfo
Provides access to prototypes of all registered attributes.

Specified by:
getAttributes in interface XAttributeInfo
Returns:
A collection of attribute prototypes.

getAttributeKeys

public Collection<String> getAttributeKeys()
Description copied from interface: XAttributeInfo
Provides access to prototypes of all registered attributes' keys.

Specified by:
getAttributeKeys in interface XAttributeInfo
Returns:
A collection of attribute keys.

getFrequency

public int getFrequency(String key)
Description copied from interface: XAttributeInfo
Returns the total frequency, i.e. number of occurrences, for the requested attribute.

Specified by:
getFrequency in interface XAttributeInfo
Parameters:
key - Key of an attribute.
Returns:
Total frequency of that attribute as registered.

getFrequency

public int getFrequency(XAttribute attribute)
Description copied from interface: XAttributeInfo
Returns the total frequency, i.e. number of occurrences, for the requested attribute.

Specified by:
getFrequency in interface XAttributeInfo
Parameters:
attribute - An attribute.
Returns:
Total frequency of that attribute as registered.

getRelativeFrequency

public double getRelativeFrequency(String key)
Description copied from interface: XAttributeInfo
Returns the relative frequency, i.e. between 0 and 1, for the requested attribute.

Specified by:
getRelativeFrequency in interface XAttributeInfo
Parameters:
key - Key of an attribute.
Returns:
Relative frequency of that attribute as registered.

getRelativeFrequency

public double getRelativeFrequency(XAttribute attribute)
Description copied from interface: XAttributeInfo
Returns the relative frequency, i.e. between 0 and 1, for the requested attribute.

Specified by:
getRelativeFrequency in interface XAttributeInfo
Parameters:
attribute - An attribute.
Returns:
Relative frequency of that attribute as registered.

getAttributesForType

public Collection<XAttribute> getAttributesForType(Class<? extends XAttribute> type)
Description copied from interface: XAttributeInfo
For a given type, returns prototypes of all registered attributes with that type.

Specified by:
getAttributesForType in interface XAttributeInfo
Parameters:
type - Requested attribute type (type-specific attribute interface class).
Returns:
A collection of attribute prototypes registered for that type.

getKeysForType

public Collection<String> getKeysForType(Class<? extends XAttribute> type)
Description copied from interface: XAttributeInfo
For a given type, returns the keys of all registered attributes with that type.

Specified by:
getKeysForType in interface XAttributeInfo
Parameters:
type - Requested attribute type (type-specific attribute interface class).
Returns:
A collection of attribute keys registered for that type.

getAttributesForExtension

public Collection<XAttribute> getAttributesForExtension(XExtension extension)
Description copied from interface: XAttributeInfo
For a given extension, returns prototypes of all registered attributes defined by that extension.

Specified by:
getAttributesForExtension in interface XAttributeInfo
Parameters:
extension - Requested attribute extension.
Returns:
A collection of attribute prototypes registered for that extension.

getKeysForExtension

public Collection<String> getKeysForExtension(XExtension extension)
Description copied from interface: XAttributeInfo
For a given extension, returns the keys of all registered attributes defined by that extension.

Specified by:
getKeysForExtension in interface XAttributeInfo
Parameters:
extension - Requested attribute extension.
Returns:
A collection of attribute keys registered for that extension.

getAttributesWithoutExtension

public Collection<XAttribute> getAttributesWithoutExtension()
Description copied from interface: XAttributeInfo
Returns prototypes of all registered attributes defined by no extension.

Specified by:
getAttributesWithoutExtension in interface XAttributeInfo
Returns:
A collection of attribute prototypes registered for no extension.

getKeysWithoutExtension

public Collection<String> getKeysWithoutExtension()
Description copied from interface: XAttributeInfo
Returns keys of all registered attributes defined by no extension.

Specified by:
getKeysWithoutExtension in interface XAttributeInfo
Returns:
A collection of attribute keys registered for no extension.

register

public void register(XAttribute attribute)
Registers a concrete attribute with this registry.

Parameters:
attribute - Attribute to be registered.