﻿/*  
    Copyright (c) 2013, All Right Reserved
    Elena Viorica Epure
    elena.epure.ro@gmail.com
*/

using System;
using System.Xml.Serialization;
using System.Collections.Generic;

namespace XES.XESLib
{
    /*
    <!-- Logs are elements that may contain traces -->
    <xs:complexType name="LogType">
        <xs:complexContent>
            <xs:extension base="ElementType">
	            <xs:sequence>
	                <xs:element name="extension" minOccurs="0" maxOccurs="unbounded" type="ExtensionType"/>
	                <xs:element name="global" minOccurs="0" maxOccurs="2" type="GlobalsType"/>
	                <xs:element name="classifier" minOccurs="0" maxOccurs="unbounded" type="ClassifierType"/>
	                <xs:element name="trace" maxOccurs="unbounded" type="TraceType"/>
	            </xs:sequence>
	    
                <xs:attribute name="xes.version" type="xs:decimal" use="required"/>
	            <xs:attribute name="xes.features" type="xs:token"/>
	            <xs:attribute name="openxes.version" type="xs:string"/>
      
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    */


    [XmlType(Namespace = "http://www.xes-standard.org/")]
    [XmlRootAttribute("log", Namespace = "http://www.xes-standard.org/", IsNullable = false)]
    public class LogType: ElementType
    {
        [XmlElementAttribute("extension")]
        public List<ExtensionType> Extensions { get; set; }

        [XmlElementAttribute("global")]
        public List<GlobalsType> Globals { get; set; }

        [XmlElementAttribute("classifier")]
        public List<ClassifierType> Classifiers { get; set; }

        [XmlElementAttribute("trace")]
        public List<TraceType> Traces { get; set; }

        [XmlAttribute("xes.version")]
        public Decimal Version { get; set; }

        [XmlAttribute("xes.features", DataType = "token")]
        public String Features { get; set; }

        [XmlAttribute("openxes.version")]
        public String OpenXesVersion { get; set; }
    }
}

