<commit_before>﻿using SQLite.Net.Attributes;
using System;
using System.Globalization;
using Windows.Data.Json;

namespace TUMCampusAppAPI.News
{
    public class News : IComparable
    {
        //--------------------------------------------------------Attributes:-----------------------------------------------------------------\\
        #region --Attributes--
        [PrimaryKey]
        public string id { get; set; }
        public string src { get; set; }
        public string title { get; set; }
        public string link { get; set; }
        public string image { get; set; }
        public DateTime date { get; set; }
        public DateTime created { get; set; }

        #endregion
        //--------------------------------------------------------Constructor:----------------------------------------------------------------\\
        #region --Construktoren--
        /// <summary>
        /// Basic Constructor
        /// </summary>
        /// <history>
        /// 01/06/2017 Created [<NAME>]
        /// </history>
        public News()
        {

        }

        public News(JsonObject json)
        {
            this.id = json.GetNamedString(Const.JSON_NEWS);
            this.src = json.GetNamedString(Const.JSON_SRC);
            this.title = json.GetNamedString(Const.JSON_TITLE);
            this.link = json.GetNamedString(Const.JSON_LINK);
            JsonValue val = json.GetNamedValue(Const.JSON_IMAGE);
            this.image = val.ValueType == JsonValueType.Null ? null : val.Stringify();

            this.date = DateTime.ParseExact(json.GetNamedString(Const.JSON_DATE), "yyyy-MM-dd HH:mm:ss", new CultureInfo("de-DE"));
            this.created = DateTime.ParseExact(json.GetNamedString(Const.JSON_CREATED), "yyyy-MM-dd HH:mm:ss", new CultureInfo("de-DE"));
        }
<commit_msg>Removed the date from the title of the TUMMovie news elements<commit_after>﻿using SQLite.Net.Attributes;
using System;
using System.Globalization;
using Windows.Data.Json;

namespace TUMCampusAppAPI.News
{
    public class News : IComparable
    {
        //--------------------------------------------------------Attributes:-----------------------------------------------------------------\\
        #region --Attributes--
        [PrimaryKey]
        public string id { get; set; }
        public string src { get; set; }
        public string title { get; set; }
        public string link { get; set; }
        public string image { get; set; }
        public DateTime date { get; set; }
        public DateTime created { get; set; }

        #endregion
        //--------------------------------------------------------Constructor:----------------------------------------------------------------\\
        #region --Construktoren--
        /// <summary>
        /// Basic Constructor
        /// </summary>
        /// <history>
        /// 01/06/2017 Created [<NAME>]
        /// </history>
        public News()
        {

        }

        public News(JsonObject json)
        {
            this.id = json.GetNamedString(Const.JSON_NEWS);
            this.src = json.GetNamedString(Const.JSON_SRC);

            this.title = json.GetNamedString(Const.JSON_TITLE);
            if (src.Equals("2"))
            {
                int index = this.title.IndexOf(':');
                if(index >= 0 && index < this.title.Length - 3)
                {
                    this.title = this.title.Substring(index + 2);
                }
            }
            this.link = json.GetNamedString(Const.JSON_LINK);
            JsonValue val = json.GetNamedValue(Const.JSON_IMAGE);
            this.image = val.ValueType == JsonValueType.Null ? null : val.Stringify();

            this.date = DateTime.ParseExact(json.GetNamedString(Const.JSON_DATE), "yyyy-MM-dd HH:mm:ss", new CultureInfo("de-DE"));
            this.created = DateTime.ParseExact(json.GetNamedString(Const.JSON_CREATED), "yyyy-MM-dd HH:mm:ss", new CultureInfo("de-DE"));
        }

{'fraction_non_alphanumeric': 0.2328042328042328, 'fraction_numerical': 0.005039052658100277, 'mean_word_length': 1.3477232406859847, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2946385', 'n_tokens_mistral': 1035, 'n_tokens_neox': 996, 'n_words': 221}