Beispiel #1
0
        /// <summary>
        /// String representation.
        /// </summary>
        /// <param name="idManager">ID manager.</param>
        /// <returns>String representation.</returns>
        public string ToString(EntityIdManager idManager)
        {
            string atomName = GetFullName(idManager);

            IList <ITerm> terms = GetTerms();

            if (terms.Count == 0)
            {
                return($"({atomName})");
            }

            List <string> termsNames = new List <string>();

            foreach (var term in terms)
            {
                termsNames.Add(term.ToString());
            }

            return($"({atomName} {string.Join(" ", termsNames)})");
        }
Beispiel #2
0
 /// <summary>
 /// Gets the full name of the atom from its ID.
 /// </summary>
 /// <param name="idManager">ID manager.</param>
 /// <returns>Full atom name.</returns>
 public string GetFullName(EntityIdManager idManager)
 {
     return(idManager.GetNameFromId(GetNameId()));
 }