Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
998f1ef
Updates the version to 11.2-SNAPSHOT
CesarCoelho Dec 5, 2024
4c7bcaa
Adds the new version and updates the release date
CesarCoelho Dec 5, 2024
cc8d576
Adds notes on the creation of a new branch
CesarCoelho Dec 5, 2024
c18b250
Updates the ProductSummary to ProductMetadata
CesarCoelho Dec 5, 2024
36d184b
Updates to the MPD code
CesarCoelho Dec 5, 2024
1d9e94e
Updates the xsd hybrid file to be closer to the v003
CesarCoelho Dec 10, 2024
bf82846
Updates the xsd hybrid file to be closer to v003
CesarCoelho Dec 10, 2024
4cbd715
Updates the XML files to follow the latest v003 XSD & updates to the …
CesarCoelho Dec 11, 2024
eb2bbdd
Updates the activeMQ version
CesarCoelho Dec 11, 2024
2a9ca39
Updates the xalan version
CesarCoelho Dec 11, 2024
008fe40
Updates the ant project version
CesarCoelho Dec 11, 2024
99ff01c
Small update of if condition
CesarCoelho Dec 12, 2024
de19a41
Improvements to the MPD services
CesarCoelho Dec 12, 2024
68de55e
Renames the UC1 EX1 Test file
CesarCoelho Dec 12, 2024
e7e0f4d
Adds test 5 and test 6
CesarCoelho Dec 12, 2024
0d93c08
Beautification of the test code
CesarCoelho Dec 12, 2024
95fd192
Beautification of the test code
CesarCoelho Dec 12, 2024
417dd36
Adds a simple static method to create a Time object for a certain date
CesarCoelho Dec 12, 2024
114d04a
Adds to UC1 Ex1 the Test Cases 7, 8, and 9
CesarCoelho Dec 12, 2024
b2b6fe9
Adds one more log message
CesarCoelho Dec 12, 2024
aa3eb36
Removes unused import
CesarCoelho Dec 12, 2024
02a41b6
Removes duplication of code
CesarCoelho Dec 13, 2024
bd61bdc
Approximates the hybrid xsd, to the v003
CesarCoelho Dec 13, 2024
4da7ecd
Approximates the hybrid xsd to the v003
CesarCoelho Dec 13, 2024
51fb2b3
Renames the type to token
CesarCoelho Dec 13, 2024
4db8e31
Improves the generation of the docx files
CesarCoelho Dec 13, 2024
4793bf9
Improves the text of the MPD specification
CesarCoelho Dec 13, 2024
aec31af
Updates the code to generate the Type Signature details together with…
CesarCoelho Dec 16, 2024
7480ed1
Improves the MPD specificatio
CesarCoelho Dec 16, 2024
a852fe8
Adds Type Signature Details as bullets
CesarCoelho Dec 16, 2024
6843267
Appends the operation number to be part of the key of the Publisher s…
CesarCoelho Dec 17, 2024
44dafe2
Updates the hour to 12h (middle of the day)
CesarCoelho Dec 18, 2024
96e68fb
Fixes the numbering issue with MO Errors section
CesarCoelho Dec 18, 2024
13a7653
Updates the xml file of the MPD services
CesarCoelho Dec 19, 2024
256e976
Updates the description of the source fields
CesarCoelho Dec 19, 2024
d800c8f
Batch updates to MPD
CesarCoelho Dec 27, 2024
01e7335
Batch updates to MPD (2)
CesarCoelho Dec 27, 2024
a89f783
Changes the ProductType from an MO Object to a MO Composite
CesarCoelho Dec 27, 2024
baf3fbb
Changes the prefix for MO Objects on the book auto-generation
CesarCoelho Dec 27, 2024
0ab7bc3
Reshuffles the Product and ProductType in the xml file
CesarCoelho Dec 27, 2024
1b5ba6d
Changes the orderID from Identifier to Long
CesarCoelho Dec 27, 2024
3f7ce9a
Renames the timeWindow to contentDate
CesarCoelho Dec 27, 2024
86f6df3
Updates the numerical values of the SecondaryErrorCodeEnum
CesarCoelho Dec 27, 2024
0c61ee2
Improves the text of the specification
CesarCoelho Dec 27, 2024
cc8c743
Updates de description of the orderID field
CesarCoelho Dec 30, 2024
28df7d2
Fixes the Bookmarks bug
CesarCoelho Dec 30, 2024
47e0c9b
Removes the use of the word 'parameter' and replaces it with 'attribute'
CesarCoelho Dec 30, 2024
f442552
Fixes the description to match the name of the service
CesarCoelho Dec 30, 2024
59618e4
Removes the use of the word 'parameter' and replaces it with 'attribu…
CesarCoelho Dec 30, 2024
5527d57
Updated the MO Errors of some of the operations
CesarCoelho Dec 31, 2024
13f351a
Small fix - Integer is in MAL not MPD
CesarCoelho Dec 31, 2024
c8409c8
Cleans up the Data structures text of MPD
CesarCoelho Dec 31, 2024
0d94b4d
Updates the text
CesarCoelho Dec 31, 2024
92915f6
General improvements on the requirements
CesarCoelho Dec 31, 2024
79b86b9
The oftware can now render the NOTE correctly in the .docx files
CesarCoelho Jan 2, 2025
59d54ed
Optimizes the code for the NOTEs
CesarCoelho Jan 2, 2025
5dbe46e
Capitalizes the first word of the NOTEs
CesarCoelho Jan 2, 2025
e579e49
Abstracting the MPD Tests
CesarCoelho Jan 2, 2025
4bb2c58
Further abstraction
CesarCoelho Jan 2, 2025
7a0ecd1
Moves commmon code to the abstract class
CesarCoelho Jan 3, 2025
4cc297c
Renames the file from MPSTest to MPDTest
CesarCoelho Jan 3, 2025
9761b01
Starts the UC3_Ex1_Test file
CesarCoelho Jan 3, 2025
a9b9ba6
Batch of code for Test 1 (not completed)
CesarCoelho Jan 3, 2025
4fb6d53
Adds a Listener for when new Products become available
CesarCoelho Jan 3, 2025
b921816
Small MPD code improvements
CesarCoelho Jan 3, 2025
d8f89d2
Small MPD code improvements (2)
CesarCoelho Jan 3, 2025
808a851
Updates the Backend to use the Dataset class
CesarCoelho Jan 6, 2025
aadd963
Updates the yaml file to have the http on jdk11
CesarCoelho Jan 6, 2025
76601ae
Adds the http dependency from Sun
CesarCoelho Jan 6, 2025
9359d70
Restore to http testbed build to Java 8
CesarCoelho Jan 6, 2025
bd35bd9
General Updates for MPD
CesarCoelho Jan 6, 2025
c463aba
Add also the subscription keys fields in the Type Signature Descripti…
CesarCoelho Jan 6, 2025
d0a63af
Improvements on the text and removal of unused Functional Requirement…
CesarCoelho Jan 6, 2025
19edd39
Adds 4 more tests to UC3_Ex1
CesarCoelho Jan 7, 2025
db515c9
Adds 2 more tests to UC3_Ex1 for testing with different users
CesarCoelho Jan 7, 2025
49d5dbd
Adds more tests to UC3_Ex1 for testing with different domains
CesarCoelho Jan 7, 2025
1a0212a
Adds 1 more test to UC3_Ex1 for testing with the correct domains
CesarCoelho Jan 7, 2025
3bcc112
Code cleanup
CesarCoelho Jan 9, 2025
7b6003b
Introduces the SERVICE_JUST_METADATA delivery method option
CesarCoelho Jan 23, 2025
cfa12f5
Updates the Release Notes with the changes done for version 11.2
CesarCoelho Jan 23, 2025
68f3523
Updates the javadocs
CesarCoelho Jan 23, 2025
1f73248
Updates versions to 11.2
CesarCoelho Jan 23, 2025
7a310b6
Updates the actions from v3 to v4
CesarCoelho Jan 23, 2025
f842e77
Updates the report names to include the jdk version being used
CesarCoelho Jan 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
206 changes: 103 additions & 103 deletions .github/workflows/testbeds.yml

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ ESA CCSDS MO services - Release Notes
These Release Notes include a short summary of the updates done for each version.
The different versions and respective updates are the following:

### Version 11.1 (TBD)
### Version 11.2 (2025)
* Fixes the MAL Broker bug that did not allow multiple PUB-SUB operations within the same service
* MPD specification - Updates to include many of the RIDs found during implementation
* Word API Generator: Supports the new "Requirements" section on operations. These are obtained from the XML file of the specs
* Word API Generator: Supports the new "Type Signature" section on operations
* Updated the Hybrid XSD to be closer to the latest version. Also, testbed XML specs had to be updated for compliance to the Hybrid XSD
* Adds more tests to the MPD Testbed

### Version 11.1 (05 December 2024)
* Adds dedicated yaml workflows for testing the MAL with tcpip, http, and zmtp
* Merges the xml-jaxb project into the generator-interfaces project
* Improves the Enumerations auto-generated code
Expand Down
6 changes: 6 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ mvn clean deploy -P release

6. Create a GitHub release in: https://github.com/esa/mo-services-java/releases

7. Create a new branch from master:
```
git checkout master
git pull
git checkout -b vAA.B
```

Extra
-------------
Expand Down
4 changes: 2 additions & 2 deletions api-generator/api-generator-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
<parent>
<groupId>int.esa.ccsds.mo</groupId>
<artifactId>parent</artifactId>
<version>11.1</version>
<version>11.2</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>

<artifactId>api-generator-maven-plugin</artifactId>
<version>11.1</version>
<version>11.2</version>
<packaging>maven-plugin</packaging>

<name>ESA MO API Generator - Maven Plugin</name>
Expand Down
4 changes: 2 additions & 2 deletions api-generator/generator-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
<parent>
<groupId>int.esa.ccsds.mo</groupId>
<artifactId>parent</artifactId>
<version>11.1</version>
<version>11.2</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>

<artifactId>generator-docs</artifactId>
<version>11.1</version>
<version>11.2</version>
<packaging>jar</packaging>

<name>ESA MO API Generator - Documentation</name>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void startTable(int[] widths) throws IOException {
}

public void startTable(int[] widths, String caption) throws IOException {
if (null != caption) {
if (caption != null) {
buffer.append(makeLine(2, "<w:p>"));
buffer.append(makeLine(3, "<w:pPr><w:pStyle w:val=\"TableTitle\"/></w:pPr><w:r><w:t xml:space=\"preserve\">Table </w:t></w:r>"));
buffer.append(makeLine(3, "<w:bookmarkStart w:id=\"0\" w:name=\"T_" + caption + "\"/>"));
Expand All @@ -85,8 +85,8 @@ public void startTable(int[] widths, String caption) throws IOException {
buffer.append(makeLine(3, "<w:bookmarkEnd w:id=\"1\"/><w:r><w:instrText>\"</w:instrText></w:r><w:r><w:fldChar w:fldCharType=\"end\"/></w:r>"));
buffer.append(makeLine(3, "<w:r><w:t>: " + caption + "</w:t></w:r>"));
buffer.append(makeLine(2, "</w:p>"));

}

buffer.append(makeLine(2, "<w:tbl>"));
buffer.append(makeLine(3, "<w:tblPr>"));
buffer.append(makeLine(4, "<w:tblW w:w=\"00\" w:type=\"auto\"/>"));
Expand All @@ -100,7 +100,7 @@ public void startTable(int[] widths, String caption) throws IOException {
buffer.append(makeLine(4, "</w:tblBorders>"));
buffer.append(makeLine(3, "</w:tblPr>"));

if (null != widths) {
if (widths != null) {
buffer.append(makeLine(3, "<w:tblGrid>"));
for (int i : widths) {
buffer.append(makeLine(4, "<w:gridCol w:w=\"" + i + "\"/>"));
Expand Down Expand Up @@ -273,7 +273,8 @@ public void addTitle(int level, String name) throws IOException {
public void addTitle(int level, String section, String name, String bookmarkSection, boolean bookmark) throws IOException {
buffer.append(makeLine(2, "<w:p><w:pPr><w:pStyle w:val=\"Heading" + level + "\"/></w:pPr>"));
if (bookmark) {
buffer.append(makeLine(3, "<w:bookmarkStart w:id=\"1\" w:name=\"_" + bookmarkSection + "_" + name + "\"/><w:bookmarkEnd w:id=\"1\"/>"));
String linkTo = bookmarkSection + "_" + name;
buffer.append(makeLine(3, "<w:bookmarkStart w:id=\"1\" w:name=\"_" + linkTo + "\"/><w:bookmarkEnd w:id=\"1\"/>"));
}
buffer.append(makeLine(3, "<w:r><w:t>" + section + name + "</w:t></w:r>"));
buffer.append(makeLine(2, "</w:p>"));
Expand All @@ -287,28 +288,19 @@ public void addNumberedComment(List<String> strings) throws IOException {
}

addNumberedComment(instance, 0, strings.iterator());
/*
if (strings.size() == 1) {
addComment(strings.get(0));
} else {
int instance = 0;
if (null != this.numberWriter) {
instance = this.numberWriter.getNextNumberingInstance();
}

addNumberedComment(instance, 0, strings.iterator());
}
*/
}
}

public void addNumberedComment(int instance, int level, Iterator<String> iterator) throws IOException {
while (iterator.hasNext()) {
String text = iterator.next();
public void addNumberedComment(int instance, int level, Iterator<String> lines) throws IOException {
while (lines.hasNext()) {
String text = lines.next();

if (text != null) {
if (text.trim().isEmpty()) { // Jump over empty lines
continue;
}
if ("<ol>".equalsIgnoreCase(text)) {
addNumberedComment(instance, level + 1, iterator);
addNumberedComment(instance, level + 1, lines);
} else if ("</ol>".equalsIgnoreCase(text)) {
return;
} else {
Expand Down Expand Up @@ -342,7 +334,7 @@ public void addComment(String text) throws IOException {
}

for (String str : strings) {
if (null != str) {
if (str != null) {
buffer.append(makeLine(2, str));
}
}
Expand All @@ -369,7 +361,15 @@ private void addNumberedComment(int instance, int level, String text) throws IOE
addNumberedComment(instance, level, str);
}
} else {
// Case when strings.size() == 1
String str = strings.get(0);

// Exceptional case when it has a "Note:"
if (text.toLowerCase().contains("note:")) {
addNote(text);
return;
}

if (str != null && str.length() > 0) {
buffer.append(makeLine(2, "<w:p><w:pPr><w:numPr><w:ilvl w:val=\""
+ level + "\"/><w:numId w:val=\"" + instance + "\"/></w:numPr></w:pPr><w:r><w:t>"
Expand All @@ -379,6 +379,30 @@ private void addNumberedComment(int instance, int level, String text) throws IOE
}
}

public void addSingleTypeSignature(String fieldName, String fieldComment) throws IOException {
int instance = 1;
int level = 0;

buffer.append(makeLine(2, "<w:p><w:pPr><w:numPr><w:ilvl w:val=\""
+ level + "\"/><w:numId w:val=\"" + instance + "\"/></w:numPr></w:pPr>"
+ "<w:r><w:rPr><w:b/><w:bCs/></w:rPr><w:t>" + escape(fieldName)
+ "</w:t></w:r><w:r><w:t xml:space=\"preserve\">"
+ " - " + escape(fieldComment) + "</w:t></w:r></w:p>"));
}

public void addNote(String noteText) throws IOException {
// Fix the text by removing the "Note: " and "NOTE: " strings
noteText = noteText.replace("Note: ", "");
noteText = noteText.replace("NOTE: ", "");

buffer.append(makeLine(2, "<w:p w14:paraId=\"7F00DCB7\" w14:textId=\"77777777\" w:rsidR=\"00B06274\" w:rsidRPr=\"00B06274\" w:rsidRDefault=\"00B06274\" w:rsidP=\"00B06274\">"));
buffer.append(makeLine(3, "<w:pPr><w:keepLines/><w:tabs><w:tab w:val=\"left\" w:pos=\"806\"/></w:tabs><w:spacing w:before=\"240\" w:after=\"0\" w:line=\"280\" w:lineRule=\"atLeast\"/><w:ind w:left=\"1138\" w:hanging=\"1138\"/><w:jc w:val=\"both\"/><w:rPr><w:kern w:val=\"0\"/><w:sz w:val=\"24\"/><w:szCs w:val=\"20\"/><w14:ligatures w14:val=\"none\"/></w:rPr></w:pPr>"));
buffer.append(makeLine(3, "<w:r w:rsidRPr=\"00B06274\"><w:t>NOTE</w:t></w:r>"));
buffer.append(makeLine(3, "<w:r w:rsidRPr=\"00B06274\"><w:tab/><w:t>–</w:t></w:r>"));
buffer.append(makeLine(3, "<w:r w:rsidRPr=\"00B06274\"><w:tab/><w:t>" + noteText + "</w:t></w:r>"));
buffer.append(makeLine(2, "</w:p>"));
}

private String createTypeHyperLink(boolean includeMessageFieldNames, boolean oldStyle,
AreaType area, ServiceType service, TypeRef ref) throws IOException {
String prefix = "";
Expand Down Expand Up @@ -440,7 +464,6 @@ public String createHyperLink(String prefix, String typeName, String postfix,

String temp = linkTo.replace("ObjectRef<", "").replace(">", "");
String objectRefRemoved = temp.replace("ObjectRef(", "").replace(")", "");

buf.append("</w:t></w:r>");

if (withHyperlink) {
Expand Down
10 changes: 5 additions & 5 deletions api-generator/generator-interfaces/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
<parent>
<groupId>int.esa.ccsds.mo</groupId>
<artifactId>parent</artifactId>
<version>11.1</version>
<version>11.2</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>

<artifactId>generator-interfaces</artifactId>
<version>11.1</version>
<version>11.2</version>
<packaging>jar</packaging>

<name>ESA MO API Generator - Interfaces</name>
Expand Down Expand Up @@ -65,12 +65,12 @@
<dependency>
<groupId>int.esa.ccsds.mo</groupId>
<artifactId>xml-ccsds-mo-prototypes</artifactId>
<version>11.1</version>
<version>11.2</version>
</dependency>
<dependency>
<groupId>int.esa.ccsds.mo</groupId>
<artifactId>xml-ccsds-mo-standards</artifactId>
<version>11.1</version>
<version>11.2</version>
</dependency>
<!-- The dependencies below are needed for Java 9 and higher -->
<dependency>
Expand Down Expand Up @@ -142,7 +142,7 @@
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.1</version>
<version>2.7.2</version>
</dependency>
</dependencies>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ private OperationSummary extractOperationSummary(OperationType op, int capNum) {
SendOperationType lop = (SendOperationType) op;
return new OperationSummary(InteractionPatternEnum.SEND_OP, op, capNum,
TypeUtils.convertTypeReferences(this,
TypeUtils.getTypeListViaXSDAny(lop.getMessages().getSend().getAny())),
TypeUtils.getTypeListViaField(lop.getMessages().getSend().getField())),
lop.getMessages().getSend().getComment(),
null, "",
null, "",
Expand All @@ -622,7 +622,7 @@ private OperationSummary extractOperationSummary(OperationType op, int capNum) {
SubmitOperationType lop = (SubmitOperationType) op;
return new OperationSummary(InteractionPatternEnum.SUBMIT_OP, op, capNum,
TypeUtils.convertTypeReferences(this,
TypeUtils.getTypeListViaXSDAny(lop.getMessages().getSubmit().getAny())),
TypeUtils.getTypeListViaField(lop.getMessages().getSubmit().getField())),
lop.getMessages().getSubmit().getComment(),
null, "",
null, "",
Expand All @@ -631,48 +631,48 @@ private OperationSummary extractOperationSummary(OperationType op, int capNum) {
RequestOperationType lop = (RequestOperationType) op;
return new OperationSummary(InteractionPatternEnum.REQUEST_OP, op, capNum,
TypeUtils.convertTypeReferences(this,
TypeUtils.getTypeListViaXSDAny(lop.getMessages().getRequest().getAny())),
TypeUtils.getTypeListViaField(lop.getMessages().getRequest().getField())),
lop.getMessages().getRequest().getComment(),
null, "",
null, "",
TypeUtils.convertTypeReferences(this,
TypeUtils.getTypeListViaXSDAny(lop.getMessages().getResponse().getAny())),
TypeUtils.getTypeListViaField(lop.getMessages().getResponse().getField())),
lop.getMessages().getResponse().getComment());
} else if (op instanceof InvokeOperationType) {
InvokeOperationType lop = (InvokeOperationType) op;
return new OperationSummary(InteractionPatternEnum.INVOKE_OP, op, capNum,
TypeUtils.convertTypeReferences(this,
TypeUtils.getTypeListViaXSDAny(lop.getMessages().getInvoke().getAny())),
TypeUtils.getTypeListViaField(lop.getMessages().getInvoke().getField())),
lop.getMessages().getInvoke().getComment(),
TypeUtils.convertTypeReferences(this,
TypeUtils.getTypeListViaXSDAny(lop.getMessages().getAcknowledgement().getAny())),
TypeUtils.getTypeListViaField(lop.getMessages().getAcknowledgement().getField())),
lop.getMessages().getAcknowledgement().getComment(),
null, "",
TypeUtils.convertTypeReferences(this,
TypeUtils.getTypeListViaXSDAny(lop.getMessages().getResponse().getAny())),
TypeUtils.getTypeListViaField(lop.getMessages().getResponse().getField())),
lop.getMessages().getResponse().getComment());
} else if (op instanceof ProgressOperationType) {
ProgressOperationType lop = (ProgressOperationType) op;
return new OperationSummary(InteractionPatternEnum.PROGRESS_OP, op, capNum,
TypeUtils.convertTypeReferences(this,
TypeUtils.getTypeListViaXSDAny(lop.getMessages().getProgress().getAny())),
TypeUtils.getTypeListViaField(lop.getMessages().getProgress().getField())),
lop.getMessages().getProgress().getComment(),
TypeUtils.convertTypeReferences(this,
TypeUtils.getTypeListViaXSDAny(lop.getMessages().getAcknowledgement().getAny())),
TypeUtils.getTypeListViaField(lop.getMessages().getAcknowledgement().getField())),
lop.getMessages().getAcknowledgement().getComment(),
TypeUtils.convertTypeReferences(this,
TypeUtils.getTypeListViaXSDAny(lop.getMessages().getUpdate().getAny())),
TypeUtils.getTypeListViaField(lop.getMessages().getUpdate().getField())),
lop.getMessages().getUpdate().getComment(),
TypeUtils.convertTypeReferences(this,
TypeUtils.getTypeListViaXSDAny(lop.getMessages().getResponse().getAny())),
TypeUtils.getTypeListViaField(lop.getMessages().getResponse().getField())),
lop.getMessages().getResponse().getComment());
} else if (op instanceof PubSubOperationType) {
PubSubOperationType lop = (PubSubOperationType) op;
AnyTypeReference subs = lop.getMessages().getSubscriptionKeys();
MessageBodyType subs = lop.getMessages().getSubscriptionKeys();
List<FieldInfo> subKeysList = (subs == null) ? null
: TypeUtils.convertTypeReferences(this, TypeUtils.getTypeListViaXSDAny(subs.getAny()));
: TypeUtils.convertTypeReferences(this, TypeUtils.getTypeListViaField(subs.getField()));
List<FieldInfo> riList = TypeUtils.convertTypeReferences(this,
TypeUtils.getTypeListViaXSDAny(lop.getMessages().getPublishNotify().getAny()));
TypeUtils.getTypeListViaField(lop.getMessages().getPublishNotify().getField()));

return new OperationSummary(InteractionPatternEnum.PUBSUB_OP, op, capNum,
subKeysList, "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
package esa.mo.tools.stubgen.specification;

import esa.mo.xsd.AnyTypeReference;
import esa.mo.xsd.MessageBodyType;
import esa.mo.xsd.OperationType;
import esa.mo.xsd.PubSubOperationType;
import java.util.List;
Expand Down Expand Up @@ -220,7 +220,7 @@ public String getRetComment() {
return retComment;
}

public AnyTypeReference getSubscriptionKeys() {
public MessageBodyType getSubscriptionKeys() {
PubSubOperationType lop = (PubSubOperationType) originalOp;
return lop.getMessages().getSubscriptionKeys();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,23 @@ public static String getTypeShortForm(TypeInformation tiSource,
return tiSource.convertToNamespace(targetType + ".SHORT_FORM");
}

public static List<TypeRef> getTypeListViaField(List<NamedElementReferenceWithCommentType> any) {
if (any == null) {
return null;
}

if (any instanceof List) {
ArrayList<TypeRef> list = new ArrayList<>(any.size());
for (NamedElementReferenceWithCommentType e : any) {
list.add(getTypeFromValue(e));
}
return list;
} else {
throw new IllegalArgumentException(
"Unexpected type in message body of : " + any.getClass().getSimpleName());
}
}

/**
* Converts an XML any field into a list of types.
*
Expand All @@ -250,6 +267,25 @@ public static List<TypeRef> getTypeListViaXSDAny(Object any) {
}
}

/**
* Converts an NamedElementReferenceWithCommentType field into a type reference.
*
* @param any the XML any field.
* @return the converted type.
*/
public static TypeRef getTypeFromValue(NamedElementReferenceWithCommentType any) {
if (any == null) {
return null;
}

if (any instanceof NamedElementReferenceWithCommentType) {
return new TypeRef((NamedElementReferenceWithCommentType) any);
} else {
throw new IllegalArgumentException(
"Unexpected type in message body of : " + any.getClass().getSimpleName());
}
}

/**
* Converts an XML any field into a type reference.
*
Expand Down
Loading
Loading