using System; using System.Collections.Generic; using System.Text; namespace Leah.Speech.text { public class ContentEntry { private eMood _mood; private string _text; private List _tags; private List _optionalTags; private float _score; // TODO: Scoring einbauen public ContentEntry(string Text) { this._text = Text; this._mood = eMood.All; this._tags = new List(); } public ContentEntry(string Text, eMood Mood) { this._text = Text; this._mood = Mood; this._tags = new List(); } public ContentEntry(string Text, eMood Mood, ushort[] Tags) { this._text = Text; this._mood = Mood; this._tags = new List(Tags); } public void AddTag(ushort s) { if(!this._tags.Contains(s)) { this._tags.Add(s); } } public int TagCount { get { return this._tags.Count; } } public void RemoveTag(ushort tag) { this._tags.Remove(tag); } public ushort[] Tags { get { return this._tags.ToArray(); } set { this._tags = new List(value); } } public string Text { get { return this._text; } set { this._text = value; } } public eMood Mood { get { return this._mood; } set { this._mood = value; } } public bool HasTags(ushort tag) { return this._tags.Contains(tag); } public bool HasTags(ushort[] tags) { foreach (ushort t in tags) if (!this._tags.Contains(t)) return false; return true; } public override string ToString() { return this._text; } } }