Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sp 1065 #1069

Merged
merged 8 commits into from
Jan 13, 2023
Merged

Sp 1065 #1069

merged 8 commits into from
Jan 13, 2023

Conversation

tenthe
Copy link
Contributor

@tenthe tenthe commented Jan 10, 2023

Purpose

Fixes #1065 by adding e2e tests for the different formats that can be used in the adapters.
Also enabled the live preview feature for all formats.

Remarks

This PR also removes the underscore dependency and replaces it with jackson-dataformat-xml, which was already registered in the pom.
I also had to adjust some of the parser implementations. This PR provides the basis for further refactoring of those parsers.
PR introduces (a) breaking change(s): no

PR introduces (a) deprecation(s): no

@tenthe tenthe added enhancement New feature or request java Pull requests that update Java code ui Anything that affects the UI backend Everything that is related to the StreamPipes backend testing Relates to any kind of test (unit test, integration, or E2E test). labels Jan 10, 2023
@tenthe tenthe added this to the 1.0.0 milestone Jan 10, 2023
}

} else if (geoFeature.getGeometry() instanceof LineString) {
LineString lineString = (LineString) geoFeature.getGeometry();
eventProperties.add(JsonEventProperty.getEventProperty("coorindatesLineString", lineString.getCoordinates()));

sampleValues.put("coorindatesLineString", new GuessTypeInfo("java.lang.Double", lineString.getCoordinates()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a type and should be named coordinates?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, you are right. It seems to be a typo.

} else if (geoFeature.getGeometry() instanceof MultiPoint) {
MultiPoint multiPoint = (MultiPoint) geoFeature.getGeometry();
eventProperties.add(JsonEventProperty.getEventProperty("coorindatesMultiPoint", multiPoint.getCoordinates()));

sampleValues.put("coorindatesMultiPoint", new GuessTypeInfo("java.lang.Double", multiPoint.getCoordinates()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for all types

<exclusion>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
</exclusion>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this exclusion have any impact on the S7 driver?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully not, we have to validate it with a PLC as soon as it is merged. This is included due to some convergence errors

@tenthe
Copy link
Contributor Author

tenthe commented Jan 13, 2023

@dominikriemer I have addressed your comments. I also extracted some common strings into a new class GeoJsonConstants.
We should improve the implementation further, but this should reduce the risk of typos for now.

Copy link
Member

@dominikriemer dominikriemer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tenthe tenthe merged commit bd9a94d into dev Jan 13, 2023
@tenthe tenthe deleted the SP-1065 branch January 13, 2023 10:37
@bossenti bossenti modified the milestones: 1.0.0, 0.91.0 Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Everything that is related to the StreamPipes backend enhancement New feature or request java Pull requests that update Java code testing Relates to any kind of test (unit test, integration, or E2E test). ui Anything that affects the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide e2e tests to validate the different formats of generic adapters
3 participants