Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix (core): Easy fix URISyntaxException for Globs in --load #755

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion enola
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [ -x "$(command -v hashdir)" ]; then
mv "$ROOT"/.cache/java.hash "$ROOT"/.cache/java.hash.previous 2>/dev/null || true
hashdir --quiet java/ > "$ROOT"/.cache/java.hash
set +e
diff "$ROOT"/.cache/java.hash "$ROOT"/.cache/java.hash.previous 2>/dev/null
diff "$ROOT"/.cache/java.hash "$ROOT"/.cache/java.hash.previous >/dev/null 2>/dev/null
DIFF="$?"
set -e
else
Expand Down
4 changes: 2 additions & 2 deletions java/dev/enola/cli/CommandWithModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public final void run() throws Exception {
var loader = new Loader(ritc);
var fgrp = new GlobResourceProviders();
for (var globIRI : group.load) {
try (var stream = fgrp.get(globIRI.toString())) {
try (var stream = fgrp.get(globIRI)) {
loader.convertIntoOrThrow(stream, store);
}
}
Expand Down Expand Up @@ -171,7 +171,7 @@ static class ModelOrServer {
names = {"--load", "-l"},
required = true,
description = "URI Glob of Models to load (e.g. file:\"**.ttl\")")
java.util.List<URI> load;
java.util.List<String> load;

@Option(
names = {"--model", "-m"},
Expand Down
2 changes: 1 addition & 1 deletion models/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ find models/ -type d -exec mkdir -p docs/{} \;
find models/ -type f -exec ln -f {} docs/{} \;
rm docs/models/{BUILD,build.bash}

./enola -vvv docgen --load=file:"docs/models/**.ttl" --output=file://"$PWD"/docs/models/
./enola -vvv docgen --load=file:"docs/models/**.{ttl,owl,rdf}" --output=file://"$PWD"/docs/models/

# TODO Support GLOBs in rosetta like in docgen? (Low priority, because DocGen will gen. embedded JSON-LD anyway.)
./enola -v rosetta --in=file:models/enola.ttl --out=file:docs/models/enola.jsonld
Expand Down