Package org.deckfour.xes.model.impl
Class XLogImpl
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<XTrace>
-
- org.deckfour.xes.model.impl.XLogImpl
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<XTrace>,java.util.Collection<XTrace>,java.util.List<XTrace>,java.util.RandomAccess,XAttributable,XElement,XLog
public class XLogImpl extends java.util.ArrayList<XTrace> implements XLog
Implementation for the XLog interface.- Author:
- Christian W. Guenther (christian@deckfour.org)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XLogImpl(XAttributeMap attributeMap)Creates a new log.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(XVisitor visitor)java.lang.Objectclone()Creates an identical copy of this element.XAttributeMapgetAttributes()Retrieves the attributes set for this element.java.util.List<XEventClassifier>getClassifiers()This method returns the list of classifiers defined for this log.java.util.Set<XExtension>getExtensions()Retrieves the extensions used by this element, i.e.java.util.List<XAttribute>getGlobalEventAttributes()This method returns a list of attributes which are global for all events, i.e.java.util.List<XAttribute>getGlobalTraceAttributes()This method returns a list of attributes which are global for all traces, i.e.XLogInfogetInfo(XEventClassifier classifier)Returns the cached info if the given classifier is the cached classifier.booleanhasAttributes()Checks for the existence of attributes.voidsetAttributes(XAttributeMap attributes)Sets the map of attributes for this element.voidsetInfo(XEventClassifier classifier, XLogInfo info)Sets the cached classifier and info to the given objects.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
-
-
-
Constructor Detail
-
XLogImpl
public XLogImpl(XAttributeMap attributeMap)
Creates a new log.- Parameters:
attributeMap- The attribute map used to store this log's attributes.
-
-
Method Detail
-
getAttributes
public XAttributeMap getAttributes()
Description copied from interface:XAttributableRetrieves the attributes set for this element.- Specified by:
getAttributesin interfaceXAttributable- Returns:
- A map of attributes.
-
setAttributes
public void setAttributes(XAttributeMap attributes)
Description copied from interface:XAttributableSets the map of attributes for this element.- Specified by:
setAttributesin interfaceXAttributable- Parameters:
attributes- A map of attributes.
-
hasAttributes
public boolean hasAttributes()
Description copied from interface:XAttributableChecks for the existence of attributes. This method can be a more efficient way of checking for the existance of attributes than usingXAttributable.getAttributes()in certain situations.- Specified by:
hasAttributesin interfaceXAttributable- Returns:
- whether this element has any attributes
-
getExtensions
public java.util.Set<XExtension> getExtensions()
Description copied from interface:XAttributableRetrieves the extensions used by this element, i.e. the extensions used by all attributes of this element, and the element itself.- Specified by:
getExtensionsin interfaceXAttributable- Returns:
- A set of extensions.
-
clone
public java.lang.Object clone()
Description copied from interface:XElementCreates an identical copy of this element.
-
getClassifiers
public java.util.List<XEventClassifier> getClassifiers()
Description copied from interface:XLogThis method returns the list of classifiers defined for this log. This list can be used for reading or writing, i.e., it must be supported to add further classifiers to this list.- Specified by:
getClassifiersin interfaceXLog- Returns:
- The list of classifiers defined for this log.
-
getGlobalEventAttributes
public java.util.List<XAttribute> getGlobalEventAttributes()
Description copied from interface:XLogThis method returns a list of attributes which are global for all events, i.e. every event in the log is guaranteed to have these attributes.- Specified by:
getGlobalEventAttributesin interfaceXLog- Returns:
- List of ubiquitous event attributes.
-
getGlobalTraceAttributes
public java.util.List<XAttribute> getGlobalTraceAttributes()
Description copied from interface:XLogThis method returns a list of attributes which are global for all traces, i.e. every trace in the log is guaranteed to have these attributes.- Specified by:
getGlobalTraceAttributesin interfaceXLog- Returns:
- List of ubiquitous trace attributes.
-
getInfo
public XLogInfo getInfo(XEventClassifier classifier)
Returns the cached info if the given classifier is the cached classifier. Returns null otherwise.
-
setInfo
public void setInfo(XEventClassifier classifier, XLogInfo info)
Sets the cached classifier and info to the given objects.
-
-