Previous topic  Top  Next topic  Print this Topic
 

Details on Query Input and Output

 

The "query" operation has two input parameters. With the "query" parameter you provide the query text of the ObjectLogic or SPARQL query. With the "fullxml" parameter you specify in which format the results are returned.

If fullxml is set to false, only the ObjectLogic representation of the terms is returned, i.e. only the "repr" field list of "WsTuple" is filled. If fullxml is set to true, the terms are returned with their complete structure. In this case, only the "term" field list of "WsTuple" is filled.

Example:
To see the difference, see the output of the following ObjectLogic query

?- _unify(?X,1.0) AND _unify(?Y,"Hi") AND _unify(?Z,["a","b","c"]).

On the XML level, the results look like this

With fullxml = false
 
<queryResponse>
<queryKey>2</queryKey>
<variableNames><var>X</var><var>Y</var><var>Z</var></variableNames>
        <result>
          <repr>1.0</repr>
          <repr>"Hi"</repr>
          <repr>[a,b,c]</repr>
</result>
</queryResponse>
 
 
With fullxml = true
 
<queryResponse>
<queryKey>3</queryKey>
<variableNames><var>X</var><var>Y</var><var>Z</var></variableNames>
<result>
          <term><d>1.0</d></term>
          <term><s>"Hi"</s></term>
          <term><list><item><s>a</s></item><item><s>b</s></item>
                                <item><s>c</s></item></list></term>
</result>
</queryResponse>

More details can be found in the WSDL. The Deployment section describes how to access the concrete WSDL.