Skip to content

Commit

Permalink
[#227] Fix reading of input binding
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgenii Grigorev authored and blcham committed Feb 24, 2025
1 parent f1f7676 commit 1c85a66
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.*;
import java.net.URL;
import java.util.*;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -365,7 +363,11 @@ Model loadModelFromUrl(@NotNull String modelUrl) {
private void extendBindingFromURL(VariablesBinding inputVariablesBinding, URL inputBindingURL) {
try {
final VariablesBinding vb2 = new VariablesBinding();
vb2.load(inputBindingURL.openStream(), FileUtils.langTurtle);
String path = inputBindingURL.getPath();
File file = new File(path);
InputStream is = new FileInputStream(file);
vb2.load(is, FileUtils.langTurtle);
is.close();
VariablesBinding vb3 = inputVariablesBinding.extendConsistently(vb2);
if (vb3.isEmpty()) {
log.debug("- no conflict between bindings loaded from '{}' and those provided in query string.",
Expand Down

0 comments on commit 1c85a66

Please sign in to comment.