Example #1
0
 /// <summary>
 /// Creates a new log summary.
 /// </summary>
 /// <param name="log">The log to create a summary of.</param>
 /// <param name="defaultClassifier">The event classifier to be used.</param>
 /// <param name="classifiers">Classifiers.</param>
 /// <param name="classifiers">A collection of additional event classifiers to
 /// be covered by the created log info instance.</param>
 public XLogInfo(XLog log, IXEventClassifier defaultClassifier, List <IXEventClassifier> classifiers)
 {
     this.log = log;
     this.defaultClassifier = defaultClassifier;
     if (classifiers == null)
     {
         classifiers = new List <IXEventClassifier>(0);
     }
     this.eventClasses = new Dictionary <IXEventClassifier, XEventClasses>(classifiers.Count + 4);
     foreach (IXEventClassifier classifier in classifiers)
     {
         this.eventClasses.Add(classifier, new XEventClasses(classifier));
     }
     this.eventClasses.Add(this.defaultClassifier, new XEventClasses(this.defaultClassifier));
     this.eventClasses.Add(NAME_CLASSIFIER, new XEventClasses(NAME_CLASSIFIER));
     this.eventClasses.Add(RESOURCE_CLASSIFIER, new XEventClasses(RESOURCE_CLASSIFIER));
     this.eventClasses.Add(LIFECYCLE_TRANSITION_CLASSIFIER, new XEventClasses(LIFECYCLE_TRANSITION_CLASSIFIER));
     this.numberOfEvents     = 0;
     this.numberOfTraces     = 0;
     this.logBoundaries      = new XTimeBounds();
     this.traceBoundaries    = new Dictionary <IXTrace, IXTimeBounds>();
     this.logAttributeInfo   = new XAttributeInfo();
     this.traceAttributeInfo = new XAttributeInfo();
     this.eventAttributeInfo = new XAttributeInfo();
     this.metaAttributeInfo  = new XAttributeInfo();
     Setup();
 }
Example #2
0
 /// <summary>
 /// Registers all attributes of a given attributable, i.e. model type hierarchy
 /// element, in the given attribute info registry.
 /// </summary>
 /// <param name="attributeInfo">Attribute info registry to use for registration.</param>
 /// <param name="attributable">Attributable whose attributes to register.</param>
 protected void RegisterAttributes(XAttributeInfo attributeInfo, IXAttributable attributable)
 {
     if (attributable.HasAttributes())
     {
         foreach (XAttribute attribute in attributable.GetAttributes().Values)
         {
             attributeInfo.Register(attribute);
             RegisterAttributes(this.metaAttributeInfo, (IXAttributable)attribute);
         }
     }
 }