Skip to content

Commit f8c11f9

Browse files
authored
Merge pull request #48 from plantbreeding/develop
Release 0.52
2 parents 1311dfe + 375cdc3 commit f8c11f9

File tree

5 files changed

+8
-19
lines changed

5 files changed

+8
-19
lines changed

java/cli/src/main/java/org/brapi/schematools/cli/AbstractSubCommand.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
package org.brapi.schematools.cli;
22

3+
import lombok.Getter;
34
import org.brapi.schematools.core.response.Response;
45
import picocli.CommandLine;
56

67
import java.io.IOException;
78
import java.io.PrintWriter;
89
import java.util.Collection;
910

11+
@Getter
1012
public abstract class AbstractSubCommand implements Runnable {
1113

1214
private PrintWriter err ;

java/cli/src/main/java/org/brapi/schematools/cli/ValidateSubCommand.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,8 @@ private void printErrors(Response<List<BrAPIClass>> response) {
4848

4949
response.getAllErrors().forEach(this::printError);
5050

51-
if (throwExceptionOnFail) {
51+
if (isThrowExceptionOnFail()) {
5252
throw new BrAPICommandException(message, response.getAllErrors()) ;
5353
}
5454
}
55-
56-
private void printError(Response.Error error) {
57-
switch (error.getType()) {
58-
59-
case VALIDATION -> {
60-
System.err.print("Validation Error :");
61-
}
62-
case PERMISSION, OTHER -> {
63-
System.err.print("Error :");
64-
}
65-
}
66-
System.err.print('\t');
67-
68-
System.err.println(error.getMessage());
69-
}
7055
}

java/core/src/main/java/org/brapi/schematools/core/ontmodel/options/OntModelGeneratorOptions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import lombok.experimental.Accessors;
88
import org.brapi.schematools.core.options.AbstractMainGeneratorOptions;
99
import org.brapi.schematools.core.utils.ConfigurationUtils;
10+
import org.brapi.schematools.core.ontmodel.OntModelGenerator;
1011

1112
import java.io.IOException;
1213
import java.io.InputStream;

java/core/src/main/java/org/brapi/schematools/core/options/PropertyOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public final boolean isLink() {
7070

7171
/**
7272
* Gets if this property is used as a foreign key link between entities for a specific primary model. For example the id property (or field)
73-
* name of Study, would be 'studyDbId' by default. Use {@link #setLinkFor(String, String)}
73+
* name of Study, would be 'studyDbId' by default. Use {@link #setLinkFor(String, Boolean)}
7474
* to override this value.
7575
* @param name the name of the primary model
7676
* @return {@code true} if this property is used as a foreign key link between entities
@@ -83,7 +83,7 @@ public final boolean isLinkFor(String name) {
8383

8484
/**
8585
* Gets if this property is used specific primary model. For example the id property (or field)
86-
* name of Study, would be 'studyDbId' by default. Use {@link #setLinkFor(BrAPIType, String)}
86+
* name of Study, would be 'studyDbId' by default. Use {@link #setLinkFor(BrAPIType, Boolean)}
8787
* to override this value.
8888
* @param type the primary model
8989
* @return {@code true} if this property is used as a foreign key link between entities

java/core/src/main/java/org/brapi/schematools/core/r/options/RGeneratorOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import org.brapi.schematools.core.options.PropertiesOptions;
1313
import org.brapi.schematools.core.utils.ConfigurationUtils;
1414
import org.brapi.schematools.core.validiation.Validation;
15+
import org.brapi.schematools.core.r.RGenerator;
1516

1617
import java.io.IOException;
1718
import java.io.InputStream;
@@ -24,7 +25,7 @@
2425
import static org.brapi.schematools.core.utils.StringUtils.toSingular;
2526

2627
/**
27-
* Options for the {@link SQLGenerator}.
28+
* Options for the {@link RGenerator}.
2829
*/
2930
@Getter
3031
@Setter

0 commit comments

Comments
 (0)