Skip to content

Commit fa70540

Browse files
committed
Merge branch 'release/2022-04-m1'
2 parents 44041c1 + bad14b6 commit fa70540

File tree

671 files changed

+36708
-34627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

671 files changed

+36708
-34627
lines changed

app/controllers/ElementController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private Result buildPaginatedResult(List<Element> elements, UUID projectId, UUID
7575
return paginateResult(
7676
buildResult(elements, List.class, metamodelProvider.getImplementationClass(Element.class), request, new DataJsonLdAdorner.Parameters(projectId, commitId)),
7777
elements.size(),
78-
idx -> elements.get(idx).getIdentifier(),
78+
idx -> elements.get(idx).getElementId(),
7979
request,
8080
pageRequest
8181
);

app/controllers/RelationshipController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private Result buildPaginatedResult(List<Relationship> relationships, UUID proje
7575
return paginateResult(
7676
buildResult(relationships, List.class, metamodelProvider.getImplementationClass(Relationship.class), request, new DataJsonLdAdorner.Parameters(projectId, commitId)),
7777
relationships.size(),
78-
idx -> relationships.get(idx).getIdentifier(),
78+
idx -> relationships.get(idx).getElementId(),
7979
request,
8080
pageRequest
8181
);

app/dao/impl/jpa/JpaCommitDao.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,11 @@ public void setId(UUID id) {
192192
return cacheResolver.apply(data, identifierToDataMap)
193193
.map(fnData -> fnData != tombstone ? fnData : null)
194194
.orElseGet(() -> {
195-
Data resolved = commitResolver.apply(data, commit.getPreviousCommit());
195+
Commit previousCommit = commit.getPreviousCommit();
196+
if (previousCommit == null) {
197+
return null;
198+
}
199+
Data resolved = commitResolver.apply(data, previousCommit);
196200
identifierToDataMap.put(resolved.getId(), resolved);
197201
return resolved;
198202
});

app/dao/impl/jpa/JpaElementDao.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public Optional<Element> findById(UUID id) {
7474
CriteriaQuery<ElementImpl> query = builder.createQuery(ElementImpl.class);
7575
Root<ElementImpl> root = query.from(ElementImpl.class);
7676
query.select(root).where(builder.and(
77-
builder.equal(root.get(ElementImpl_.identifier), id),
77+
builder.equal(root.get(ElementImpl_.elementId), id),
7878
getTypeExpression(builder, root)
7979
));
8080
try {
@@ -106,7 +106,7 @@ public List<Element> findAll(@Nullable UUID after, @Nullable UUID before, int ma
106106
Root<ElementImpl> root = query.from(ElementImpl.class);
107107
query.select(root);
108108
Expression<Boolean> where = getTypeExpression(builder, root);
109-
Paginated<TypedQuery<ElementImpl>> paginated = paginateQuery(after, before, maxResults, query, builder, em, root.get(ElementImpl_.identifier), where);
109+
Paginated<TypedQuery<ElementImpl>> paginated = paginateQuery(after, before, maxResults, query, builder, em, root.get(ElementImpl_.elementId), where);
110110
List<Element> result = paginated.get()
111111
.getResultStream()
112112
.map(o -> (Element) o)
@@ -198,7 +198,7 @@ public List<Element> findRootsByCommit(Commit commit, @Nullable UUID after, @Nul
198198
.filter(data -> (data instanceof Element) && !(data instanceof Relationship))
199199
.map(data -> (Element) data)
200200
.filter(element -> element.getOwner() == null);
201-
Paginated<Stream<Element>> paginatedStream = paginateStream(after, before, maxResults, stream, Element::getIdentifier);
201+
Paginated<Stream<Element>> paginatedStream = paginateStream(after, before, maxResults, stream, Element::getElementId);
202202
List<Element> result = paginatedStream.get()
203203
.map(element -> JpaDataDao.resolve(element, Element.class))
204204
.collect(Collectors.toList());

app/dao/impl/jpa/JpaRelationshipDao.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public Optional<Relationship> findById(UUID id) {
6868
CriteriaQuery<RelationshipImpl> query = builder.createQuery(RelationshipImpl.class);
6969
Root<RelationshipImpl> root = query.from(RelationshipImpl.class);
7070
query.select(root).where(builder.and(
71-
builder.equal(root.get(RelationshipImpl_.identifier), id),
71+
builder.equal(root.get(RelationshipImpl_.elementId), id),
7272
getTypeExpression(builder, root)
7373
));
7474
try {
@@ -98,7 +98,7 @@ public List<Relationship> findAll(@Nullable UUID after, @Nullable UUID before, i
9898
Root<RelationshipImpl> root = query.from(RelationshipImpl.class);
9999
query.select(root);
100100
Expression<Boolean> where = getTypeExpression(builder, root);
101-
Paginated<TypedQuery<RelationshipImpl>> paginated = paginateQuery(after, before, maxResults, query, builder, em, root.get(RelationshipImpl_.identifier), where);
101+
Paginated<TypedQuery<RelationshipImpl>> paginated = paginateQuery(after, before, maxResults, query, builder, em, root.get(RelationshipImpl_.elementId), where);
102102
List<Relationship> result = paginated.get()
103103
.getResultStream()
104104
.map(o -> (Relationship) o)
@@ -146,11 +146,11 @@ public List<Relationship> findAllByCommitRelatedElement(Commit commit, Element r
146146
throw new IllegalArgumentException("Unknown RelationshipDirection provided: " + direction.name());
147147
}
148148
return related
149-
.map(Element::getIdentifier)
150-
.anyMatch(id -> id.equals(relatedElement.getIdentifier()));
149+
.map(Element::getElementId)
150+
.anyMatch(id -> id.equals(relatedElement.getElementId()));
151151
}
152152
);
153-
Paginated<Stream<Relationship>> paginatedStream = paginateStream(after, before, maxResults, stream, Relationship::getIdentifier);
153+
Paginated<Stream<Relationship>> paginatedStream = paginateStream(after, before, maxResults, stream, Relationship::getElementId);
154154
List<Relationship> result = paginatedStream.get()
155155
.map(relationship -> JpaDataDao.resolve(relationship, Relationship.class))
156156
.collect(Collectors.toList());

app/org/omg/sysml/lifecycle/impl/package-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
@MetaValue(value = "OccurrenceDefinition", targetEntity = OccurrenceDefinitionImpl.class),
132132
@MetaValue(value = "OccurrenceUsage", targetEntity = OccurrenceUsageImpl.class),
133133
@MetaValue(value = "OperatorExpression", targetEntity = OperatorExpressionImpl.class),
134+
@MetaValue(value = "OwningMembership", targetEntity = OwningMembershipImpl.class),
134135
@MetaValue(value = "Package", targetEntity = PackageImpl.class),
135136
@MetaValue(value = "ParameterMembership", targetEntity = ParameterMembershipImpl.class),
136137
@MetaValue(value = "PartDefinition", targetEntity = PartDefinitionImpl.class),

app/org/omg/sysml/metamodel/AcceptActionUsage.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/*
22
* SysML v2 REST/HTTP Pilot Implementation
3-
* Copyright (C) 2020 InterCAX LLC
4-
* Copyright (C) 2020 California Institute of Technology ("Caltech")
3+
* Copyright (C) 2020 InterCAX LLC
4+
* Copyright (C) 2020 California Institute of Technology ("Caltech")
5+
* Copyright (C) 2021-2022 Twingineer LLC
56
*
67
* This program is free software: you can redistribute it and/or modify
78
* it under the terms of the GNU Lesser General Public License as published by

app/org/omg/sysml/metamodel/ActionDefinition.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/*
22
* SysML v2 REST/HTTP Pilot Implementation
3-
* Copyright (C) 2020 InterCAX LLC
4-
* Copyright (C) 2020 California Institute of Technology ("Caltech")
3+
* Copyright (C) 2020 InterCAX LLC
4+
* Copyright (C) 2020 California Institute of Technology ("Caltech")
5+
* Copyright (C) 2021-2022 Twingineer LLC
56
*
67
* This program is free software: you can redistribute it and/or modify
78
* it under the terms of the GNU Lesser General Public License as published by

app/org/omg/sysml/metamodel/ActionUsage.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/*
22
* SysML v2 REST/HTTP Pilot Implementation
3-
* Copyright (C) 2020 InterCAX LLC
4-
* Copyright (C) 2020 California Institute of Technology ("Caltech")
3+
* Copyright (C) 2020 InterCAX LLC
4+
* Copyright (C) 2020 California Institute of Technology ("Caltech")
5+
* Copyright (C) 2021-2022 Twingineer LLC
56
*
67
* This program is free software: you can redistribute it and/or modify
78
* it under the terms of the GNU Lesser General Public License as published by

app/org/omg/sysml/metamodel/ActorMembership.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/*
22
* SysML v2 REST/HTTP Pilot Implementation
3-
* Copyright (C) 2020 InterCAX LLC
4-
* Copyright (C) 2020 California Institute of Technology ("Caltech")
3+
* Copyright (C) 2020 InterCAX LLC
4+
* Copyright (C) 2020 California Institute of Technology ("Caltech")
5+
* Copyright (C) 2021-2022 Twingineer LLC
56
*
67
* This program is free software: you can redistribute it and/or modify
78
* it under the terms of the GNU Lesser General Public License as published by

0 commit comments

Comments
 (0)