Hi Andy,
It generates the error Signature 'org.apache.tika.Tika.parse' is ambiguous
Which maybe it is from some perspectives :-).
In the latest snapshot, I have updated the error feedback to:
Several implementations found for 'Q{org.apache.tika.Tika}parse#1'.
But a better solution would be to choose the function that comes closest to the given XQuery arguments. It won’t be possible to find a mapper that meets all requirements (and past versions of BaseX have demonstrated that this is a difficult problem), but Michael Kay has also put lots of thoughts on this [1], and we could check if his distance calculations could also be applied to the BaseX java mapper.
For now, it’s in fact best to go with the additional Java indirection layer.
Christian
[1] http://www.saxonica.com/documentation/extensibility/functions/choosing-overl...
I hoped some type information might be available in the $file variable to resolve this, but it appears not. I was wondering about the possibility of using Java type at the XQuery level e.g. let $file as java:java.io.File :=File:new("xx.pdf")
Is there any way to avoid writing the couple of line Java class shim for this and similar cases?
Regards /Andy
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk