-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bulk-model-sync): migration to IReadableNode/IWritableNode
- Loading branch information
Showing
11 changed files
with
189 additions
and
131 deletions.
There are no files selected for viewing
8 changes: 5 additions & 3 deletions
8
bulk-model-sync-lib/src/commonMain/kotlin/org/modelix/model/sync/bulk/INodeAssociation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
package org.modelix.model.sync.bulk | ||
|
||
import org.modelix.model.api.INode | ||
import org.modelix.model.api.IReadableNode | ||
import org.modelix.model.api.IWritableNode | ||
|
||
/** | ||
* A node association is responsible for storing the mapping between a source node and the imported target node. | ||
* Provides efficient lookup of the mapping from previous synchronization runs. | ||
*/ | ||
interface INodeAssociation { | ||
fun resolveTarget(sourceNode: INode): INode? | ||
fun associate(sourceNode: INode, targetNode: INode) | ||
fun resolveTarget(sourceNode: IReadableNode): IWritableNode? | ||
fun associate(sourceNode: IReadableNode, targetNode: IWritableNode) | ||
fun matches(sourceNode: IReadableNode, targetNode: IWritableNode) = resolveTarget(sourceNode) == targetNode | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.