Skip to content

Commit 9a7f29e

Browse files
committed
ST6RI-178 Owner derived feature is always included in the uploaded model
1 parent 94738d0 commit 9a7f29e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

org.omg.sysml/src/org/omg/sysml/util/traversal/facade/impl/JsonElementProcessingFacade.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
import java.util.List;
2929
import java.util.Map;
30+
import java.util.Set;
3031
import java.util.UUID;
3132
import java.util.stream.Collectors;
3233

@@ -160,6 +161,9 @@ protected List<Map<String, UUID>> getIdentified(List<Element> elements) {
160161
toList();
161162
}
162163

164+
165+
private final Set<String> alwaysEnabledDerived = Set.of("importedElement", "owner");
166+
163167
/**
164168
* Create an (API)Element for the given model (EMF)Element including the values of all its non-derived
165169
* attributes (unless it is a library model element, in which case only its non-referential attribute values
@@ -181,7 +185,7 @@ protected org.omg.sysml.model.Element createApiModelElement(Element element) {
181185
String featureName = feature.getName();
182186
//always add the importedElement derived field. This field is used for a workaround that addresses
183187
//unstable library membership UUIDs in the EMFModelRefresher.
184-
if ((this.isIncludeDerived() || !feature.isDerived() || "importedElement".equals(feature.getName())) &&
188+
if ((this.isIncludeDerived() || !feature.isDerived() || alwaysEnabledDerived.contains(feature.getName())) &&
185189
// Skip implementation-specific features.
186190
!("isNonunique".equals(featureName) ||
187191
"OperatorExpression".equals(className) && "operand".equals(featureName) ||

0 commit comments

Comments
 (0)