19 using System.Collections.Generic;
21 namespace Lucene.Net.Search
29 private System.String description;
30 private List<Explanation> details;
39 this.description = description;
50 public virtual bool IsMatch
52 get {
return (0.0f < Value); }
57 public virtual float Value
60 set { this.value = value; }
64 public virtual string Description
66 get {
return description; }
67 set { this.description = value; }
73 protected internal virtual string Summary
75 get {
return Value +
" = " + Description; }
83 return details.ToArray();
90 details =
new List<Explanation>();
95 public override System.String ToString()
100 protected internal virtual System.String ToString(
int depth)
102 System.Text.StringBuilder buffer =
new System.Text.StringBuilder();
103 for (
int i = 0; i < depth; i++)
107 buffer.Append(Summary);
113 for (
int i = 0; i < details.Length; i++)
115 buffer.Append(details[i].ToString(depth + 1));
119 return buffer.ToString();
123 public virtual System.String ToHtml()
125 System.Text.StringBuilder buffer =
new System.Text.StringBuilder();
126 buffer.Append(
"<list>\n");
128 buffer.Append(
"<item>");
129 buffer.Append(Summary);
130 buffer.Append(
"<br />\n");
135 for (
int i = 0; i < details.Length; i++)
137 buffer.Append(details[i].ToHtml());
141 buffer.Append(
"</item>\n");
142 buffer.Append(
"</list>\n");
144 return buffer.ToString();
158 public abstract float Idf {
get; }
165 public abstract System.String Explain();