Skip to content

Commit

Permalink
Merge branch 'release/2022-08'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-gomes committed Sep 9, 2022
2 parents a18de6b + 74567cf commit d1650f7
Show file tree
Hide file tree
Showing 541 changed files with 39,980 additions and 4,131 deletions.
10 changes: 6 additions & 4 deletions app/jackson/JpaIdentityDeserializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,18 @@ public T deserialize(JsonParser p, DeserializationContext ctxt) throws IOExcepti
if (p.currentToken() != JsonToken.START_OBJECT) {
throw new JsonParseException(p, "Expected START_OBJECT. Received " + p.getCurrentName() + ".");
}
T t = null;
JsonToken token;
while ((token = p.nextToken()) != null && token != JsonToken.END_OBJECT) {
if (token == JsonToken.FIELD_NAME && isIdentityField(p.getCurrentName())) {
if (p.nextToken() == null) {
if (t == null && token == JsonToken.FIELD_NAME && isIdentityField(p.getCurrentName())) {
token = p.nextToken();
if (token == null) {
throw new JsonParseException(p, "No value for identity field.");
}
return deserializeFromIdentity(p);
t = deserializeFromIdentity(p);
}
}
return null;
return t;
}

@Override
Expand Down
5 changes: 2 additions & 3 deletions app/jackson/RecordSerialization.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,13 @@ protected boolean isIdentityField(String field) {
}

@Override
@SuppressWarnings("unchecked")
protected R deserializeFromIdentity(JsonParser parser) throws IOException {
UUID id = UUID.fromString(parser.getText());
Record record = getEntityManager().find(getRecordClass(), id);
R record = getEntityManager().find(getRecordClass(), id);
if (record == null) {
throw new IOException(new EntityNotFoundException("Record " + id + " not found."));
}
return (R) record;
return record;
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/org/omg/sysml/lifecycle/impl/DataVersionImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void setIdentity(DataIdentity identity) {

@Transient
@JsonProperty("@type")
public static String getType() {
public String getType() {
return DataVersion.NAME;
}
}
7 changes: 6 additions & 1 deletion app/org/omg/sysml/lifecycle/impl/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
@MetaValue(value = "DecisionNode", targetEntity = DecisionNodeImpl.class),
@MetaValue(value = "Definition", targetEntity = DefinitionImpl.class),
@MetaValue(value = "Dependency", targetEntity = DependencyImpl.class),
@MetaValue(value = "Differencing", targetEntity = DifferencingImpl.class),
@MetaValue(value = "Disjoining", targetEntity = DisjoiningImpl.class),
@MetaValue(value = "Documentation", targetEntity = DocumentationImpl.class),
@MetaValue(value = "Element", targetEntity = ElementImpl.class),
Expand All @@ -90,6 +91,8 @@
@MetaValue(value = "FeatureReferenceExpression", targetEntity = FeatureReferenceExpressionImpl.class),
@MetaValue(value = "FeatureTyping", targetEntity = FeatureTypingImpl.class),
@MetaValue(value = "FeatureValue", targetEntity = FeatureValueImpl.class),
@MetaValue(value = "Featuring", targetEntity = FeaturingImpl.class),
@MetaValue(value = "FlowConnectionDefinition", targetEntity = FlowConnectionDefinitionImpl.class),
@MetaValue(value = "FlowConnectionUsage", targetEntity = FlowConnectionUsageImpl.class),
@MetaValue(value = "ForLoopActionUsage", targetEntity = ForLoopActionUsageImpl.class),
@MetaValue(value = "ForkNode", targetEntity = ForkNodeImpl.class),
Expand All @@ -101,6 +104,7 @@
@MetaValue(value = "Interaction", targetEntity = InteractionImpl.class),
@MetaValue(value = "InterfaceDefinition", targetEntity = InterfaceDefinitionImpl.class),
@MetaValue(value = "InterfaceUsage", targetEntity = InterfaceUsageImpl.class),
@MetaValue(value = "Intersecting", targetEntity = IntersectingImpl.class),
@MetaValue(value = "Invariant", targetEntity = InvariantImpl.class),
@MetaValue(value = "InvocationExpression", targetEntity = InvocationExpressionImpl.class),
@MetaValue(value = "ItemDefinition", targetEntity = ItemDefinitionImpl.class),
Expand Down Expand Up @@ -143,8 +147,8 @@
@MetaValue(value = "PortUsage", targetEntity = PortUsageImpl.class),
@MetaValue(value = "PortioningFeature", targetEntity = PortioningFeatureImpl.class),
@MetaValue(value = "Predicate", targetEntity = PredicateImpl.class),
@MetaValue(value = "PrefixComment", targetEntity = PrefixCommentImpl.class),
@MetaValue(value = "Redefinition", targetEntity = RedefinitionImpl.class),
@MetaValue(value = "ReferenceSubsetting", targetEntity = ReferenceSubsettingImpl.class),
@MetaValue(value = "ReferenceUsage", targetEntity = ReferenceUsageImpl.class),
@MetaValue(value = "Relationship", targetEntity = RelationshipImpl.class),
@MetaValue(value = "RenderingDefinition", targetEntity = RenderingDefinitionImpl.class),
Expand Down Expand Up @@ -180,6 +184,7 @@
@MetaValue(value = "TriggerInvocationExpression", targetEntity = TriggerInvocationExpressionImpl.class),
@MetaValue(value = "Type", targetEntity = TypeImpl.class),
@MetaValue(value = "TypeFeaturing", targetEntity = TypeFeaturingImpl.class),
@MetaValue(value = "Unioning", targetEntity = UnioningImpl.class),
@MetaValue(value = "Usage", targetEntity = UsageImpl.class),
@MetaValue(value = "UseCaseDefinition", targetEntity = UseCaseDefinitionImpl.class),
@MetaValue(value = "UseCaseUsage", targetEntity = UseCaseUsageImpl.class),
Expand Down
2 changes: 1 addition & 1 deletion app/org/omg/sysml/metamodel/BindingConnectorAsUsage.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
import java.util.List;
import java.util.Set;

public interface BindingConnectorAsUsage extends BindingConnector, ConnectorAsUsage, SysMLType {
public interface BindingConnectorAsUsage extends ConnectorAsUsage, BindingConnector, SysMLType {

}
6 changes: 3 additions & 3 deletions app/org/omg/sysml/metamodel/Connector.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
public interface Connector extends Feature, Relationship, SysMLType {
List<? extends Feature> getRelatedFeature();

Collection<? extends Association> getAssociation();
List<? extends Association> getAssociation();

Boolean getIsDirected();

Collection<? extends Feature> getConnectorEnd();
List<? extends Feature> getConnectorEnd();

Feature getSourceFeature();

Collection<? extends Feature> getTargetFeature();
List<? extends Feature> getTargetFeature();
}
2 changes: 1 addition & 1 deletion app/org/omg/sysml/metamodel/ConnectorAsUsage.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
import java.util.List;
import java.util.Set;

public interface ConnectorAsUsage extends Connector, Usage, SysMLType {
public interface ConnectorAsUsage extends Usage, Connector, SysMLType {

}
2 changes: 2 additions & 0 deletions app/org/omg/sysml/metamodel/Definition.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,6 @@ public interface Definition extends Classifier, SysMLType {
List<? extends UseCaseUsage> getOwnedUseCase();

Collection<? extends FlowConnectionUsage> getOwnedFlow();

List<? extends MetadataUsage> getOwnedMetadata();
}
33 changes: 33 additions & 0 deletions app/org/omg/sysml/metamodel/Differencing.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* SysML v2 REST/HTTP Pilot Implementation
* Copyright (C) 2020 InterCAX LLC
* Copyright (C) 2020 California Institute of Technology ("Caltech")
* Copyright (C) 2021-2022 Twingineer LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* @license LGPL-3.0-or-later <http://spdx.org/licenses/LGPL-3.0-or-later>
*/

package org.omg.sysml.metamodel;

import java.util.Collection;
import java.util.List;
import java.util.Set;

public interface Differencing extends Relationship, SysMLType {
Type getTypeDifferenced();

Type getDifferencingType();
}
6 changes: 4 additions & 2 deletions app/org/omg/sysml/metamodel/Element.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ public interface Element extends SysMLType {

String getShortName();

String getEffectiveName();

String getName();

String getEffectiveName();

String getQualifiedName();

Boolean getIsImpliedIncluded();
}
2 changes: 2 additions & 0 deletions app/org/omg/sysml/metamodel/Feature.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,7 @@ public interface Feature extends Type, SysMLType {

FeatureDirectionKind getDirection();

ReferenceSubsetting getOwnedReferenceSubsetting();

Boolean getIsNonunique();
}
2 changes: 1 addition & 1 deletion app/org/omg/sysml/metamodel/FeatureMembership.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.util.List;
import java.util.Set;

public interface FeatureMembership extends OwningMembership, TypeFeaturing, SysMLType {
public interface FeatureMembership extends OwningMembership, Featuring, SysMLType {
Type getOwningType();

Feature getOwnedMemberFeature();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import java.util.List;
import java.util.Set;

public interface PrefixComment extends Comment, SysMLType {
public interface Featuring extends Relationship, SysMLType {
Type getType();

Feature getFeature();
}
31 changes: 31 additions & 0 deletions app/org/omg/sysml/metamodel/FlowConnectionDefinition.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* SysML v2 REST/HTTP Pilot Implementation
* Copyright (C) 2020 InterCAX LLC
* Copyright (C) 2020 California Institute of Technology ("Caltech")
* Copyright (C) 2021-2022 Twingineer LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* @license LGPL-3.0-or-later <http://spdx.org/licenses/LGPL-3.0-or-later>
*/

package org.omg.sysml.metamodel;

import java.util.Collection;
import java.util.List;
import java.util.Set;

public interface FlowConnectionDefinition extends Interaction, ActionDefinition, ConnectionDefinition, SysMLType {

}
4 changes: 2 additions & 2 deletions app/org/omg/sysml/metamodel/FlowConnectionUsage.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
import java.util.List;
import java.util.Set;

public interface FlowConnectionUsage extends ItemFlow, ConnectionUsage, SysMLType {

public interface FlowConnectionUsage extends ActionUsage, ItemFlow, ConnectionUsage, SysMLType {
List<? extends Interaction> getFlowConnectionDefinition();
}
2 changes: 1 addition & 1 deletion app/org/omg/sysml/metamodel/IncludeUseCaseUsage.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
import java.util.List;
import java.util.Set;

public interface IncludeUseCaseUsage extends UseCaseUsage, PerformActionUsage, SysMLType {
public interface IncludeUseCaseUsage extends PerformActionUsage, UseCaseUsage, SysMLType {
UseCaseUsage getUseCaseIncluded();
}
33 changes: 33 additions & 0 deletions app/org/omg/sysml/metamodel/Intersecting.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* SysML v2 REST/HTTP Pilot Implementation
* Copyright (C) 2020 InterCAX LLC
* Copyright (C) 2020 California Institute of Technology ("Caltech")
* Copyright (C) 2021-2022 Twingineer LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* @license LGPL-3.0-or-later <http://spdx.org/licenses/LGPL-3.0-or-later>
*/

package org.omg.sysml.metamodel;

import java.util.Collection;
import java.util.List;
import java.util.Set;

public interface Intersecting extends Relationship, SysMLType {
Type getTypeIntersected();

Type getIntersectingType();
}
8 changes: 5 additions & 3 deletions app/org/omg/sysml/metamodel/ItemFlow.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@
public interface ItemFlow extends Connector, Step, SysMLType {
List<? extends Classifier> getItemType();

List<? extends Feature> getTargetInputFeature();
Feature getTargetInputFeature();

List<? extends Feature> getSourceOutputFeature();
Feature getSourceOutputFeature();

Collection<? extends ItemFlowEnd> getItemFlowEnd();

Collection<? extends ItemFeature> getItemFeature();
ItemFeature getItemFeature();

Collection<? extends ItemFlowFeature> getItemFlowFeature();

List<? extends Interaction> getInteraction();
}
2 changes: 1 addition & 1 deletion app/org/omg/sysml/metamodel/MetadataUsage.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
import java.util.List;
import java.util.Set;

public interface MetadataUsage extends ItemUsage, MetadataFeature, SysMLType {
public interface MetadataUsage extends MetadataFeature, ItemUsage, SysMLType {
Metaclass getMetadataDefinition();
}
33 changes: 33 additions & 0 deletions app/org/omg/sysml/metamodel/ReferenceSubsetting.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* SysML v2 REST/HTTP Pilot Implementation
* Copyright (C) 2020 InterCAX LLC
* Copyright (C) 2020 California Institute of Technology ("Caltech")
* Copyright (C) 2021-2022 Twingineer LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* @license LGPL-3.0-or-later <http://spdx.org/licenses/LGPL-3.0-or-later>
*/

package org.omg.sysml.metamodel;

import java.util.Collection;
import java.util.List;
import java.util.Set;

public interface ReferenceSubsetting extends Subsetting, SysMLType {
Feature getReferencedFeature();

Feature getReferencingFeature();
}
2 changes: 2 additions & 0 deletions app/org/omg/sysml/metamodel/Relationship.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ public interface Relationship extends Element, SysMLType {
Element getOwningRelatedElement();

List<? extends Element> getOwnedRelatedElement();

Boolean getIsImplied();
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
import java.util.List;
import java.util.Set;

public interface SuccessionFlowConnectionUsage extends FlowConnectionUsage, SuccessionItemFlow, SysMLType {
public interface SuccessionFlowConnectionUsage extends SuccessionItemFlow, FlowConnectionUsage, SysMLType {

}
Loading

0 comments on commit d1650f7

Please sign in to comment.