<commit_before>﻿using System.Text;
using DatenMeister.Core.EMOF.Interface.Reflection;
using DatenMeister.Uml.Helper;

namespace DatenMeister.Models.Forms
{
    /// <summary>
    /// Performs an allocation between the view and a specific metaclass which supports the retrieval of default views.
    /// </summary>
    public class FormAssociation
    {
        /// <summary>
        /// Gets or sets the name
        /// </summary>
        public string name { get; set; } = string.Empty;
        
        public FormType? formType { get; set; }

        public IObject? metaClass { get; set; }

        public string? extentType { get; set; }

        /// <summary>
        /// Gets or sets the id of the view mode
        /// </summary>
        public string? viewModeId { get; set; }
        
        /// <summary>
        /// Gets or sets the metaclass of the parent object containg the list of elements
        /// </summary>
        public IElement? parentMetaClass { get; set; }

        public string? parentProperty { get; set; }


        public Form? form { get; set; }

        public FormAssociation()
        {
        }

        public FormAssociation(FormType formType)
        {
            this.formType = formType;
        }

        public FormAssociation(FormType formType, Form form) : this(formType)
        {
            this.form = form;
        }

        public override string ToString()
        {
            var builder = new StringBuilder();
            builder.Append("Form for: ");
            builder.Append(formType.ToString());<commit_msg>Minor source code improvement<commit_after>﻿using System.Text;
using DatenMeister.Core.EMOF.Interface.Reflection;
using DatenMeister.Uml.Helper;

namespace DatenMeister.Models.Forms
{
    /// <summary>
    /// Performs an allocation between the view and a specific metaclass which supports the retrieval of default views.
    /// </summary>
    public class FormAssociation
    {
        /// <summary>
        /// Gets or sets the name
        /// </summary>
        public string name { get; set; } = string.Empty;
        
        public FormType? formType { get; set; }

        public IObject? metaClass { get; set; }

        public string? extentType { get; set; }

        /// <summary>
        /// Gets or sets the id of the view mode
        /// </summary>
        public string? viewModeId { get; set; }
        
        /// <summary>
        /// Gets or sets the metaclass of the parent object containg the list of elements
        /// </summary>
        public IElement? parentMetaClass { get; set; }

        public string? parentProperty { get; set; }

        public Form? form { get; set; }

        public FormAssociation()
        {
        }

        public FormAssociation(FormType formType)
        {
            this.formType = formType;
        }

        public FormAssociation(FormType formType, Form form) : this(formType)
        {
            this.form = form;
        }

        public override string ToString()
        {
            var builder = new StringBuilder();
            builder.Append("Form for: ");
            builder.Append(formType.ToString());
{'fraction_non_alphanumeric': 0.10116977552956054, 'fraction_numerical': 0.0, 'mean_word_length': 1.8074534161490683, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '5100538', 'n_tokens_mistral': 846, 'n_tokens_neox': 814, 'n_words': 264}