Hi Michael,
A client-side JavaScript function cannot call a Java method directly,
they live in different universes! So, here is the process:
* An HTTP request is triggered by the JavaScript code
* The Java server recieves the HTTP request and matches it to one of its
known routes
* The Java server instanciates the Java class associated with that route
* it calls the relevant method on that Command object, for instance
doPost if the HTTP request used the POST method
* the method returns a response
* the Java server wraps that response in HTTP and sends it back to the
browser
* the JavaScript callback is called with the result of that request
Although OpenRefine is generally run as a local service, there is a
clear separation between its server side (the Java application) and its
client side (the web application that you run in your browser).
This client/server separation is pretty standard. It might be useful to
read some intro course to building web apps if that sounds crazy to you.
Cheers,
Antonin
On 05/12/2017 18:09, Michael Bowie wrote:
> Hi Owen,
>
> Looking at the ExtraCTU-plugin, for example, where is the
> "createOperation" method of the "ExtractionCommand" class get called?
> I'm not seeing where the javascript files are calling this method? This
> method appears to be the one that actually begins the extraction process.
>
> My best,
> Michael
>
> On Wednesday, November 22, 2017 at 5:11:15 AM UTC-5, Owen Stephens wrote:
>
> Hi Michael,
>
> Probably stretching the limits of my knowledge here - I'm still
> working out some of this stuff as I need to - I'm probably at the
> "knows enough to be dangerous" stage at the moment, as I now
> understand enough to make changes & enhancements, but don't feel I
> have a full understanding of the codebase yet.
>
> Anyway - this page explains some of the mechanics (in terms of
> facets, but actually it is key to understanding the process in place
> I
> think)
https://github.com/OpenRefine/OpenRefine/wiki/Faceted-Browsing-Architecture
> <
https://github.com/OpenRefine/OpenRefine/wiki/Faceted-Browsing-Architecture>
>
> I'm guessing you've already
> seen
https://github.com/OpenRefine/OpenRefine/wiki/Extension-Points
> <
https://github.com/OpenRefine/OpenRefine/wiki/Extension-Points>. It
> --
> You received this message because you are subscribed to the Google
> Groups "OpenRefine" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
openrefine+...@googlegroups.com
> <mailto:
openrefine+...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.