Skip to content

Commit e827d1f

Browse files
committed
Adapt esmf-aspect-meta-model-resolver to SAMM 2.1.0
1 parent 49fac1b commit e827d1f

File tree

2 files changed

+48
-8
lines changed
  • core/esmf-aspect-meta-model-resolver

2 files changed

+48
-8
lines changed

core/esmf-aspect-meta-model-resolver/pom.xml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
<properties>
3232
<samm-revision>
33-
https://raw.githubusercontent.com/eclipse-esmf/esmf-semantic-aspect-meta-model/bf9196547384bf072095cc8300d45ca7117a3211/esmf-semantic-aspect-meta-model
33+
https://raw.githubusercontent.com/eclipse-esmf/esmf-semantic-aspect-meta-model/179f97e7f12e3f05d5daa1211ff414d07d3b2f9e/esmf-semantic-aspect-meta-model
3434
</samm-revision>
3535
</properties>
3636

@@ -185,6 +185,23 @@
185185
<skipCache>true</skipCache>
186186
</configuration>
187187
</execution>
188+
<execution>
189+
<id>download-meta-model-shapes-2-1-0</id>
190+
<phase>process-resources</phase>
191+
<goals>
192+
<goal>wget</goal>
193+
</goals>
194+
<configuration>
195+
<url>
196+
${samm-revision}/src/main/resources/samm/meta-model/2.1.0/aspect-meta-model-shapes.ttl
197+
</url>
198+
<outputFileName>aspect-meta-model-shapes.ttl</outputFileName>
199+
<outputDirectory>${project.build.directory}/classes/samm/meta-model/2.1.0</outputDirectory>
200+
<overwrite>true</overwrite>
201+
<followRedirects>true</followRedirects>
202+
<skipCache>true</skipCache>
203+
</configuration>
204+
</execution>
188205
<execution>
189206
<id>download-characteristics-shapes-1-0-0</id>
190207
<phase>process-resources</phase>
@@ -219,6 +236,23 @@
219236
<skipCache>true</skipCache>
220237
</configuration>
221238
</execution>
239+
<execution>
240+
<id>download-characteristics-shapes-2-1-0</id>
241+
<phase>process-resources</phase>
242+
<goals>
243+
<goal>wget</goal>
244+
</goals>
245+
<configuration>
246+
<url>
247+
${samm-revision}/src/main/resources/samm/characteristic/2.1.0/characteristic-shapes.ttl
248+
</url>
249+
<outputFileName>characteristic-shapes.ttl</outputFileName>
250+
<outputDirectory>${project.build.directory}/classes/samm/characteristic/2.1.0</outputDirectory>
251+
<overwrite>true</overwrite>
252+
<followRedirects>true</followRedirects>
253+
<skipCache>true</skipCache>
254+
</configuration>
255+
</execution>
222256
</executions>
223257
</plugin>
224258

core/esmf-aspect-meta-model-resolver/src/test/java/org/eclipse/esmf/aspectmodel/resolver/services/DataTypeTest.java

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.junit.jupiter.params.provider.MethodSource;
3232

3333
import org.eclipse.esmf.metamodel.datatypes.Curie;
34+
3435
import lombok.Value;
3536

3637
public class DataTypeTest {
@@ -84,6 +85,11 @@ public <T> void testConfigurableParserChecks( final TestConfiguration<T> testCon
8485
private static class TestConfiguration<T> {
8586
TypedRdfDatatype<T> type;
8687
Map<String, Predicate<T>> predicates;
88+
89+
@Override
90+
public String toString() {
91+
return type.toString();
92+
}
8793
}
8894

8995
static Stream<TestConfiguration<?>> getTestConfigurationsWithLexicalErrors() {
@@ -312,13 +318,13 @@ static Stream<TestConfiguration<?>> getValidTestConfigurations() {
312318

313319
final Stream<TestConfiguration<Curie>> curieTypes =
314320
DataType.getAllSupportedTypes().stream()
315-
.filter( dataType -> dataType.getJavaClass() != null
316-
&& dataType.getJavaClass().equals( Curie.class ) )
317-
.map( dataType -> (TypedRdfDatatype<Curie>) dataType )
318-
.map( curieType -> new TestConfiguration<>( curieType, Map.of(
319-
"xsd:string", v -> ((Curie) v).getValue().equals( "xsd:string" ),
320-
"unit:hectopascal", v -> ((Curie) v).getValue().equals( "unit:hectopascal" )
321-
) ) );
321+
.filter( dataType -> dataType.getJavaClass() != null
322+
&& dataType.getJavaClass().equals( Curie.class ) )
323+
.map( dataType -> (TypedRdfDatatype<Curie>) dataType )
324+
.map( curieType -> new TestConfiguration<>( curieType, Map.of(
325+
"xsd:string", v -> ((Curie) v).getValue().equals( "xsd:string" ),
326+
"unit:hectopascal", v -> ((Curie) v).getValue().equals( "unit:hectopascal" )
327+
) ) );
322328

323329
return Stream.concat( extendedXsdTypes, curieTypes );
324330
}

0 commit comments

Comments
 (0)