Skip to content

Commit 29538cc

Browse files
committed
feat(model-api): add getOriginalReference() function
1 parent 5f613c0 commit 29538cc

File tree

1 file changed

+6
-0
lines changed
  • model-api/src/commonMain/kotlin/org/modelix/model/api

1 file changed

+6
-0
lines changed

model-api/src/commonMain/kotlin/org/modelix/model/api/INode.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import kotlinx.coroutines.flow.flatMapConcat
2222
import kotlinx.coroutines.flow.flattenConcat
2323
import kotlinx.coroutines.flow.flowOf
2424
import org.modelix.model.area.IArea
25+
import org.modelix.model.data.NodeData
2526

2627
/**
2728
* Representation of a model element.
@@ -206,6 +207,11 @@ interface INode {
206207
@Deprecated("use getReferenceLinks()")
207208
fun getReferenceRoles(): List<String>
208209

210+
/**
211+
* @return the original reference of this node
212+
*/
213+
fun getOriginalReference(): String? = getPropertyValue(IProperty.fromName(NodeData.ID_PROPERTY_KEY))
214+
209215
// <editor-fold desc="non-string based API">
210216
fun usesRoleIds(): Boolean = false
211217
fun getContainmentLink(): IChildLink? = roleInParent?.let { role ->

0 commit comments

Comments
 (0)