org.deckfour.xes.extension
Class XExtension

java.lang.Object
  extended by org.deckfour.xes.extension.XExtension
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
XConceptExtension, XLifecycleExtension, XOrganizationalExtension, XSemanticExtension, XTimeExtension

public class XExtension
extends java.lang.Object
implements java.io.Serializable

This class defines and implements extensions to the basic log meta-model. Extensions have a name, a defined prefix, and a unique URI. They can define additional, typed attributes on the level of the log, trace, and event. Also, extensions may define meta attributes, i.e. attributes which describe other, higher-level attributes. Implementations of XExtension as supposed to implement the Singleton pattern. The method instance should return the instance, which is stored in a static field. Note that implementing classes have to properly implement a private Object readResolve(); in order to get a pointer to the right instance uppon deserialization. A default implementation of this method would be: protected Object readResolve() { return singleton; }

Author:
Christian W. Guenther (christian@deckfour.org)
See Also:
Serialized Form

Field Summary
protected  java.util.HashSet<XAttribute> allAttributes
          Set containing all attributes defined by this extension, on all possible levels of abstraction.
protected  java.util.HashSet<XAttribute> eventAttributes
          Set containing all attributes defined by this extension on the level of events.
protected  java.util.HashSet<XAttribute> logAttributes
          Set containing all attributes defined by this extension on the level of logs.
protected  java.util.HashSet<XAttribute> metaAttributes
          Set containing all meta-attributes defined by this extension, i.e.
protected  java.lang.String name
          The name of the extension.
protected  java.lang.String prefix
          Prefix string of the extension, used for addressing attributes.
protected  java.util.HashSet<XAttribute> traceAttributes
          Set containing all attributes defined by this extension on the level of traces.
protected  java.net.URI uri
          Unique URI of the extension.
 
Constructor Summary
protected XExtension(java.lang.String name, java.lang.String prefix, java.net.URI uri)
          Creates a new extension instance.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.Collection<XAttribute> getDefinedAttributes()
          Returns the collection of attributes defined by this extension for any log elements (archive-, log-, trace-, event-, and meta-attributes).
 java.util.Collection<XAttribute> getEventAttributes()
          Returns the collection of attributes defined by this extension for event elements.
 java.util.Collection<XAttribute> getLogAttributes()
          Returns the collection of attributes defined by this extension for log elements.
 java.util.Collection<XAttribute> getMetaAttributes()
          Returns the collection of meta-attributes defined by this extension for attributes.
 java.lang.String getName()
          Returns the human-readable name of this extension.
 java.lang.String getPrefix()
          Returns a unique prefix associated with this extension.
 java.util.Collection<XAttribute> getTraceAttributes()
          Returns the collection of attributes defined by this extension for trace elements.
 java.net.URI getUri()
          Returns a unique URI associated with this extension.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
The name of the extension.


prefix

protected java.lang.String prefix
Prefix string of the extension, used for addressing attributes.


uri

protected java.net.URI uri
Unique URI of the extension. This URI should point to the file defining the extension, and must be able to be resolved. Extension files should be accessible over the internet, e.g. stored on web servers.


allAttributes

protected java.util.HashSet<XAttribute> allAttributes
Set containing all attributes defined by this extension, on all possible levels of abstraction.


logAttributes

protected java.util.HashSet<XAttribute> logAttributes
Set containing all attributes defined by this extension on the level of logs.


traceAttributes

protected java.util.HashSet<XAttribute> traceAttributes
Set containing all attributes defined by this extension on the level of traces.


eventAttributes

protected java.util.HashSet<XAttribute> eventAttributes
Set containing all attributes defined by this extension on the level of events.


metaAttributes

protected java.util.HashSet<XAttribute> metaAttributes
Set containing all meta-attributes defined by this extension, i.e. on the level of attributes.

Constructor Detail

XExtension

protected XExtension(java.lang.String name,
                     java.lang.String prefix,
                     java.net.URI uri)
Creates a new extension instance.

Parameters:
name - Name of the extension.
prefix - Prefix string to be used for this extension.
uri - Unique URI used for identifying this extension. This URI should point to the file defining the extension, and must be able to be resolved. Extension files should be accessible over the internet, e.g. stored on web servers.
Method Detail

getName

public java.lang.String getName()
Returns the human-readable name of this extension.


getUri

public java.net.URI getUri()
Returns a unique URI associated with this extension. This URI should point to the file defining the extension, and must be able to be resolved. Extension files should be accessible over the internet, e.g. stored on web servers.


getPrefix

public java.lang.String getPrefix()
Returns a unique prefix associated with this extension. This prefix should be no longer than 5 characters, so as not to unnecessarily blow up storage files.


getDefinedAttributes

public java.util.Collection<XAttribute> getDefinedAttributes()
Returns the collection of attributes defined by this extension for any log elements (archive-, log-, trace-, event-, and meta-attributes).


getLogAttributes

public java.util.Collection<XAttribute> getLogAttributes()
Returns the collection of attributes defined by this extension for log elements.


getTraceAttributes

public java.util.Collection<XAttribute> getTraceAttributes()
Returns the collection of attributes defined by this extension for trace elements.


getEventAttributes

public java.util.Collection<XAttribute> getEventAttributes()
Returns the collection of attributes defined by this extension for event elements.


getMetaAttributes

public java.util.Collection<XAttribute> getMetaAttributes()
Returns the collection of meta-attributes defined by this extension for attributes.


equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object