Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
e1d0ed4
Merge pull request #2311 from BEXIS2/rc
sventhiel Dec 12, 2025
6fd697a
pushed missing files in smm #2201
FlatErikk Dec 12, 2025
c0b091c
#2201 update project file
sventhiel Dec 12, 2025
c2308c7
initial push for smm functionalities #980
FlatErikk Apr 2, 2026
760e63a
Removed hardcoded test data
FlatErikk Apr 15, 2026
d11ae2a
Species Matching included VersionID handling #980
FlatErikk Apr 15, 2026
0df5a1a
abstraction for different species matching apis #980
FlatErikk Apr 21, 2026
4f3333e
auto CLB result download, readable column names, cleaned name diff vi…
FlatErikk Jun 1, 2026
1f5a32a
added properties to SpeciesMatchingResult db table #980
FlatErikk Jun 10, 2026
fa8e0a6
added submit route for data cleaning and edits #980
FlatErikk Jun 10, 2026
e8292f4
tidy up #980
FlatErikk Jun 10, 2026
1424cc3
redirect and closing modal store #980
FlatErikk Jun 10, 2026
664361d
fixed store update overwrite bug #980
FlatErikk Jun 10, 2026
0d8ad9a
returning db entries together with matching results #980
FlatErikk Jun 10, 2026
c4981ba
refactor and added new fields to tailor view table #980
FlatErikk Jun 10, 2026
9d8ce63
harmonized table data loading #980
FlatErikk Jun 10, 2026
224cb18
matching result split and persistency #980
FlatErikk Jun 10, 2026
886a483
matching results progress bar #980
FlatErikk Jun 10, 2026
cfa5092
fix matching result progress bar #980
FlatErikk Jun 11, 2026
f991ae2
api specific acceptable matchtypes #980
FlatErikk Jun 11, 2026
d263b01
add missing values to db in CLB AcceptMatches #980
FlatErikk Jun 11, 2026
57f0138
refactor matching svelte code #980
FlatErikk Jun 11, 2026
ec9edef
refactor matching backend code #980
FlatErikk Jun 11, 2026
4fc8489
adapted match accepting to apiBase and new values #980
FlatErikk Jun 16, 2026
5483f2b
color and table adaptations #980
FlatErikk Jun 16, 2026
139cff9
removed unused code that got replaced by apiProvider #980
FlatErikk Jun 16, 2026
5e9d303
better progress overview table #980
FlatErikk Jun 16, 2026
643b6e5
apiOptions selecting + typing + abstraction + ui #980
FlatErikk Jun 18, 2026
746914f
comments + correct StepEntry init #980
FlatErikk Jun 19, 2026
8526bb3
removed unused code #980
FlatErikk Jun 19, 2026
7445758
retrieving stepId when generating new match input file #980
FlatErikk Jun 19, 2026
c13d613
make match file request more explicit #980
FlatErikk Jun 19, 2026
900434a
removed unused code #980
FlatErikk Jun 19, 2026
f6b676a
made matchingProgress and steps more explicit #980
FlatErikk Jun 19, 2026
5531e85
better dataset overview #980
FlatErikk Jun 19, 2026
54aa1c9
removed unused model #980
FlatErikk Jun 19, 2026
c8d5c0e
big rewrite for using indexed DB on bigger tables #980
FlatErikk Aug 26, 2026
1128ea0
smm settings structure for apiOptions #980
FlatErikk Aug 26, 2026
9993b74
Merge branch 'rc' into smm_module
geofranzi Aug 26, 2026
037736e
Merge branch 'smm_module' of https://github.com/BEXIS2/Core into smm_…
geofranzi Aug 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BExIS++.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34723.18
# Visual Studio Version 18
VisualStudioVersion = 18.2.11415.280
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Console", "Console", "{A24A6801-2ECC-4F47-8284-8C93277D3030}"
EndProject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
<Compile Include="Party\PartyTypePair.cs" />
<Compile Include="Party\PartyCustomGridColumns.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SpeciesMatching\SpeciesMatchingResult.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Administration\Administration.cd" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
using BExIS.Dlm.Entities.Data;
using BExIS.Security.Entities.Subjects;
using System;
using Vaiona.Entities.Common;

namespace BExIS.Dlm.Entities.SpeciesMatching
{
public class SpeciesMatchingResult : BaseEntity
{

// original unchanged name (used for matching if EditedName is empty, and for display purposes)
public virtual string OriginalName { get; set; }

// edited name after data cleaning + manual corrections (used for matching)
public virtual string EditedName { get; set; }

// matched name from the external source (the result)
public virtual string MatchedName { get; set; }

// taxonomic status of the matched name (e.g. accepted, synonym, etc.)
public virtual string Status { get; set; }

// type of the match (e.g. exact, fuzzy, etc.)
public virtual string MatchType { get; set; }

// taxonomic rank of the matched name (e.g. species, genus, etc.)
public virtual string MatchRank { get; set; }

// unique identifier of the matched name in the external source (e.g. GBIF taxon ID)
public virtual string MatchId { get; set; }

// authorship of the matched name
public virtual string MatchAuthorship { get; set; }

// accepted name if (for example) the matched name is a synonym
public virtual string AcceptedScientificName { get; set; }

// unique identifier of the accepted name in the external source (e.g. GBIF taxon ID)
public virtual string AcceptedId { get; set; }

// authorship of the accepted name
public virtual string AcceptedAuthorship { get; set; }

// higher classification of the matched name (e.g. kingdom, phylum, class, order, family, genus)
public virtual string TaxonKingdom { get; set; }

public virtual string TaxonPhylum { get; set; }

public virtual string TaxonClass { get; set; }

public virtual string TaxonOrder { get; set; }

public virtual string TaxonFamily { get; set; }

public virtual string TaxonGenus { get; set; }

// timestamp of the match (can vary by hours due to processing and queue times on different APIs)
public virtual DateTime TimestampMatch { get; set; }

// source of the match (e.g. Catalogue of Life, GBIF, etc.)
public virtual string MatchSource { get; set; }

// version of the source used for matching
public virtual string MatchSourceVersion { get; set; }

// indicates whether the match has been confirmed by the user
public virtual bool ConfirmedByUser { get; set; }

// reference to the dataset where the original name was taken from
public virtual Dataset Dataset { get; set; }

// VersionId + Dataset make the unique key for the matching result
public virtual long DatasetVersionId { get; set; }

// reference to the Matching step (or -1 if the result is not associated with a specific step)
public virtual long StepId { get; set; }
}
}
1 change: 1 addition & 0 deletions Components/DLM/BExIS.Dlm.Orm.NH/BExIS.Dlm.Orm.NH.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@
<SubType>Designer</SubType>
</Content>
<Content Include="Mappings\Default\Party\PartyTypePair.hbm.xml" />
<Content Include="Mappings\Default\SpeciesMatching\SpeciesMatchingResult.hbm.xml" />
<Content Include="Mappings\PostgreSQL82Dialect\NativeObjects\Queries.hbm.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<SubType>Designer</SubType>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="BExIS.Dlm.Entities" namespace="BExIS.Dlm.Entities.SpeciesMatching">

<class name="SpeciesMatchingResult" table="smm_species_matching_result" lazy="true">
<id name="Id" column="id" type="Int64">
<generator class="native"/>
</id>

<property name="OriginalName" column="original_name" type="string" not-null="false" />

<property name="EditedName" column="edited_name" type="string" not-null="false" />

<property name="MatchedName" column="matched_name" type="string" not-null="false" />

<property name="Status" column="status" type="string" not-null="false" />

<property name="MatchType" column="match_type" type="string" not-null="false" />

<property name="MatchRank" column="match_rank" type="string" not-null="false" />

<property name="MatchId" column="match_id" type="string" not-null="false" />

<property name="MatchAuthorship" column="match_authorship" type="string" not-null="false" />

<property name="AcceptedScientificName" column="accepted_scientific_name" type="string" not-null="false" />

<property name="AcceptedId" column="accepted_id" type="string" not-null="false" />

<property name="AcceptedAuthorship" column="accepted_authorship" type="string" not-null="false" />

<property name="TaxonKingdom" column="taxon_kingdom" type="string" not-null="false" />

<property name="TaxonPhylum" column="taxon_phylum" type="string" not-null="false" />

<property name="TaxonClass" column="taxon_class" type="string" not-null="false" />

<property name="TaxonOrder" column="taxon_order" type="string" not-null="false" />

<property name="TaxonFamily" column="taxon_family" type="string" not-null="false" />

<property name="TaxonGenus" column="taxon_genus" type="string" not-null="false" />

<property name="TimestampMatch" column="timestamp_match" type="DateTime" not-null="false" />

<property name="MatchSource" column="match_source" type="string" not-null="false" />

<property name="MatchSourceVersion" column="match_source_version" type="string" not-null="false" />

<property name="ConfirmedByUser" column="confirmed_by_user" type="bool" not-null="false" />

<property name="StepId" column="step_id" type="Int64" not-null="false" />

<!-- Mapping entity associations -->

<property name="DatasetVersionId" column="dataset_version_id" type="Int64" not-null="false" />

<!--Dataset-->
<many-to-one name="Dataset" class="BExIS.Dlm.Entities.Data.Dataset" not-null="false" column="DatasetRef" />

<!--DatasetVersion (does not work this way ... Error: refers to unmapped ...-->
<!--
<many-to-one class="DatasetVersion" name="DatasetVersion" column="DatasetVersionRef">
</many-to-one>
-->

</class>

</hibernate-mapping>
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
<Compile Include="Party\PartyRelationshipTypeManager.cs" />
<Compile Include="Party\PartyTypeManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SpeciesMatching\SpeciesMatchingResultManager.cs" />
<Compile Include="TypeSystem\DataTypeCode.cs" />
<Compile Include="TypeSystem\DataTypeInfo.cs" />
<Compile Include="TypeSystem\DataTypeUtility.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
using BExIS.Dlm.Entities.Data;
using BExIS.Dlm.Entities.SpeciesMatching;
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Vaiona.Persistence.Api;

namespace BExIS.Dlm.Services.SpeciesMatching
{
public class SpeciesMatchingResultManager : IDisposable
{

private IUnitOfWork guow = null;

public SpeciesMatchingResultManager()
{
guow = this.GetIsolatedUnitOfWork();
this.Repo = guow.GetReadOnlyRepository<SpeciesMatchingResult>();
}

private bool isDisposed = false;

~SpeciesMatchingResultManager()
{
Dispose(true);
}

public void Dispose()
{
Dispose(true);
}

protected virtual void Dispose(bool disposing)
{
if (!isDisposed)
{
if (disposing)
{
if (guow != null)
guow.Dispose();
isDisposed = true;
}
}
}

public IReadOnlyRepository<SpeciesMatchingResult> Repo { get; private set; }

public SpeciesMatchingResult Create(SpeciesMatchingResult matchingResult)
{
if (matchingResult == null) throw new ArgumentNullException("Species matching result must not be null.");
if (matchingResult.Dataset == null) throw new ArgumentNullException("Dataset must not be null.");
if (matchingResult.OriginalName == null) throw new ArgumentNullException("Dataset must not be null.");

using (IUnitOfWork uow = this.GetUnitOfWork())
{
try
{
IRepository<SpeciesMatchingResult> repo = uow.GetRepository<SpeciesMatchingResult>();
repo.Put(matchingResult);
uow.Commit();

return (matchingResult);
}
catch (Exception ex)
{
throw new Exception("SpeciesMatchingResult creation failed.", ex);
}
}
}

public SpeciesMatchingResult Update(SpeciesMatchingResult matchingResult)
{
if (matchingResult == null) throw new ArgumentNullException("Species matching result must not be null.");

Contract.Ensures(Contract.Result<SpeciesMatchingResult>() != null && Contract.Result<SpeciesMatchingResult>().Id >= 0);

using (IUnitOfWork uow = this.GetUnitOfWork())
{
try
{
IRepository<SpeciesMatchingResult> repo = uow.GetRepository<SpeciesMatchingResult>();
repo.Merge(matchingResult);
var merged = repo.Get(matchingResult.Id);
repo.Put(merged);
uow.Commit();

return (merged);
}
catch (Exception ex)
{
throw new Exception("SpeciesMatchingResult creation failed.", ex);
}
}
}
public bool Delete(long id)
{
if (id == 0) throw new ArgumentException("Species matching result must not be null.");

Contract.Ensures(Contract.Result<SpeciesMatchingResult>() != null && Contract.Result<SpeciesMatchingResult>().Id >= 0);

using (IUnitOfWork uow = this.GetUnitOfWork())
{
IRepository<SpeciesMatchingResult> repo = uow.GetRepository<SpeciesMatchingResult>();

var e = repo.Get(id);

if (e != null)
{
repo.Delete(e);
uow.Commit();

return true;
}
else
{
throw new ArgumentException(string.Format("the species matching result with the id {0} does not exist", id));
}
}
}

public bool Delete(SpeciesMatchingResult matchingResult)
{
if (matchingResult == null) throw new ArgumentNullException("Entity template must not be null.");

Contract.Ensures(Contract.Result<SpeciesMatchingResult>() != null && Contract.Result<SpeciesMatchingResult>().Id >= 0);

using (IUnitOfWork uow = this.GetUnitOfWork())
{
IRepository<SpeciesMatchingResult> repo = uow.GetRepository<SpeciesMatchingResult>();

repo.Delete(matchingResult);
uow.Commit();

return true;
}
}

}
}
1 change: 1 addition & 0 deletions Components/DLM/BExIS.Dlm.Tests/BExIS.Dlm.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@
<Compile Include="Services\Party\PartyManagerTests.cs" />
<Compile Include="Services\Party\PartyRelationshipTypeManagerTest.cs" />
<Compile Include="Services\Party\PartyTypeManagerTests.cs" />
<Compile Include="Services\SpeciesMatching\SpeciesMatchingResultManagerTest.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config">
Expand Down
Loading
Loading