Package org.deckfour.xes.info.impl
Class XAttributeInfoImpl
- java.lang.Object
-
- org.deckfour.xes.info.impl.XAttributeInfoImpl
-
- All Implemented Interfaces:
XAttributeInfo
public class XAttributeInfoImpl extends java.lang.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
Constructors Constructor Description XAttributeInfoImpl()Creates a new attribute information registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<java.lang.String>getAttributeKeys()Provides access to prototypes of all registered attributes' keys.java.util.Collection<XAttribute>getAttributes()Provides access to prototypes of all registered attributes.java.util.Collection<XAttribute>getAttributesForExtension(XExtension extension)For a given extension, returns prototypes of all registered attributes defined by that extension.java.util.Collection<XAttribute>getAttributesForType(java.lang.Class<? extends XAttribute> type)For a given type, returns prototypes of all registered attributes with that type.java.util.Collection<XAttribute>getAttributesWithoutExtension()Returns prototypes of all registered attributes defined by no extension.intgetFrequency(java.lang.String key)Returns the total frequency, i.e.intgetFrequency(XAttribute attribute)Returns the total frequency, i.e.java.util.Collection<java.lang.String>getKeysForExtension(XExtension extension)For a given extension, returns the keys of all registered attributes defined by that extension.java.util.Collection<java.lang.String>getKeysForType(java.lang.Class<? extends XAttribute> type)For a given type, returns the keys of all registered attributes with that type.java.util.Collection<java.lang.String>getKeysWithoutExtension()Returns keys of all registered attributes defined by no extension.doublegetRelativeFrequency(java.lang.String key)Returns the relative frequency, i.e.doublegetRelativeFrequency(XAttribute attribute)Returns the relative frequency, i.e.voidregister(XAttribute attribute)Registers a concrete attribute with this registry.
-
-
-
Method Detail
-
getAttributes
public java.util.Collection<XAttribute> getAttributes()
Description copied from interface:XAttributeInfoProvides access to prototypes of all registered attributes.- Specified by:
getAttributesin interfaceXAttributeInfo- Returns:
- A collection of attribute prototypes.
-
getAttributeKeys
public java.util.Collection<java.lang.String> getAttributeKeys()
Description copied from interface:XAttributeInfoProvides access to prototypes of all registered attributes' keys.- Specified by:
getAttributeKeysin interfaceXAttributeInfo- Returns:
- A collection of attribute keys.
-
getFrequency
public int getFrequency(java.lang.String key)
Description copied from interface:XAttributeInfoReturns the total frequency, i.e. number of occurrences, for the requested attribute.- Specified by:
getFrequencyin interfaceXAttributeInfo- Parameters:
key- Key of an attribute.- Returns:
- Total frequency of that attribute as registered.
-
getFrequency
public int getFrequency(XAttribute attribute)
Description copied from interface:XAttributeInfoReturns the total frequency, i.e. number of occurrences, for the requested attribute.- Specified by:
getFrequencyin interfaceXAttributeInfo- Parameters:
attribute- An attribute.- Returns:
- Total frequency of that attribute as registered.
-
getRelativeFrequency
public double getRelativeFrequency(java.lang.String key)
Description copied from interface:XAttributeInfoReturns the relative frequency, i.e. between 0 and 1, for the requested attribute.- Specified by:
getRelativeFrequencyin interfaceXAttributeInfo- Parameters:
key- Key of an attribute.- Returns:
- Relative frequency of that attribute as registered.
-
getRelativeFrequency
public double getRelativeFrequency(XAttribute attribute)
Description copied from interface:XAttributeInfoReturns the relative frequency, i.e. between 0 and 1, for the requested attribute.- Specified by:
getRelativeFrequencyin interfaceXAttributeInfo- Parameters:
attribute- An attribute.- Returns:
- Relative frequency of that attribute as registered.
-
getAttributesForType
public java.util.Collection<XAttribute> getAttributesForType(java.lang.Class<? extends XAttribute> type)
Description copied from interface:XAttributeInfoFor a given type, returns prototypes of all registered attributes with that type.- Specified by:
getAttributesForTypein interfaceXAttributeInfo- Parameters:
type- Requested attribute type (type-specific attribute interface class).- Returns:
- A collection of attribute prototypes registered for that type.
-
getKeysForType
public java.util.Collection<java.lang.String> getKeysForType(java.lang.Class<? extends XAttribute> type)
Description copied from interface:XAttributeInfoFor a given type, returns the keys of all registered attributes with that type.- Specified by:
getKeysForTypein interfaceXAttributeInfo- Parameters:
type- Requested attribute type (type-specific attribute interface class).- Returns:
- A collection of attribute keys registered for that type.
-
getAttributesForExtension
public java.util.Collection<XAttribute> getAttributesForExtension(XExtension extension)
Description copied from interface:XAttributeInfoFor a given extension, returns prototypes of all registered attributes defined by that extension.- Specified by:
getAttributesForExtensionin interfaceXAttributeInfo- Parameters:
extension- Requested attribute extension.- Returns:
- A collection of attribute prototypes registered for that extension.
-
getKeysForExtension
public java.util.Collection<java.lang.String> getKeysForExtension(XExtension extension)
Description copied from interface:XAttributeInfoFor a given extension, returns the keys of all registered attributes defined by that extension.- Specified by:
getKeysForExtensionin interfaceXAttributeInfo- Parameters:
extension- Requested attribute extension.- Returns:
- A collection of attribute keys registered for that extension.
-
getAttributesWithoutExtension
public java.util.Collection<XAttribute> getAttributesWithoutExtension()
Description copied from interface:XAttributeInfoReturns prototypes of all registered attributes defined by no extension.- Specified by:
getAttributesWithoutExtensionin interfaceXAttributeInfo- Returns:
- A collection of attribute prototypes registered for no extension.
-
getKeysWithoutExtension
public java.util.Collection<java.lang.String> getKeysWithoutExtension()
Description copied from interface:XAttributeInfoReturns keys of all registered attributes defined by no extension.- Specified by:
getKeysWithoutExtensionin interfaceXAttributeInfo- 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.
-
-