FOSSredder 0.5.0
Loading...
Searching...
No Matches
core::application::importing::draft Namespace Reference

Classes

struct  DraftChoiceRow
 Represents a selectable catalog row for import-draft assignment UIs. More...
struct  DraftDerivedState
 Contains all derived matching state needed to render the current transaction draft. More...
class  DraftFinalizer
 Converts a statement draft into persisted workspace entities. More...
struct  DraftImportSuggestions
 Holds core-native ranked suggestions for the import draft. More...
struct  DraftLinkSelection
 Describes the editable transaction-draft link state independent of any UI toolkit. More...
struct  DraftSuggestionBucket
 Groups ranked candidates for one draft link target. More...
struct  DraftSuggestionCandidate
 Carries the subset of suggestion data needed for current-draft matching decisions. More...
struct  DraftTextSignals
 Carries the shared text signals extracted from one imported transaction. More...
class  StatementDraft
class  TransactionDraft
struct  TransactionDraftPatch

Enumerations

enum class  DraftAutoSelectionMode { InitialImport , InteractiveSync }

Functions

std::string normalizeDraftText (const std::string &text)
 Normalizes free-form draft text for fuzzy matching.
bool matchesDraftText (const std::string &left, const std::string &right)
 Compares two draft text fragments after normalization.
std::vector< std::string > referenceAliasesFromMetadata (const std::string &metadata)
 Extracts alias-like reference strings from draft metadata.
DraftTextSignals buildDraftTextSignals (const core::domain::catalog::WorkspaceCatalog &state, const TransactionDraft &transaction)
 Derives text signals from a workspace transaction draft.
DraftImportSuggestions buildImportSuggestions (const core::domain::catalog::WorkspaceCatalog &state, const TransactionDraft &transaction)
 Builds ranked import suggestions for the given workspace and transaction draft.
std::string resolveActorId (const core::domain::catalog::WorkspaceCatalog &state, const std::string &text)
 Resolves the best matching actor identifier for the provided text.
std::string resolveContractId (const core::domain::catalog::WorkspaceCatalog &state, const std::string &text)
 Resolves the best matching contract identifier for the provided text.
bool contractIsFullyAllocatable (const core::domain::catalog::WorkspaceCatalog &state, const std::string &contractId)
 Checks whether all transactions assigned to a contract are allocatable.
core::domain::catalog::WorkspaceCatalog mergeCatalogState (core::domain::catalog::WorkspaceCatalog primary, const core::domain::catalog::WorkspaceCatalog &secondary)
 Merges two catalog states by keeping populated primary collections and filling gaps from a secondary state.
DraftDerivedState buildDraftDerivedState (const core::domain::catalog::WorkspaceCatalog &state, const DraftLinkSelection &selection)
 Derives UI-agnostic matching state for the currently edited draft link.
bool applyDerivedSelections (TransactionDraft &draft, const DraftDerivedState &derived, DraftAutoSelectionMode mode)
bool applyActorSelection (TransactionDraft &draft, const std::string &actorId)
bool clearActorSelection (TransactionDraft &draft)
bool applyPropertySelection (TransactionDraft &draft, const std::string &propertyId)
bool setPropertySelected (TransactionDraft &draft, const std::string &propertyId, bool selected)
bool applyContractSelection (TransactionDraft &draft, const DraftChoiceRow &contract)
bool applyContractSelection (TransactionDraft &draft, const core::domain::catalog::WorkspaceCatalog &state, const std::string &contractId)
bool clearContractSelection (TransactionDraft &draft)
bool applyTransactionPatch (TransactionDraft &draft, const TransactionDraftPatch &patch)
int insertTransactionAfter (StatementDraft &draft, int currentIndex)
int removeTransactionAt (StatementDraft &draft, int index)
bool renameStatementDraft (StatementDraft &draft, const std::string &name)

Enumeration Type Documentation

◆ DraftAutoSelectionMode

Enumerator
InitialImport 
InteractiveSync 

Definition at line 133 of file DraftMatcher.h.

Function Documentation

◆ applyActorSelection()

bool core::application::importing::draft::applyActorSelection ( TransactionDraft & draft,
const std::string & actorId )

Definition at line 1125 of file DraftMatcherProjection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ applyContractSelection() [1/2]

bool core::application::importing::draft::applyContractSelection ( TransactionDraft & draft,
const core::domain::catalog::WorkspaceCatalog & state,
const std::string & contractId )

Definition at line 1226 of file DraftMatcherProjection.cpp.

Here is the call graph for this function:

◆ applyContractSelection() [2/2]

bool core::application::importing::draft::applyContractSelection ( TransactionDraft & draft,
const DraftChoiceRow & contract )

Definition at line 1194 of file DraftMatcherProjection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ applyDerivedSelections()

bool core::application::importing::draft::applyDerivedSelections ( TransactionDraft & draft,
const DraftDerivedState & derived,
DraftAutoSelectionMode mode )

Definition at line 1099 of file DraftMatcherProjection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ applyPropertySelection()

bool core::application::importing::draft::applyPropertySelection ( TransactionDraft & draft,
const std::string & propertyId )

Definition at line 1149 of file DraftMatcherProjection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ applyTransactionPatch()

bool core::application::importing::draft::applyTransactionPatch ( TransactionDraft & draft,
const TransactionDraftPatch & patch )

Definition at line 1247 of file DraftMatcherProjection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildDraftDerivedState()

DraftDerivedState core::application::importing::draft::buildDraftDerivedState ( const core::domain::catalog::WorkspaceCatalog & state,
const DraftLinkSelection & selection )

Derives UI-agnostic matching state for the currently edited draft link.

Parameters
stateCurrent workspace state used for catalog lookups.
selectionCurrent draft link selection.
Returns
Derived selection state ready for presentation or persistence.

Definition at line 620 of file DraftMatcherProjection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildDraftTextSignals()

DraftTextSignals core::application::importing::draft::buildDraftTextSignals ( const core::domain::catalog::WorkspaceCatalog & state,
const TransactionDraft & transaction )

Derives text signals from a workspace transaction draft.

Parameters
stateCurrent workspace state used to enrich the signals.
transactionTransaction draft to inspect.
Returns
Derived text signals for matching and suggestion generation.

Definition at line 29 of file DraftMatcherSignals.cpp.

Here is the caller graph for this function:

◆ buildImportSuggestions()

DraftImportSuggestions core::application::importing::draft::buildImportSuggestions ( const core::domain::catalog::WorkspaceCatalog & state,
const TransactionDraft & transaction )

Builds ranked import suggestions for the given workspace and transaction draft.

Parameters
stateCurrent workspace state used as the matching catalog.
transactionTransaction draft to analyze.
Returns
Ranked import suggestions for actors, properties, and contracts.

Definition at line 889 of file DraftMatcherProjection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearActorSelection()

bool core::application::importing::draft::clearActorSelection ( TransactionDraft & draft)

Definition at line 1139 of file DraftMatcherProjection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearContractSelection()

bool core::application::importing::draft::clearContractSelection ( TransactionDraft & draft)

Definition at line 1240 of file DraftMatcherProjection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ contractIsFullyAllocatable()

bool core::application::importing::draft::contractIsFullyAllocatable ( const core::domain::catalog::WorkspaceCatalog & state,
const std::string & contractId )

Checks whether all transactions assigned to a contract are allocatable.

Parameters
stateCurrent workspace state.
contractIdContract identifier to inspect.
Returns
True when the contract has at least one transaction and all are allocatable.

Definition at line 45 of file DraftMatcherResolution.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertTransactionAfter()

int core::application::importing::draft::insertTransactionAfter ( StatementDraft & draft,
int currentIndex )

Definition at line 1275 of file DraftMatcherProjection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ matchesDraftText()

bool core::application::importing::draft::matchesDraftText ( const std::string & left,
const std::string & right )

Compares two draft text fragments after normalization.

Parameters
leftLeft-hand text fragment.
rightRight-hand text fragment.
Returns
True when both fragments normalize to the same value.

Definition at line 19 of file DraftMatcherSignals.cpp.

◆ mergeCatalogState()

core::domain::catalog::WorkspaceCatalog core::application::importing::draft::mergeCatalogState ( core::domain::catalog::WorkspaceCatalog primary,
const core::domain::catalog::WorkspaceCatalog & secondary )

Merges two catalog states by keeping populated primary collections and filling gaps from a secondary state.

Parameters
primaryPrimary workspace state to keep when populated.
secondarySecondary workspace state used to fill gaps.
Returns
A state that prefers primary collections and borrows missing ones from the secondary state.

Definition at line 58 of file DraftMatcherResolution.cpp.

Here is the call graph for this function:

◆ normalizeDraftText()

std::string core::application::importing::draft::normalizeDraftText ( const std::string & text)

Normalizes free-form draft text for fuzzy matching.

Parameters
textInput text to normalize.
Returns
Normalized text suitable for comparisons.

Definition at line 14 of file DraftMatcherSignals.cpp.

Here is the caller graph for this function:

◆ referenceAliasesFromMetadata()

std::vector< std::string > core::application::importing::draft::referenceAliasesFromMetadata ( const std::string & metadata)

Extracts alias-like reference strings from draft metadata.

Parameters
metadataFree-form metadata text.
Returns
Extracted reference aliases.

Definition at line 24 of file DraftMatcherSignals.cpp.

◆ removeTransactionAt()

int core::application::importing::draft::removeTransactionAt ( StatementDraft & draft,
int index )

Definition at line 1296 of file DraftMatcherProjection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ renameStatementDraft()

bool core::application::importing::draft::renameStatementDraft ( StatementDraft & draft,
const std::string & name )

Definition at line 1313 of file DraftMatcherProjection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolveActorId()

std::string core::application::importing::draft::resolveActorId ( const core::domain::catalog::WorkspaceCatalog & state,
const std::string & text )

Resolves the best matching actor identifier for the provided text.

Parameters
stateCurrent workspace state used as the actor catalog.
textText to resolve.
Returns
Matching actor identifier, or an empty string when no match is found.

Definition at line 14 of file DraftMatcherResolution.cpp.

Here is the call graph for this function:

◆ resolveContractId()

std::string core::application::importing::draft::resolveContractId ( const core::domain::catalog::WorkspaceCatalog & state,
const std::string & text )

Resolves the best matching contract identifier for the provided text.

Parameters
stateCurrent workspace state used as the contract catalog.
textText to resolve.
Returns
Matching contract identifier, or an empty string when no match is found.

Definition at line 29 of file DraftMatcherResolution.cpp.

Here is the call graph for this function:

◆ setPropertySelected()

bool core::application::importing::draft::setPropertySelected ( TransactionDraft & draft,
const std::string & propertyId,
bool selected )

Definition at line 1166 of file DraftMatcherProjection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: