Skip to content

Commit ca5ef01

Browse files
committed
ST6RI-901 Updated implicit specialization for OccurrenceUsage/PortUsage.
So checkFeatureObjectSpecialization and checkFeatureSubobjectSpecialization are properly satisfied when they apply.
1 parent 847deb7 commit ca5ef01

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

org.omg.sysml/src/org/omg/sysml/adapter/OccurrenceUsageAdapter.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,23 @@ public void postProcess() {
5050
// Implicit Generalization
5151

5252
/**
53+
* @satisfies checkFeatureObjectSpecialization
54+
* @satisfies checkFeatureSubobjectSpecialization
55+
* @satisfies checkFeatureDataValueSpecialization
5356
* @satisfies checkOccurrenceUsageSnapshotSpecialization
5457
* @satisfies checkOccurrenceUsageSuboccurrenceSpecialization
5558
* @satisfies checkOccurrenceUsageTimeSliceSpecialization
5659
*/
5760
@Override
5861
public void addDefaultGeneralType() {
5962
super.addDefaultGeneralType();
60-
if (isSuboccurrence()) {
63+
if (hasDataType()) {
64+
addDefaultGeneralType("dataValue");
65+
}
66+
if (hasStructureType()) {
67+
addDefaultGeneralType(isSubobject()? "subobject": "object");
68+
}
69+
else if (isSuboccurrence()) {
6170
addDefaultGeneralType("suboccurrence");
6271
}
6372
PortionKind portionKind = getTarget().getPortionKind();

org.omg.sysml/src/org/omg/sysml/adapter/PortUsageAdapter.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ public PortUsage getTarget() {
3939

4040
// Implicit Generalization
4141

42+
@Override
43+
public void addDefaultGeneralType() {
44+
super.addDefaultGeneralType();
45+
if (isStructureOwnedComposite()) {
46+
addDefaultGeneralType("subobject");
47+
}
48+
}
49+
4250
/**
4351
* @satisfies checkPortUsageOwnedPortSpecialization
4452
* @satisfies checkPortUsageSubportSpecialization

0 commit comments

Comments
 (0)