Skip to content

Commit dcfc4e2

Browse files
authored
Merge pull request #345 from bci-oss/344-use-esmf-parent
Use ESMF Maven parent
2 parents fbd6d7b + d24e48a commit dcfc4e2

File tree

10 files changed

+99
-619
lines changed

10 files changed

+99
-619
lines changed

core/esmf-aspect-meta-model-resolver/src/main/java/org/eclipse/esmf/aspectmodel/resolver/services/ExtendedXsdDataType.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import java.util.function.Function;
2222
import java.util.function.Predicate;
2323

24-
import javax.xml.bind.DatatypeConverter;
2524
import javax.xml.datatype.DatatypeFactory;
2625
import javax.xml.datatype.Duration;
2726
import javax.xml.datatype.XMLGregorianCalendar;
@@ -33,6 +32,8 @@
3332
import org.apache.jena.ext.xerces.impl.dv.xs.ExtendedSchemaDVFactoryImpl;
3433
import org.apache.jena.rdf.model.Resource;
3534

35+
import jakarta.xml.bind.DatatypeConverter;
36+
3637
@SuppressWarnings( "squid:S1213" )
3738
// the order of the variables is required because of the way they reference each other
3839
public class ExtendedXsdDataType<T> extends XSDDatatype implements TypedRdfDatatype<T> {

core/esmf-aspect-model-document-generators/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@
154154
<artifactId>logback-classic</artifactId>
155155
<scope>test</scope>
156156
</dependency>
157+
<dependency>
158+
<groupId>ch.qos.logback</groupId>
159+
<artifactId>logback-core</artifactId>
160+
<scope>test</scope>
161+
</dependency>
157162
</dependencies>
158163

159164
<build>

core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/openapi/OpenApiTest.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313

1414
package org.eclipse.esmf.aspectmodel.generator.openapi;
1515

16-
import static org.assertj.core.api.Assertions.*;
16+
import static org.assertj.core.api.Assertions.assertThat;
17+
import static org.assertj.core.api.Assertions.fail;
1718

1819
import java.io.IOException;
1920
import java.io.InputStream;
@@ -26,6 +27,12 @@
2627

2728
import org.apache.commons.io.IOUtils;
2829
import org.eclipse.esmf.aspectmodel.resolver.services.VersionedModel;
30+
import org.eclipse.esmf.metamodel.Aspect;
31+
import org.eclipse.esmf.metamodel.loader.AspectModelLoader;
32+
import org.eclipse.esmf.samm.KnownVersion;
33+
import org.eclipse.esmf.test.MetaModelVersions;
34+
import org.eclipse.esmf.test.TestAspect;
35+
import org.eclipse.esmf.test.TestResources;
2936
import org.junit.jupiter.params.ParameterizedTest;
3037
import org.junit.jupiter.params.provider.EnumSource;
3138
import org.junit.jupiter.params.provider.MethodSource;
@@ -48,12 +55,6 @@
4855
import ch.qos.logback.classic.Logger;
4956
import ch.qos.logback.classic.spi.ILoggingEvent;
5057
import ch.qos.logback.core.read.ListAppender;
51-
import org.eclipse.esmf.samm.KnownVersion;
52-
import org.eclipse.esmf.metamodel.Aspect;
53-
import org.eclipse.esmf.metamodel.loader.AspectModelLoader;
54-
import org.eclipse.esmf.test.MetaModelVersions;
55-
import org.eclipse.esmf.test.TestAspect;
56-
import org.eclipse.esmf.test.TestResources;
5758
import io.swagger.parser.OpenAPIParser;
5859
import io.swagger.v3.oas.models.OpenAPI;
5960
import io.swagger.v3.oas.models.Operation;

core/esmf-aspect-model-java-generator/src/test-shared/java/org/eclipse/esmf/test/shared/arbitraries/XsdArbitraries.java

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
import java.time.YearMonth;
1919
import java.util.stream.Stream;
2020

21-
import javax.xml.bind.DatatypeConverter;
2221
import javax.xml.datatype.DatatypeConstants;
2322
import javax.xml.datatype.DatatypeFactory;
2423
import javax.xml.datatype.Duration;
2524
import javax.xml.datatype.XMLGregorianCalendar;
2625

26+
import jakarta.xml.bind.DatatypeConverter;
2727
import net.jqwik.api.Arbitraries;
2828
import net.jqwik.api.Arbitrary;
2929
import net.jqwik.api.Combinators;
@@ -70,13 +70,13 @@ default Arbitrary<BigInteger> anyNonNegativeInteger() {
7070
@Provide
7171
default Arbitrary<String> anyHexBinary() {
7272
return Arbitraries.strings().ofMinLength( 1 )
73-
.map( string -> DatatypeConverter.printHexBinary( string.getBytes() ) );
73+
.map( string -> DatatypeConverter.printHexBinary( string.getBytes() ) );
7474
}
7575

7676
@Provide
7777
default Arbitrary<String> anyBase64Binary() {
7878
return Arbitraries.strings().ofMinLength( 1 )
79-
.map( string -> DatatypeConverter.printBase64Binary( string.getBytes() ) );
79+
.map( string -> DatatypeConverter.printBase64Binary( string.getBytes() ) );
8080
}
8181

8282
@Provide
@@ -135,15 +135,15 @@ default Arbitrary<Tuple.Tuple3<Integer, Integer, Integer>> anyYearMonthDay() {
135135
@Provide
136136
default Arbitrary<XMLGregorianCalendar> anyDate() {
137137
return Combinators.combine( anyYearMonthDay(), anyTimezone() )
138-
.as( ( yearMonthDay, timezone ) ->
139-
getDatatypeFactory().newXMLGregorianCalendarDate(
140-
yearMonthDay.get1(), yearMonthDay.get2(), yearMonthDay.get3(), timezone ) );
138+
.as( ( yearMonthDay, timezone ) ->
139+
getDatatypeFactory().newXMLGregorianCalendarDate(
140+
yearMonthDay.get1(), yearMonthDay.get2(), yearMonthDay.get3(), timezone ) );
141141
}
142142

143143
@Provide
144144
default Arbitrary<XMLGregorianCalendar> anyTime() {
145145
return Combinators.combine( anyHour(), anyMinute(), anySecond(), anyTimezone() )
146-
.as( getDatatypeFactory()::newXMLGregorianCalendarTime );
146+
.as( getDatatypeFactory()::newXMLGregorianCalendarTime );
147147
}
148148

149149
@Provide
@@ -163,50 +163,50 @@ default Arbitrary<XMLGregorianCalendar> anyDateTimeStamp() {
163163
@Provide
164164
default Arbitrary<XMLGregorianCalendar> anyGYear() {
165165
return Combinators.combine( anyYear(), anyTimezone().optional() )
166-
.as( ( year, optionalTimezone ) -> {
167-
final int timezone = optionalTimezone.orElse( DatatypeConstants.FIELD_UNDEFINED );
168-
return getDatatypeFactory().newXMLGregorianCalendar( year, DatatypeConstants.FIELD_UNDEFINED,
169-
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
170-
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
171-
DatatypeConstants.FIELD_UNDEFINED, timezone );
172-
} );
166+
.as( ( year, optionalTimezone ) -> {
167+
final int timezone = optionalTimezone.orElse( DatatypeConstants.FIELD_UNDEFINED );
168+
return getDatatypeFactory().newXMLGregorianCalendar( year, DatatypeConstants.FIELD_UNDEFINED,
169+
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
170+
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
171+
DatatypeConstants.FIELD_UNDEFINED, timezone );
172+
} );
173173
}
174174

175175
@Provide
176176
default Arbitrary<XMLGregorianCalendar> anyGMonth() {
177177
return Combinators.combine( anyMonth(), anyTimezone().optional() )
178-
.as( ( month, optionalTimezone ) -> {
179-
final int timezone = optionalTimezone.orElse( DatatypeConstants.FIELD_UNDEFINED );
180-
return getDatatypeFactory()
181-
.newXMLGregorianCalendar( DatatypeConstants.FIELD_UNDEFINED, month,
182-
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
183-
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
184-
DatatypeConstants.FIELD_UNDEFINED, timezone );
185-
} );
178+
.as( ( month, optionalTimezone ) -> {
179+
final int timezone = optionalTimezone.orElse( DatatypeConstants.FIELD_UNDEFINED );
180+
return getDatatypeFactory()
181+
.newXMLGregorianCalendar( DatatypeConstants.FIELD_UNDEFINED, month,
182+
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
183+
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
184+
DatatypeConstants.FIELD_UNDEFINED, timezone );
185+
} );
186186
}
187187

188188
@Provide
189189
default Arbitrary<XMLGregorianCalendar> anyGDay() {
190190
return Combinators.combine( anyDayInMonth(), anyTimezone().optional() )
191-
.as( ( day, optionalTimezone ) -> {
192-
final int timezone = optionalTimezone.orElse( DatatypeConstants.FIELD_UNDEFINED );
193-
return getDatatypeFactory().newXMLGregorianCalendar( DatatypeConstants.FIELD_UNDEFINED,
194-
DatatypeConstants.FIELD_UNDEFINED, day, DatatypeConstants.FIELD_UNDEFINED,
195-
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
196-
DatatypeConstants.FIELD_UNDEFINED, timezone );
197-
} );
191+
.as( ( day, optionalTimezone ) -> {
192+
final int timezone = optionalTimezone.orElse( DatatypeConstants.FIELD_UNDEFINED );
193+
return getDatatypeFactory().newXMLGregorianCalendar( DatatypeConstants.FIELD_UNDEFINED,
194+
DatatypeConstants.FIELD_UNDEFINED, day, DatatypeConstants.FIELD_UNDEFINED,
195+
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
196+
DatatypeConstants.FIELD_UNDEFINED, timezone );
197+
} );
198198
}
199199

200200
@Provide
201201
default Arbitrary<XMLGregorianCalendar> anyGYearMonth() {
202202
return Combinators.combine( anyYear(), anyMonth(), anyTimezone().optional() )
203-
.as( ( year, month, optionalTimezone ) -> {
204-
final int timezone = optionalTimezone.orElse( DatatypeConstants.FIELD_UNDEFINED );
205-
return getDatatypeFactory().newXMLGregorianCalendar( year, month,
206-
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
207-
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
208-
DatatypeConstants.FIELD_UNDEFINED, timezone );
209-
} );
203+
.as( ( year, month, optionalTimezone ) -> {
204+
final int timezone = optionalTimezone.orElse( DatatypeConstants.FIELD_UNDEFINED );
205+
return getDatatypeFactory().newXMLGregorianCalendar( year, month,
206+
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
207+
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
208+
DatatypeConstants.FIELD_UNDEFINED, timezone );
209+
} );
210210
}
211211

212212
@Provide
@@ -220,7 +220,7 @@ default Arbitrary<Tuple.Tuple2<Integer, Integer>> anyMonthDay() {
220220
return day <= 29;
221221
}
222222
if ( Stream.of( Month.APRIL, Month.JUNE, Month.SEPTEMBER, Month.NOVEMBER )
223-
.anyMatch( theMonth -> theMonth.getValue() == month ) ) {
223+
.anyMatch( theMonth -> theMonth.getValue() == month ) ) {
224224
return day <= 30;
225225
}
226226
return day <= 31;
@@ -230,13 +230,13 @@ default Arbitrary<Tuple.Tuple2<Integer, Integer>> anyMonthDay() {
230230
@Provide
231231
default Arbitrary<XMLGregorianCalendar> anyGMonthDay() {
232232
return Combinators.combine( anyMonthDay(), anyTimezone().optional() )
233-
.as( ( monthDay, optionalTimezone ) -> {
234-
final int timezone = optionalTimezone.orElse( DatatypeConstants.FIELD_UNDEFINED );
235-
return getDatatypeFactory().newXMLGregorianCalendar( DatatypeConstants.FIELD_UNDEFINED,
236-
monthDay.get1(), monthDay.get2(), DatatypeConstants.FIELD_UNDEFINED,
237-
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
238-
DatatypeConstants.FIELD_UNDEFINED, timezone );
239-
} );
233+
.as( ( monthDay, optionalTimezone ) -> {
234+
final int timezone = optionalTimezone.orElse( DatatypeConstants.FIELD_UNDEFINED );
235+
return getDatatypeFactory().newXMLGregorianCalendar( DatatypeConstants.FIELD_UNDEFINED,
236+
monthDay.get1(), monthDay.get2(), DatatypeConstants.FIELD_UNDEFINED,
237+
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
238+
DatatypeConstants.FIELD_UNDEFINED, timezone );
239+
} );
240240
}
241241

242242
@Provide
@@ -247,12 +247,12 @@ default Arbitrary<Duration> anyDuration() {
247247
@Provide
248248
default Arbitrary<Duration> anyYearMonthDuration() {
249249
return Combinators.combine( anyBoolean(), anyYear(), anyMonth() )
250-
.as( getDatatypeFactory()::newDurationYearMonth );
250+
.as( getDatatypeFactory()::newDurationYearMonth );
251251
}
252252

253253
@Provide
254254
default Arbitrary<Duration> anyDayTimeDuration() {
255255
return Combinators.combine( anyBoolean(), anyDayInMonth(), anyHour(), anyMinute(), anySecond() )
256-
.as( getDatatypeFactory()::newDurationDayTime );
256+
.as( getDatatypeFactory()::newDurationDayTime );
257257
}
258258
}

core/esmf-aspect-model-urn/src/main/java/org/eclipse/esmf/aspectmodel/urn/AspectModelUrn.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public static Try<AspectModelUrn> from( final String urn ) {
161161

162162
/**
163163
* Checked version of {@link #fromUrn(URI)}
164-
* @param urn the lexical representation of the Aspect Model URN
164+
* @param uri the lexical representation of the Aspect Model URN
165165
* @return the Aspect Model URN or a {@link UrnSyntaxException}
166166
*/
167167
public static Try<AspectModelUrn> from( final URI uri ) {

documentation/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
<groupId>org.slf4j</groupId>
5151
<artifactId>slf4j-nop</artifactId>
5252
</dependency>
53+
<dependency>
54+
<groupId>org.apache.poi</groupId>
55+
<artifactId>poi</artifactId>
56+
</dependency>
5357

5458
<dependency>
5559
<groupId>org.junit.jupiter</groupId>

0 commit comments

Comments
 (0)