Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:OpenXesNet.model.XLog"/> class.
 /// </summary>
 /// <param name="attributes">The attribute map used to store this log's attributes.</param>
 /// <param name="initialCapacity">Initial capacity. If not specified, a default
 /// value of 0 is used.</param>
 public XLog(IXAttributeMap attributes, int initialCapacity = 0) : base(initialCapacity)
 {
     this.attributes            = attributes;
     this.extensions            = new HashSet <XExtension>();
     this.classifiers           = new List <IXEventClassifier>();
     this.globalEventAttributes = new List <XAttribute>();
     this.globalTraceAttributes = new List <XAttribute>();
     this.cachedInfo            = null;
     this.cachedClassifier      = null;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Static helper method for extracting all extensions from an attribute map.
        /// </summary>
        /// <returns>The set of extensions in the attribute map.</returns>
        /// <param name="attributeMap"> The attribute map from which to extract extensions.</param>
        public static HashSet <XExtension> ExtractExtensions(IXAttributeMap attributeMap)
        {
            HashSet <XExtension> extensions = new HashSet <XExtension>();

            foreach (XAttribute attribute in attributeMap.Values)
            {
                XExtension extension = attribute.Extension;
                if (extension != null)
                {
                    extensions.Add(extension);
                }
            }
            return(extensions);
        }
Exemplo n.º 3
0
 public void SetAttributes(IXAttributeMap attributes)
 {
     this.attributes = attributes;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:OpenXesNet.model.XEvent"/> class
 /// with a given id and a specific set of attributes.
 /// </summary>
 /// <param name="id">The id for this event.</param>
 /// <param name="attributes">Attribute map for this event.</param>
 public XEvent(XID id, IXAttributeMap attributes)
 {
     this.id         = id;
     this.attributes = attributes;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:OpenXesNet.model.XEvent"/> class with a
 /// defined set of attributes.
 /// </summary>
 /// <param name="attributes">Attribute map for this event.</param>
 public XEvent(IXAttributeMap attributes) : this(XIDFactory.Instance.CreateId(), attributes)
 {
 }
Exemplo n.º 6
0
 public XEvent CreateEvent(XID id, IXAttributeMap attributes)
 {
     return(new XEvent(id, attributes));
 }
Exemplo n.º 7
0
 public XEvent CreateEvent(IXAttributeMap attributes)
 {
     return(new XEvent(attributes));
 }
Exemplo n.º 8
0
 public XTrace CreateTrace(IXAttributeMap attributes)
 {
     return(new XTrace(attributes));
 }
Exemplo n.º 9
0
 public XLog CreateLog(IXAttributeMap attributes)
 {
     return(new XLog(attributes));
 }
Exemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:OpenXesNet.model.XTrace"/> class with
 /// a specific capacity.
 /// </summary>
 /// <param name="attributes">Attribute map used to store this trace's attributes.</param>
 /// <param name="initialCapacity">Initial capacity. If not specified, 0 is used by default</param>
 public XTrace(IXAttributeMap attributes, int initialCapacity = 0) : base(initialCapacity)
 {
     this.attributes = attributes;
 }