Refactor: Rename lookup dictionaries to thesaurus.
This prevents confusion with the .NET term 'dictionary'.
This commit is contained in:
@ -67,8 +67,8 @@ namespace zaaReloaded2.Importer.ZaaImporter
|
||||
/// to look up the canonical name, material type, and whether or
|
||||
/// not to always print the reference interval</param>
|
||||
public LaurisItem(string laurisString,
|
||||
Dictionaries.ParameterDictionary parameterDictionary,
|
||||
Dictionaries.UnitDictionary unitDictionary)
|
||||
Thesaurus.Parameters parameterDictionary,
|
||||
Thesaurus.Units unitDictionary)
|
||||
: this(laurisString)
|
||||
{
|
||||
if (parameterDictionary != null)
|
||||
|
@ -21,7 +21,7 @@ using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using zaaReloaded2.Dictionaries;
|
||||
using zaaReloaded2.Thesaurus;
|
||||
using zaaReloaded2.LabModel;
|
||||
|
||||
namespace zaaReloaded2.Importer.ZaaImporter
|
||||
@ -78,8 +78,8 @@ namespace zaaReloaded2.Importer.ZaaImporter
|
||||
/// <param name="unitDictionary">Unit dictionary that contains canonical
|
||||
/// unit names.</param>
|
||||
public LaurisParagraph(string paragraph,
|
||||
Dictionaries.ParameterDictionary parameterDictionary,
|
||||
Dictionaries.UnitDictionary unitDictionary)
|
||||
Thesaurus.Parameters parameterDictionary,
|
||||
Thesaurus.Units unitDictionary)
|
||||
{
|
||||
OriginalParagraph = paragraph;
|
||||
_parameterDictionary = parameterDictionary;
|
||||
@ -123,8 +123,8 @@ namespace zaaReloaded2.Importer.ZaaImporter
|
||||
#region Fields
|
||||
|
||||
static readonly Regex _expectedFormat = new Regex(@"(?<caption>[^:]+:\s*)?(?<items>[^:]+:\s*[^;]+;)*");
|
||||
Dictionaries.ParameterDictionary _parameterDictionary;
|
||||
Dictionaries.UnitDictionary _unitDictionary;
|
||||
Thesaurus.Parameters _parameterDictionary;
|
||||
Thesaurus.Units _unitDictionary;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using zaaReloaded2.Dictionaries;
|
||||
using zaaReloaded2.Thesaurus;
|
||||
using zaaReloaded2.LabModel;
|
||||
|
||||
namespace zaaReloaded2.Importer.ZaaImporter
|
||||
@ -114,8 +114,8 @@ namespace zaaReloaded2.Importer.ZaaImporter
|
||||
|
||||
public LaurisTimePoint(
|
||||
string laurisText,
|
||||
ParameterDictionary parameterDictionary,
|
||||
UnitDictionary unitDictionary)
|
||||
Parameters parameterDictionary,
|
||||
Units unitDictionary)
|
||||
: this()
|
||||
{
|
||||
_parameterDictionary = parameterDictionary;
|
||||
@ -129,8 +129,8 @@ namespace zaaReloaded2.Importer.ZaaImporter
|
||||
|
||||
public LaurisTimePoint(
|
||||
string[] paragraphs,
|
||||
ParameterDictionary parameterDictionary,
|
||||
UnitDictionary unitDictionary)
|
||||
Parameters parameterDictionary,
|
||||
Units unitDictionary)
|
||||
: this()
|
||||
{
|
||||
_parameterDictionary = parameterDictionary;
|
||||
@ -222,8 +222,8 @@ namespace zaaReloaded2.Importer.ZaaImporter
|
||||
static readonly Regex _timeStampRegex = new Regex(
|
||||
@"^\s*\(?\s*(?<datetime>\d\d\.\d\d\.\d\d\d\d\s+\d\d:\d\d)");
|
||||
string[] _paragraphs;
|
||||
ParameterDictionary _parameterDictionary;
|
||||
UnitDictionary _unitDictionary;
|
||||
Parameters _parameterDictionary;
|
||||
Units _unitDictionary;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using Bovender.Extensions;
|
||||
using zaaReloaded2.LabModel;
|
||||
using zaaReloaded2.Dictionaries;
|
||||
using zaaReloaded2.Thesaurus;
|
||||
|
||||
namespace zaaReloaded2.Importer.ZaaImporter
|
||||
{
|
||||
@ -107,8 +107,8 @@ namespace zaaReloaded2.Importer.ZaaImporter
|
||||
|
||||
public ZaaImporter()
|
||||
{
|
||||
_parameters = new ParameterDictionary();
|
||||
_units = new UnitDictionary();
|
||||
_parameters = new Parameters();
|
||||
_units = new Units();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -116,8 +116,8 @@ namespace zaaReloaded2.Importer.ZaaImporter
|
||||
#region Fields
|
||||
|
||||
Laboratory _laboratory;
|
||||
ParameterDictionary _parameters;
|
||||
UnitDictionary _units;
|
||||
Parameters _parameters;
|
||||
Units _units;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using zaaReloaded2.Dictionaries;
|
||||
using zaaReloaded2.Thesaurus;
|
||||
|
||||
namespace zaaReloaded2.LabModel
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ using System;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace zaaReloaded2.Dictionaries
|
||||
namespace zaaReloaded2.Thesaurus
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple parser that separates a line from a text file into
|
@ -23,14 +23,14 @@ using System.Text;
|
||||
using System.IO;
|
||||
using zaaReloaded2.LabModel;
|
||||
|
||||
namespace zaaReloaded2.Dictionaries
|
||||
namespace zaaReloaded2.Thesaurus
|
||||
{
|
||||
/// <summary>
|
||||
/// Dictionary that is used to convert Lauris parameter names to
|
||||
/// Thesaurus that is used to convert Lauris parameter names to
|
||||
/// canonical parameter names, and to assign categories and determine
|
||||
/// which parameters always require the output of reference intervals.
|
||||
/// </summary>
|
||||
public class ParameterDictionary : DictionaryBase
|
||||
public class Parameters : ThesaurusBase
|
||||
{
|
||||
#region Public methods
|
||||
|
||||
@ -87,7 +87,7 @@ namespace zaaReloaded2.Dictionaries
|
||||
protected override System.IO.Stream GetDefaultStream()
|
||||
{
|
||||
return Assembly.GetExecutingAssembly().GetManifestResourceStream(
|
||||
"zaaReloaded2.Defaults.parameters.txt");
|
||||
"zaaReloaded2.Thesaurus.Defaults.parameters.txt");
|
||||
}
|
||||
|
||||
/// <summary>
|
@ -22,14 +22,14 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace zaaReloaded2.Dictionaries
|
||||
namespace zaaReloaded2.Thesaurus
|
||||
{
|
||||
/// <summary>
|
||||
/// Base class for the <see cref="ParameterDictionary"/>
|
||||
/// and the <see cref="UnitDictionary"/>; implements methods
|
||||
/// Base class for the <see cref="Parameters"/>
|
||||
/// and the <see cref="Units"/>; implements methods
|
||||
/// to read configuration files.
|
||||
/// </summary>
|
||||
public abstract class DictionaryBase
|
||||
public abstract class ThesaurusBase
|
||||
{
|
||||
#region Public properties
|
||||
|
||||
@ -48,7 +48,7 @@ namespace zaaReloaded2.Dictionaries
|
||||
/// Constructs a new dictionary, loading default data from a built-in
|
||||
/// resource, and user data from a custom file.
|
||||
/// </summary>
|
||||
public DictionaryBase()
|
||||
public ThesaurusBase()
|
||||
{
|
||||
Records = new SortedDictionary<string, string[]>();
|
||||
LoadDefaultValues();
|
@ -22,13 +22,13 @@ using System.Text;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace zaaReloaded2.Dictionaries
|
||||
namespace zaaReloaded2.Thesaurus
|
||||
{
|
||||
/// <summary>
|
||||
/// Dictionary that is used to convert Lauris units to canonical
|
||||
/// Thesaurus that is used to convert Lauris units to canonical
|
||||
/// zaaReloaded2 units.
|
||||
/// </summary>
|
||||
public class UnitDictionary : DictionaryBase
|
||||
public class Units : ThesaurusBase
|
||||
{
|
||||
#region Public methods
|
||||
|
||||
@ -55,7 +55,7 @@ namespace zaaReloaded2.Dictionaries
|
||||
protected override System.IO.Stream GetDefaultStream()
|
||||
{
|
||||
return Assembly.GetExecutingAssembly().GetManifestResourceStream(
|
||||
"zaaReloaded2.Defaults.units.txt");
|
||||
"zaaReloaded2.Thesaurus.Defaults.units.txt");
|
||||
}
|
||||
|
||||
/// <summary>
|
@ -163,7 +163,7 @@
|
||||
can be found.
|
||||
-->
|
||||
<ItemGroup>
|
||||
<Compile Include="Dictionaries\DictionaryBase.cs" />
|
||||
<Compile Include="Thesaurus\ThesaurusBase.cs" />
|
||||
<Compile Include="Formatter\Elements\ElementsList.cs" />
|
||||
<Compile Include="Formatter\IItemFormatterDictionary.cs" />
|
||||
<Compile Include="Formatter\ItemFormatter.cs" />
|
||||
@ -173,9 +173,9 @@
|
||||
<Compile Include="Formatter\TimePointFormatterDictionary.cs" />
|
||||
<Compile Include="LabModel\IItemDictionary.cs" />
|
||||
<Compile Include="LabModel\ItemDictionary.cs" />
|
||||
<Compile Include="Dictionaries\LineParser.cs" />
|
||||
<Compile Include="Dictionaries\ParameterDictionary.cs" />
|
||||
<Compile Include="Dictionaries\UnitDictionary.cs" />
|
||||
<Compile Include="Thesaurus\LineParser.cs" />
|
||||
<Compile Include="Thesaurus\Parameters.cs" />
|
||||
<Compile Include="Thesaurus\Units.cs" />
|
||||
<Compile Include="Formatter\Elements\ElementBase.cs" />
|
||||
<Compile Include="Formatter\Elements\Items.cs" />
|
||||
<Compile Include="Formatter\Formatter.cs" />
|
||||
@ -226,8 +226,8 @@
|
||||
<None Include="zaaReloaded2.pfx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Defaults\parameters.txt" />
|
||||
<EmbeddedResource Include="Defaults\units.txt" />
|
||||
<EmbeddedResource Include="Thesaurus\Defaults\parameters.txt" />
|
||||
<EmbeddedResource Include="Thesaurus\Defaults\units.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<PropertyGroup>
|
||||
|
Reference in New Issue
Block a user