Method readLibrary in TemplateManager does not correctly attempt all formats if no format is specified
Description
If the template library is a stottr file, then the method readLibrary does apparently not correctly attempt all formats when the format is unspecified.
Steps to reproduce
The bug can be shown using the lutra CLI, where the following command produces no output (lib.stottr is a template library and in.stottr is a file of instances):
java -jar lutra.jar -l lib.stottr -I stottr in.stottr
However, the command works as intended for wottr files (wlib.ttl is a template library of wottr templates):
java -jar lutra.jar -l wlib.ttl -I stottr in.stottr
Notice that the library format is unspecified in both of the commands above.
Here is some example code to reproduce the bug as well as examples where the method works as intended:
// Path to some stottr template library
String pathStottr = "lib.stottr";
// Path to some wottr template library
String pathWottr = "wlib.ttl";
// Stottr format:
Format stottrFormat = templateManager.getFormat(StandardFormat.stottr.name());
TemplateManager templateManager = new StandardTemplateManager();
// Correctly adds templates to template store:
templateManager.readLibrary(stottrFormat, pathStottr);
// Also correctly adds templates to template store:
templateManager.readLibrary(pathWottr);
// Does not add templates to template store and does not produce an error:
templateManager.readLibrary(pathStottr);