Skip to content

Commit 3a88f10

Browse files
authored
Merge pull request #66 from open-simulation-platform/release/0.11.0
release/0.11.0
2 parents 6c5a5d2 + 13ee73b commit 3a88f10

409 files changed

Lines changed: 14384 additions & 2254 deletions

File tree

Some content is hidden

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

CONTRIBUTING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Contributor guidelines
2+
======================
3+
4+
This document contains a set of rules and guidelines for everyone who wishes
5+
to contribute to the contents of this repository, hereafter referred to as
6+
"the software".
7+
8+
9+
General
10+
-------
11+
All contributors implicitly agree to license their contribution under the same
12+
terms as the rest of the software, and accept that those terms may change in the
13+
future. See the `LICENCE.txt` file for details.
14+
15+
All contributions to the software, in the form of changes, removals or
16+
additions to source code and other files under source control, shall be made
17+
via pull requests. A pull request must always be reviewed and merged by someone
18+
other than its author.
19+
20+
Before a pull request can be approved and merged into the code base, the author
21+
must sign the "OSP Contributor License Agreement". This agreement is pending, but
22+
will be included in this repository with guidelines once concluded.
23+
24+
25+
Workflow
26+
--------
27+
This repository uses the [gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow)
28+
workflow
29+
30+
31+
Creating new releases
32+
---------------------
33+
Create new releases by running the `release.sh` script. It will prompt you for the version number to release, and the
34+
bump version. Typically, the bump increases the `minor` version by 1 and adds `-SNAPSHOT` at the end. The script will
35+
then create a release branch with the given version number, and a new commit on the develop branch with the bump
36+
version. The script updates all version numbers in the `pom.xml` files.
37+
38+
When ready to release:
39+
40+
- Merge the release branch into the master branch _and_ the develop branch
41+
- Run `mvn clean package` on the master branch
42+
- Upload binaries to new github release with the same name as the version number

LICENSE

Lines changed: 375 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
1-
# Description
2-
This is a java project consisting of a java library and a command line interface tool to validate FMUs and simulation
3-
configurations against the [open simulation platform](https://www.opensimulationplatform.com) specification.
4-
5-
# Prerequisites
6-
### Windows
7-
java: https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_windows_hotspot_8u222b10.msi
1+
Description
2+
===========
3+
Supports version 1.0 of [OSP-IS](https://www.opensimulationplatform.com/assets/osp-is.pdf)
4+
5+
This is a java project consisting of a java library, and a command line interface tool to validate FMUs and simulation
6+
configurations against OSP-IS.
7+
8+
IMPORTRANT
9+
----------
10+
This `osp-validator` version only works with `OspSystemStructure.xml` files based on
11+
[this](https://opensimulationplatform.com/xsd/OspSystemStructure-0.1.xsd) xsd
12+
13+
Prerequisites
14+
=============
15+
Windows
16+
-------
17+
[java](https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_windows_hotspot_8u222b10.msi)
818
\
9-
maven: http://apache.uib.no/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip
19+
[maven](http://apache.uib.no/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip)
1020

11-
### Linux
12-
java: https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u222b10.tar.gz
21+
Linux
22+
-----
23+
[java](https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u222b10.tar.gz)
1324
\
14-
maven: http://apache.uib.no/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz
25+
[maven](http://apache.uib.no/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz)
1526

16-
# Modules
27+
Modules
28+
=======
1729
[osp-validator-api](/osp-validator-api/README.md)
1830

1931
[osp-validator-core](/osp-validator-core/README.md)
@@ -26,10 +38,11 @@ maven: http://apache.uib.no/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.
2638

2739
[osp-validator-gen](/osp-validator-gen/README.md)
2840

29-
# Build
41+
Build
42+
=====
3043
```
31-
$ git clone git@github.com:open-simulation-platform/msmi-validator.git
32-
$ cd msmi-validator
44+
$ git clone git@github.com:open-simulation-platform/osp-validator.git
45+
$ cd osp-validator
3346
$ mvn clean package
3447
```
3548

TODO.md

Whitespace-only changes.

osp-model-description/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Description
2-
1+
Description
2+
===========
33
Implements parsers and converters to generate `osp-validator-core` data model from `OspModelDescription.xml`

osp-model-description/pom.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ This Source Code Form is subject to the terms of the Mozilla Public
4+
~ License, v. 2.0. If a copy of the MPL was not distributed with this
5+
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
6+
-->
7+
28
<project xmlns="http://maven.apache.org/POM/4.0.0"
39
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
410
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
511
<parent>
6-
<artifactId>msmi-validator</artifactId>
12+
<artifactId>osp-validator</artifactId>
713
<groupId>com.opensimulationplatform</groupId>
8-
<version>0.10.0</version>
14+
<version>0.11.0</version>
915
</parent>
1016
<modelVersion>4.0.0</modelVersion>
1117

osp-model-description/src/main/java/com/opensimulationplatform/modeldescription/util/FmiModelDescription.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* This Source Code Form is subject to the terms of the Mozilla Public
3+
* License, v. 2.0. If a copy of the MPL was not distributed with this
4+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
5+
*/
6+
17
package com.opensimulationplatform.modeldescription.util;
28

39
import com.opensimulationplatform.core.model.modeldescription.Unit;

osp-model-description/src/main/java/com/opensimulationplatform/modeldescription/util/FmuHelper_Fmi1.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* This Source Code Form is subject to the terms of the Mozilla Public
3+
* License, v. 2.0. If a copy of the MPL was not distributed with this
4+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
5+
*/
6+
17
package com.opensimulationplatform.modeldescription.util;
28

39
import no.ntnu.ihb.fmi4j.modeldescription.ModelDescriptionParser;

osp-model-description/src/main/java/com/opensimulationplatform/modeldescription/util/FmuHelper_Fmi2.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* This Source Code Form is subject to the terms of the Mozilla Public
3+
* License, v. 2.0. If a copy of the MPL was not distributed with this
4+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
5+
*/
6+
17
package com.opensimulationplatform.modeldescription.util;
28

39
import no.ntnu.ihb.fmi4j.modeldescription.ModelDescriptionParser;

osp-model-description/src/main/java/com/opensimulationplatform/modeldescription/xml/converter/Converter.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
/*
2+
* This Source Code Form is subject to the terms of the Mozilla Public
3+
* License, v. 2.0. If a copy of the MPL was not distributed with this
4+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
5+
*/
6+
17
package com.opensimulationplatform.modeldescription.xml.converter;
28

39
import java.util.List;
10+
import java.util.stream.Collectors;
411

512
public abstract class Converter<FROM, TO> {
613
protected final ConverterContext context;
@@ -15,5 +22,7 @@ public Converter() {
1522

1623
public abstract TO convert(FROM object);
1724

18-
public abstract List<TO> convert(List<FROM> object);
25+
public List<TO> convert(List<FROM> object) {
26+
return object.stream().map(this::convert).collect(Collectors.toList());
27+
}
1928
}

0 commit comments

Comments
 (0)