Some general help on developing plugins is in the TopBraid Composer help > Extending TopBraid Suite > Adding SPARQL Functions. Instead of writing a SPARQL function, you'd need to subclass AbstractSMModule as in the example below

package org.topbraid.sparqlmotion.lib.internal;

import org.topbraid.core.TB;
import org.topbraid.jenax.progress.ProgressMonitor;
import org.topbraid.spin.sparqlmotion.modules.AbstractSMModule;
import org.apache.jena.graph.Graph;


/**
 * The module sml:ImportCurrentRDF.
 *
 * @author Holger Knublauch
 */
public class ImportCurrentRDFModule extends AbstractSMModule {

    @Override
    public Graph getRDFOutput(ProgressMonitor monitor)  {
        Graph defa = getDefaultInputGraph();
        if(defa != null) {
            return defa;
        }
        else {
            return TB.getSession().getModel().getGraph();
        }
    }
}

In this override above, you can basically insert any Java code. Make sure your (Eclipse) plugin declares dependencies on org.topbraid.sparqlmotion and related plugins.

Note that this is not an officially supported path for extensions, and APIs may be unstable. Just setting up the environment and then bringing the plugin into a deployable state may be a time consuming experience, which is also why we stopped promoting these kinds of extensions.

Another route to take would be to talk to us (off-list) about making the FTP functionality an officially supported feature, say, for TopBraid 6.2 (or even 6.1 if it's cleanly isolated and we hurry). Maybe your employer has support hours with TopQuadrant to get this done.

Holger



On 16/10/2018 7:13 PM, Sanjeev Devireddy wrote:
Hi Holger,
        Thanks for your response. I want to check one thing that, is there a way to develop a SPARQLMotion custom module for the SFTP (SSH File Transfer Protocol) connection? I have a java program, which does the file transfer to a remote server using SFTP connection. Can this java code be used to create a SPARQLMotion custom module?         As per the TopBraid's document ( https://www.topquadrant.com/technology/sparqlmotion/ ), I understand that SPARQLMotion custom modules can be developed with Java. But I don't find an example on how to create a SPARQLMotion custom module with java. If you have any example document or project, then could you please share it?



Thanks,
Sanjeev
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "TopBraid 
Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to