Skip to content

Commit

Permalink
removed 'overwrite' - not used
Browse files Browse the repository at this point in the history
  • Loading branch information
Guy Davenport committed Oct 15, 2024
1 parent 0f6313c commit 8e10ed2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ private void generateExcel() {
err.println("For Excel (xlsx) generation the output path must be a file");
}

XSSFWorkbookGenerator xssfWorkbookGenerator = new XSSFWorkbookGenerator(outputPath, overwrite);
XSSFWorkbookGenerator xssfWorkbookGenerator = new XSSFWorkbookGenerator(outputPath);

Response<List<Path>> response = xssfWorkbookGenerator.generate(schemaDirectory);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ public class BrAPITClassCacheUtil {

private Predicate<BrAPIClass> cachePredicate ;

/**
* Creates the cache of classes as a Map
* @param brAPIClasses the list of possible classes to be cached.
* @return the cache of classes as a Map
*/
public Map<String, BrAPIClass> createMap(List<BrAPIClass> brAPIClasses) {
return new Cache(brAPIClasses).brAPIClassMap ;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,23 @@ public class XSSFWorkbookGenerator {
private final XSSFWorkbookGeneratorOptions options;

private Path outputPath ;
private boolean overwrite ;

/**
* Creates a XSSFWorkbookGenerator using a default {@link BrAPISchemaReader} and
* the default {@link OntModelGeneratorOptions}.
* @param outputPath the path of the output file or directory
*/
public XSSFWorkbookGenerator(Path outputPath, boolean overwrite) {
this(new BrAPISchemaReader(), XSSFWorkbookGeneratorOptions.load(), outputPath, overwrite) ;
public XSSFWorkbookGenerator(Path outputPath) {
this(new BrAPISchemaReader(), XSSFWorkbookGeneratorOptions.load(), outputPath) ;
}

/**
* Creates a XSSFWorkbookGenerator using a default {@link BrAPISchemaReader} and
* the provided {@link XSSFWorkbookGenerator}.
* @param options The options to be used in the generation.
*/
public XSSFWorkbookGenerator(XSSFWorkbookGeneratorOptions options, Path outputPath, boolean overwrite) {
this(new BrAPISchemaReader(), options, outputPath, overwrite) ;
public XSSFWorkbookGenerator(XSSFWorkbookGeneratorOptions options, Path outputPath) {
this(new BrAPISchemaReader(), options, outputPath) ;
}

/**
Expand Down Expand Up @@ -87,7 +87,6 @@ public Generator(List<BrAPIClass> brAPISchemas) {

public Response<List<Path>> generate() {
try {
Function<Response<List<Workbook>>, Response<?>> saveWorkbooks;
return generateDataClasses(new ArrayList<>(brAPIClasses.values())) ;
} catch (Exception e) {
return fail(Response.ErrorType.VALIDATION, e.getMessage()) ;
Expand Down

0 comments on commit 8e10ed2

Please sign in to comment.