Initial commit

This commit is contained in:
2022-07-06 21:35:05 +02:00
commit b2494052ff
97220 changed files with 2449256 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
using System;
namespace Gos.Core.Entities
{
public class AuditLog : BaseEntity
{
public long DurationMs { get; set; }
public DateTime EndDate { get; set; }
public string Message { get; set; }
public string ObjectType { get; set; }
public string SessionId { get; set; }
public DateTime StartDate { get; set; }
public string TraceIdentifier { get; set; }
}
}
+7
View File
@@ -0,0 +1,7 @@
namespace Gos.Core.Entities
{
public abstract class BaseEntity : IEntity
{
public int Id { get; set; }
}
}
+11
View File
@@ -0,0 +1,11 @@
namespace Gos.Core.Entities
{
public class CorpusCounter : BaseEntity
{
public int Discourses { get; set; }
public int Statements { get; set; }
public int Words { get; set; }
}
}
+9
View File
@@ -0,0 +1,9 @@
namespace Gos.Core.Entities
{
public class CorpusForm : BaseEntity
{
public string StandardForm { get; set; }
public string Lemma { get; set; }
}
}
+29
View File
@@ -0,0 +1,29 @@
using System;
namespace Gos.Core.Entities
{
public class Discourse : BaseEntity
{
public DiscourseChannel Channel { get; set; }
public string Code { get; set; }
public DateTime Date { get; set; }
public string Description { get; set; }
public DiscourseEvent Event { get; set; }
public int Length { get; set; }
public string Location { get; set; }
public int NumberOfSpeakers { get; set; }
public DiscourseRegion Region { get; set; }
public string Source { get; set; }
public DiscourseType Type { get; set; }
}
}
+23
View File
@@ -0,0 +1,23 @@
using System.Globalization;
namespace Gos.Core.Entities
{
public class DiscourseChannel : BaseEntity, ILocalizableEntity<DiscourseChannelTranslation>
{
public string Title
{
get => Translations[CultureInfo.CurrentCulture].Title;
set => Translations[CultureInfo.CurrentCulture].Title = value;
}
public TranslationCollection<DiscourseChannelTranslation> Translations { get; set; } = new();
}
public enum DiscourseChannelKeys
{
Radio = 1,
Televizija = 2,
OsebniStik = 3,
Telefon = 4,
}
}
@@ -0,0 +1,7 @@
namespace Gos.Core.Entities
{
public class DiscourseChannelTranslation : Translation<DiscourseChannelTranslation>
{
public string Title { get; set; }
}
}
+42
View File
@@ -0,0 +1,42 @@
using System.Globalization;
namespace Gos.Core.Entities
{
public class DiscourseEvent : BaseEntity, ILocalizableEntity<DiscourseEventTranslation>
{
public string Title
{
get => Translations[CultureInfo.CurrentCulture].Title;
set => Translations[CultureInfo.CurrentCulture].Title = value;
}
public TranslationCollection<DiscourseEventTranslation> Translations { get; set; } = new();
}
public enum DiscourseEventKeys
{
NovinarskiPrispevek = 1,
ModeriraniPogovorTv = 2,
ModeriranaOddaja = 3,
ResnicnostniSov = 4,
SportniPrenos = 5,
ModeriraniProgram = 6,
ModeriraniPogovorRadio = 7,
OsnovnosolskaUcnaUra = 8,
SrednjesolskaUcnaUra = 9,
Tecaj = 10,
FakultetnoPredavanje = 11,
JavnoPredavanje = 12,
FormalniDelovniSestanek = 13,
NeformalniDelovniSestanek = 14,
Konzultacija = 15,
Storitev = 16,
FormalniRazgovor = 17,
ProdajaTrgovina = 18,
Svetovanje = 19,
Informacije = 20,
Tajnistvo = 21,
PogovorVDruzini = 22,
PogovorMedPrijateljiZnanci = 23,
}
}
@@ -0,0 +1,7 @@
namespace Gos.Core.Entities
{
public class DiscourseEventTranslation : Translation<DiscourseEventTranslation>
{
public string Title { get; set; }
}
}
+43
View File
@@ -0,0 +1,43 @@
using System.Globalization;
namespace Gos.Core.Entities
{
public class DiscourseRegion : BaseEntity, ILocalizableEntity<DiscourseRegionTranslation>
{
public string ShortTitle
{
get => Translations[CultureInfo.CurrentCulture].ShortTitle;
set => Translations[CultureInfo.CurrentCulture].ShortTitle = value;
}
public string Title
{
get => Translations[CultureInfo.CurrentCulture].Title;
set => Translations[CultureInfo.CurrentCulture].Title = value;
}
public TranslationCollection<DiscourseRegionTranslation> Translations { get; set; } = new();
}
public enum DiscourseRegionKeys
{
Celjska = 1,
Novogoriska = 2,
Krska = 3,
Koprska = 4,
Kranjska = 5,
Ljubljanska = 6,
Mariborska = 7,
Murskosoboska = 8,
Novomeska = 9,
Postojnska = 10,
Slovenjgraska = 11,
CelotnaSlovenija = 12,
SeverovzhodnaSlovenija = 13,
JugozahodnaSlovenija = 14,
Avstrija = 15,
Italija = 16,
Madzarska = 17,
Neznano = 18,
}
}
@@ -0,0 +1,9 @@
namespace Gos.Core.Entities
{
public class DiscourseRegionTranslation : Translation<DiscourseRegionTranslation>
{
public string ShortTitle { get; set; }
public string Title { get; set; }
}
}
+29
View File
@@ -0,0 +1,29 @@
using System.Globalization;
namespace Gos.Core.Entities
{
public class DiscourseType : BaseEntity, ILocalizableEntity<DiscourseTypeTranslation>
{
public string ShortTitle
{
get => Translations[CultureInfo.CurrentCulture].ShortTitle;
set => Translations[CultureInfo.CurrentCulture].ShortTitle = value;
}
public string Title
{
get => Translations[CultureInfo.CurrentCulture].Title;
set => Translations[CultureInfo.CurrentCulture].Title = value;
}
public TranslationCollection<DiscourseTypeTranslation> Translations { get; set; } = new();
}
public enum DiscourseTypeKeys
{
JavniInformativnoIzobrazevalni = 1,
JavniRazvedrilni = 2,
NejavniNezasebni = 3,
NejavniZasebni = 4,
}
}
@@ -0,0 +1,9 @@
namespace Gos.Core.Entities
{
public class DiscourseTypeTranslation : Translation<DiscourseTypeTranslation>
{
public string ShortTitle { get; set; }
public string Title { get; set; }
}
}
+7
View File
@@ -0,0 +1,7 @@
namespace Gos.Core.Entities
{
public interface IEntity
{
int Id { get; set; }
}
}
@@ -0,0 +1,8 @@
namespace Gos.Core.Entities
{
public interface ILocalizableEntity<TTranslation>
where TTranslation : Translation<TTranslation>, new()
{
TranslationCollection<TTranslation> Translations { get; set; }
}
}
+17
View File
@@ -0,0 +1,17 @@
using System.Globalization;
namespace Gos.Core.Entities
{
public class Msd : BaseEntity, ILocalizableEntity<MsdTranslation>
{
public string Code { get; set; }
public string Title
{
get => Translations[CultureInfo.CurrentCulture].Title;
set => Translations[CultureInfo.CurrentCulture].Title = value;
}
public TranslationCollection<MsdTranslation> Translations { get; set; } = new();
}
}
+7
View File
@@ -0,0 +1,7 @@
namespace Gos.Core.Entities
{
public class MsdTranslation : Translation<MsdTranslation>
{
public string Title { get; set; }
}
}
+22
View File
@@ -0,0 +1,22 @@
using System.Collections.Generic;
using System.Globalization;
namespace Gos.Core.Entities
{
public class PartOfSpeech : BaseEntity, ILocalizableEntity<PartOfSpeechTranslation>
{
public List<PartOfSpeechAttribute> Attributes { get; set; } = new();
public string Code { get; set; }
public short RecordOrder { get; set; }
public string Title
{
get => Translations[CultureInfo.CurrentCulture].Title;
set => Translations[CultureInfo.CurrentCulture].Title = value;
}
public TranslationCollection<PartOfSpeechTranslation> Translations { get; set; } = new();
}
}
@@ -0,0 +1,20 @@
using System.Collections.Generic;
using System.Globalization;
namespace Gos.Core.Entities
{
public class PartOfSpeechAttribute : BaseEntity, ILocalizableEntity<PartOfSpeechAttributeTranslation>
{
public short RecordOrder { get; set; }
public string Title
{
get => Translations[CultureInfo.CurrentCulture].Title;
set => Translations[CultureInfo.CurrentCulture].Title = value;
}
public TranslationCollection<PartOfSpeechAttributeTranslation> Translations { get; set; } = new();
public List<PartOfSpeechAttributeValue> Values { get; set; } = new();
}
}
@@ -0,0 +1,7 @@
namespace Gos.Core.Entities
{
public class PartOfSpeechAttributeTranslation : Translation<PartOfSpeechAttributeTranslation>
{
public string Title { get; set; }
}
}
@@ -0,0 +1,19 @@
using System.Globalization;
namespace Gos.Core.Entities
{
public class PartOfSpeechAttributeValue : BaseEntity, ILocalizableEntity<PartOfSpeechAttributeValueTranslation>
{
public string Code { get; set; }
public short RecordOrder { get; set; }
public string Title
{
get => Translations[CultureInfo.CurrentCulture].Title;
set => Translations[CultureInfo.CurrentCulture].Title = value;
}
public TranslationCollection<PartOfSpeechAttributeValueTranslation> Translations { get; set; } = new();
}
}
@@ -0,0 +1,7 @@
namespace Gos.Core.Entities
{
public class PartOfSpeechAttributeValueTranslation : Translation<PartOfSpeechAttributeValueTranslation>
{
public string Title { get; set; }
}
}
@@ -0,0 +1,7 @@
namespace Gos.Core.Entities
{
public class PartOfSpeechTranslation : Translation<PartOfSpeechTranslation>
{
public string Title { get; set; }
}
}
+11
View File
@@ -0,0 +1,11 @@
namespace Gos.Core.Entities
{
public class Segment : BaseEntity
{
public int Order { get; set; }
public string SoundFile { get; set; }
public Statement Statement { get; set; }
}
}
+21
View File
@@ -0,0 +1,21 @@
namespace Gos.Core.Entities
{
public class Speaker : BaseEntity
{
public SpeakerAge Age { get; set; }
public string Code { get; set; }
public SpeakerEducation Education { get; set; }
public SpeakerLanguage Language { get; set; }
public SpeakerRegion Region1 { get; set; }
public SpeakerRegion Region2 { get; set; }
public SpeakerRegion Region3 { get; set; }
public SpeakerSex Sex { get; set; }
}
}
+27
View File
@@ -0,0 +1,27 @@
using System.Globalization;
namespace Gos.Core.Entities
{
public class SpeakerAge : BaseEntity, ILocalizableEntity<SpeakerAgeTranslation>
{
public string Title
{
get => Translations[CultureInfo.CurrentCulture].Title;
set => Translations[CultureInfo.CurrentCulture].Title = value;
}
public TranslationCollection<SpeakerAgeTranslation> Translations { get; set; } = new();
}
public enum SpeakerAgeKeys
{
Do10Let = 1,
Od10Do14Let = 2,
Od15Do18Let = 3,
Od19Do24Let = 4,
Od25Do34Let = 5,
Od35Do59Let = 6,
Nad60Let = 7,
Neznano = 8,
}
}
@@ -0,0 +1,7 @@
namespace Gos.Core.Entities
{
public class SpeakerAgeTranslation : Translation<SpeakerAgeTranslation>
{
public string Title { get; set; }
}
}
+24
View File
@@ -0,0 +1,24 @@
using System.Globalization;
namespace Gos.Core.Entities
{
public class SpeakerEducation : BaseEntity, ILocalizableEntity<SpeakerEducationTranslation>
{
public string Title
{
get => Translations[CultureInfo.CurrentCulture].Title;
set => Translations[CultureInfo.CurrentCulture].Title = value;
}
public TranslationCollection<SpeakerEducationTranslation> Translations { get; set; } = new();
}
public enum SpeakerEducationKeys
{
OsAliManj = 1,
SrednjaSola = 2,
VisjaAliVisokaSola = 3,
FakultetaAliVec = 4,
Neznano = 5,
}
}
@@ -0,0 +1,7 @@
namespace Gos.Core.Entities
{
public class SpeakerEducationTranslation : Translation<SpeakerEducationTranslation>
{
public string Title { get; set; }
}
}
+31
View File
@@ -0,0 +1,31 @@
using System.Globalization;
namespace Gos.Core.Entities
{
public class SpeakerLanguage : BaseEntity, ILocalizableEntity<SpeakerLanguageTranslation>
{
public string Title
{
get => Translations[CultureInfo.CurrentCulture].Title;
set => Translations[CultureInfo.CurrentCulture].Title = value;
}
public TranslationCollection<SpeakerLanguageTranslation> Translations { get; set; } = new();
}
public enum SpeakerLanguageKeys
{
Slovenscina = 1,
Anglescina = 2,
Nemscina = 3,
Italijanscina = 4,
Madzarscina = 5,
Juznoslovanski = 6,
Albanscina = 7,
DrugiSlovanski = 8,
DrugiGermanski = 9,
DrugiRomanski = 10,
Neindoevropski = 11,
Neznano = 12,
}
}
@@ -0,0 +1,7 @@
namespace Gos.Core.Entities
{
public class SpeakerLanguageTranslation : Translation<SpeakerLanguageTranslation>
{
public string Title { get; set; }
}
}
+41
View File
@@ -0,0 +1,41 @@
using System.Globalization;
namespace Gos.Core.Entities
{
public class SpeakerRegion : BaseEntity, ILocalizableEntity<SpeakerRegionTranslation>
{
public string ShortTitle
{
get => Translations[CultureInfo.CurrentCulture].ShortTitle;
set => Translations[CultureInfo.CurrentCulture].ShortTitle = value;
}
public string Title
{
get => Translations[CultureInfo.CurrentCulture].Title;
set => Translations[CultureInfo.CurrentCulture].Title = value;
}
public TranslationCollection<SpeakerRegionTranslation> Translations { get; set; } = new();
}
public enum SpeakerRegionKeys
{
Celjska = 1,
Novogoriska = 2,
Krska = 3,
Koprska = 4,
Kranjska = 5,
Ljubljanska = 6,
Mariborska = 7,
Murskosoboska = 8,
Novomeska = 9,
Postojnska = 10,
Slovenjgraska = 11,
Avstrija = 12,
Italija = 13,
Madzarska = 14,
Tujina = 15,
Neznano = 16,
}
}
@@ -0,0 +1,9 @@
namespace Gos.Core.Entities
{
public class SpeakerRegionTranslation : Translation<SpeakerRegionTranslation>
{
public string ShortTitle { get; set; }
public string Title { get; set; }
}
}
+22
View File
@@ -0,0 +1,22 @@
using System.Globalization;
namespace Gos.Core.Entities
{
public class SpeakerSex : BaseEntity, ILocalizableEntity<SpeakerSexTranslation>
{
public string Title
{
get => Translations[CultureInfo.CurrentCulture].Title;
set => Translations[CultureInfo.CurrentCulture].Title = value;
}
public TranslationCollection<SpeakerSexTranslation> Translations { get; set; } = new();
}
public enum SpeakerSexKeys
{
Moski = 1,
Zenski = 2,
Neznano = 3,
}
}
@@ -0,0 +1,7 @@
namespace Gos.Core.Entities
{
public class SpeakerSexTranslation : Translation<SpeakerSexTranslation>
{
public string Title { get; set; }
}
}
+13
View File
@@ -0,0 +1,13 @@
namespace Gos.Core.Entities
{
public class Statement : BaseEntity
{
public string Code { get; set; }
public Discourse Discourse { get; set; }
public int Order { get; set; }
public Speaker Speaker { get; set; }
}
}
+32
View File
@@ -0,0 +1,32 @@
using Gos.Core.Model;
namespace Gos.Core.Entities
{
public class Token : BaseEntity
{
public string ConversationalForm { get; set; }
public int DiscourseOrder { get; set; }
public string Lemma { get; set; }
public string Msd { get; set; }
public int Order { get; set; }
public Segment Segment { get; set; }
public string StandardForm { get; set; }
public TokenType Type { get; set; }
public Token()
{
}
public Token(TokenType type)
{
Type = type;
}
}
}
+10
View File
@@ -0,0 +1,10 @@
namespace Gos.Core.Entities
{
public abstract class Translation<T>
where T : Translation<T>, new()
{
public string CultureName { get; set; }
public int Id { get; set; }
}
}
@@ -0,0 +1,41 @@
using System.Collections.ObjectModel;
using System.Globalization;
using System.Linq;
namespace Gos.Core.Entities
{
public class TranslationCollection<T> : Collection<T>
where T : Translation<T>, new()
{
public T this[CultureInfo culture]
{
get
{
var translation = this.FirstOrDefault(t => t.CultureName == culture.Name);
if (translation == null)
{
translation = new T();
translation.CultureName = culture.Name;
Add(translation);
}
return translation;
}
set
{
var translation = this.FirstOrDefault(t => t.CultureName == culture.Name);
if (translation != null)
{
Remove(translation);
}
Add(value);
}
}
public bool HasCulture(CultureInfo culture)
{
return this.Any(t => t.CultureName == culture.Name);
}
}
}