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

feat: Make http and file document loaders more configurable. #6

Merged
merged 1 commit into from
Dec 20, 2021

Conversation

peacekeeper
Copy link
Member

This makes it possible to instantiate ConfigurableDocumentLoader and JsonLDObject, without having to instantiate HttpLoader and FileLoader if they are not needed.

@vitorpamplona
Copy link

This works! Thanks!

@vitorpamplona
Copy link

Of course, I think it would be better if the lib drops the dependency entirely (Let people manually add custom DocumentLoaders for the web and local I/O). But this is a step in the right direction.

@peacekeeper
Copy link
Member Author

I think it would be better if the lib drops the dependency entirely

I'm not sure what dependency to drop, since java.net.http.HttpClient is used directly by titanium-json-ld, which is central to this library.

Let people manually add custom DocumentLoaders

With this change, it should be possible to also add your own DocumentLoaders for http and file, bypassing the default ones altogether.

Do you have any suggestions how to improve this, or should I merge?

@vitorpamplona
Copy link

Please merge it. I was able to download the branch and test it. It runs beautifully.

On the dependency, I would argue that titanium-json-ld should stop using java.net.http.HttpClient as well. But that's for another day.

Thanks Markus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants