Hi Xavier,

The META-INF/services files in [4] should be enough on their own and
if not there may be classpath/ClassLoader issues rather than marmotta
specific issues. Any ServiceLoader/ClassLoader issues would need to be
fixed by getting RDF4J to change the ClassLoader they are currently
using from "serviceClass.getClassLoader()" to something more
compatible, like the context class loader for example. [5]

Cheers,

Peter

[4] 
https://github.com/apache/marmotta/blob/develop/libraries/kiwi/kiwi-sparql/src/main/resources/META-INF/services/org.apache.marmotta.kiwi.sparql.function.NativeFunction

[5] 
https://github.com/eclipse/rdf4j/blob/develop/core/util/src/main/java/org/eclipse/rdf4j/common/lang/service/ServiceRegistry.java#L37

On 3 July 2017 at 09:53, FRANCISCO XAVIER SUMBA TORAL
<[email protected]> wrote:
> Hi,
>
> The FunctionRegistry class no longer manage continuos synchronised checking 
> in RDF4J and Sesame 4, instead they use a helper [1]. So, what is the purpose 
> to auto-register the full text functions [2 & 3] at instantiation time? 
> Besides, once the functions implement the Function class and are registered 
> in the services file, the FunctionRegistry keeps track of them automatically. 
> So, why this is necessary on those function?
>
> FulltextQueryFunction:
>     static {
>         if(!FunctionRegistry.getInstance().has(“full text query uri")) {
>             FunctionRegistry.getInstance().add(new FulltextQueryFunction());
>         }
>     }
>
> FulltextSearchFunction:
>     static {
>         if(!FunctionRegistry.getInstance().has(“full text search uri")) {
>             FunctionRegistry.getInstance().add(new FulltextSearchFunction());
>         }
>     }
>
> It could be deleted, or is there something that I’m missing?
>
> Cheers,
> Xavier.
>
>
>
> [1] 
> https://github.com/eclipse/rdf4j/blob/develop/core/queryalgebra/evaluation/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/function/FunctionRegistry.java
>  
> <https://github.com/eclipse/rdf4j/blob/develop/core/queryalgebra/evaluation/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/function/FunctionRegistry.java>
> [2] 
> https://github.com/apache/marmotta/blob/develop/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/function/custom/FulltextQueryFunction.java
>  
> <https://github.com/apache/marmotta/blob/develop/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/function/custom/FulltextQueryFunction.java>
> [3] 
> https://github.com/apache/marmotta/blob/develop/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/function/custom/FulltextSearchFunction.java
>  
> <https://github.com/apache/marmotta/blob/develop/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/function/custom/FulltextSearchFunction.java>

Reply via email to