You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The super call also supports arrays so you can have multiple entries there. If the types it supports depend on other factors you probably just want to extend RepresentationConverter and have a custom canHandle implementation.
One potential issues when supporting all types is that this converter might be chosen for conversions it actually can't handle. For example, converting from JSON-LD to Turtle in the CSS works by having one converter convert the JSON-LD to quad objects, and then chain a second converter that converts quad objects to Turtle. But if there is also an AnyToRdfConverter in that array, that one would be chose instead since it says it can do the conversion in 1 step.
There are some ways around this. One of them is to just not put this converter in the main array of converters but put it somewhere further in the store stack, after a regex router rule for example. Another way is to have a more advanced canHandle function so it can detect if it can actually do the conversion or not.
The text was updated successfully, but these errors were encountered:
Oh did not know that this was hardcoded. I did write a test for csv input, but then I best look at this test what’s been done wrong that makes this test succeed.
If you call the handle function directly you wouldn't notice this. Setting the input type is only relevant for the canHandle call. The value gets checked there and the request gets rejected if it does not match one of the input types.
Currently the
AnyToRdfConverter
is hardcoded to only support JSON:solid-rml-store/src/any-to-rdf-converter.ts
Line 31 in 239cfd7
The super call also supports arrays so you can have multiple entries there. If the types it supports depend on other factors you probably just want to extend
RepresentationConverter
and have a customcanHandle
implementation.One potential issues when supporting all types is that this converter might be chosen for conversions it actually can't handle. For example, converting from JSON-LD to Turtle in the CSS works by having one converter convert the JSON-LD to quad objects, and then chain a second converter that converts quad objects to Turtle. But if there is also an
AnyToRdfConverter
in that array, that one would be chose instead since it says it can do the conversion in 1 step.There are some ways around this. One of them is to just not put this converter in the main array of converters but put it somewhere further in the store stack, after a regex router rule for example. Another way is to have a more advanced
canHandle
function so it can detect if it can actually do the conversion or not.The text was updated successfully, but these errors were encountered: