Revision: 18668
http://sourceforge.net/p/gate/code/18668
Author: ian_roberts
Date: 2015-05-05 16:00:22 +0000 (Tue, 05 May 2015)
Log Message:
-----------
Documentation for sparqlRequestMethod
Modified Paths:
--------------
mimir/trunk/doc/mimir-guide.pdf
mimir/trunk/doc/plugins.tex
mimir/trunk/doc/preamble.tex
Modified: mimir/trunk/doc/mimir-guide.pdf
===================================================================
(Binary files differ)
Modified: mimir/trunk/doc/plugins.tex
===================================================================
--- mimir/trunk/doc/plugins.tex 2015-05-05 15:31:26 UTC (rev 18667)
+++ mimir/trunk/doc/plugins.tex 2015-05-05 16:00:22 UTC (rev 18668)
@@ -204,6 +204,17 @@
\item[sparqlEndpointUser and sparqlEndpointPassword] username and password used
to authenticate to the SPARQL endpoint (only HTTP basic authentication is
supported). May be omitted if your endpoint does not require authentication.
+\item[sparqlRequestMethod] the mechanism by which the query will be passed to
+ the endpoint. This value is an {\tt enum} type
+ {\tt gate.mimir.sparql.RequestMethod} with three possible values:
+ \bde
+ \item[GET] (default) the query will be URL encoded and appended to the URL as
+ a parameter \verb!?query=...!
+ \item[POST\textunderscore{}ENCODED] the query will be URL encoded as in the
GET case and sent
+ in a POST request with content type {\tt application/x-www-form-urlencoded}
+ \item[POST\textunderscore{}PLAIN] the query will be sent as-is as the body
of a POST request
+ with content type {\tt application/sparql-query}
+ \ede
\ede
The helper also accepts the usual ``annType'' and ``{\em xxx}Features''
@@ -219,11 +230,13 @@
\begin{lstlisting}[texcl, breaklines, breakindent=150pt]
import gate.mimir.db.DBSemanticAnnotationHelper as DBH
import gate.mimir.sparql.SPARQLSemanticAnnotationHelper as SPARQLHelper
+import gate.mimir.sparql.RequestMethod as RM
// \ldots
semanticAnnotations = {
index {
annotation helper:new SPARQLHelper(
sparqlEndpoint:'http://dbpedia.org/sparql',
+ sparqlRequestMethod:RM.POST_ENCODED,
delegate:new DBH(annType:"Person", uriFeatures:['inst']))
}
}
@@ -236,6 +249,7 @@
index {
annotation helper:new SPARQLHelper(
sparqlEndpoint:'http://dbpedia.org/sparql',
+ sparqlRequestMethod:RM.POST_ENCODED,
queryPrefix:
'PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> \
PREFIX xsd:<http://www.w3.org/2001/XMLSchema#> \
@@ -275,10 +289,12 @@
\begin{lstlisting}[texcl, breaklines, breakindent=150pt]
import gate.mimir.db.DBSemanticAnnotationHelper as DBH
import gate.mimir.sparql.SPARQLSemanticAnnotationHelper as SPARQLHelper
+import gate.mimir.sparql.RequestMethod as RM
def standardHelper(type) {
return new SPARQLHelper(
sparqlEndpoint:'http://dbpedia.org/sparql',
+ sparqlRequestMethod:RM.POST_ENCODED,
queryPrefix:
'PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> \
PREFIX xsd:<http://www.w3.org/2001/XMLSchema#> \
Modified: mimir/trunk/doc/preamble.tex
===================================================================
--- mimir/trunk/doc/preamble.tex 2015-05-05 15:31:26 UTC (rev 18667)
+++ mimir/trunk/doc/preamble.tex 2015-05-05 16:00:22 UTC (rev 18668)
@@ -391,3 +391,4 @@
% by default, we start with the normal size
\lstnormal
+\usepackage{underscore}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs