–

AGROVOC topic map

As a bridge between Information processing and Knowledge processing
    tolog query      Home     
tolog query
Query input field:   
   Show trace
 

 
The following are examples of tolog query.
You can try the queries in the input field above.
 
For more information about "tolog", please refer to
tolog - A topic map query language and
tolog - Language tutorial.

****************************************************************
          Query instance topics                          
****************************************************************

-----   Query all instances of all topic types   ---

instance-of($INSTANCE, $TOPIC)?


-----   Query all instances of "concept" topic type   ---

using psi1 for i"http://www.h-gis.org/psi/agrovoc/"
instance-of($INSTANCE, psi1:concept)
order by $INSTANCE?


**********************************************************************
         Query all "superclass-subclass" association
**********************************************************************

using psi2 for i"http://www.topicmaps.org/xtm/1.0/core.xtm#"
psi2:superclass-subclass($SUPER : psi2:superclass, $SUB : psi2:subclass)
order by $SUPER, $SUB?


**********************************************************************
         Query two-layer "superclass-subclass" association
**********************************************************************

using psi2 for i"http://www.topicmaps.org/xtm/1.0/core.xtm#"
psi2:superclass-subclass($SUPER : psi2:superclass, $SUB1 : psi2:subclass),
psi2:superclass-subclass($SUB1 : psi2:superclass, $SUB2 : psi2:subclass)
order by $SUPER, $SUB1, $SUB2?


**********************************************************************
         Query all "related" association
**********************************************************************

using psi1 for i"http://www.h-gis.org/psi/agrovoc/"
psi1:relate($RT1 : psi1:rt, $RT2 : psi1:rt)
order by $RT1, $RT2?


**********************************************************************
         Query narrower term of "climate"
**********************************************************************

using psi1 for i"http://aims.fao.org/aos/agrovoc/"
using psi2 for i"http://www.topicmaps.org/xtm/1.0/core.xtm#"
psi2:superclass-subclass(psi1:c_1665 : psi2:superclass, $SUB1 : psi2:subclass)?


**********************************************************************
         Query related term of "climate"
**********************************************************************

using psi1 for i"http://aims.fao.org/aos/agrovoc/"
using psi2 for i"http://www.h-gis.org/psi/agrovoc/"
psi2:relate(psi1:c_1665 : psi2:rt, $RT2 : psi2:rt)?


**********************************************************************
         Query narrower term of "climate" in English
**********************************************************************

using psi1 for i"http://aims.fao.org/aos/agrovoc/"
using psi2 for i"http://www.topicmaps.org/xtm/1.0/core.xtm#"
using psi3 for i"http://www.h-gis.org/psi/agrovoc/"
select $LTNAME from
psi2:superclass-subclass(psi1:c_1665 : psi2:superclass, $SUB1 : psi2:subclass),
topic-name($SUB1, $TNAME),
scope($TNAME, psi3:EN),
value($TNAME, $LTNAME)
order by $LTNAME?


**********************************************************************
         Query narrower term of "climate" in Thai
**********************************************************************

using psi1 for i"http://aims.fao.org/aos/agrovoc/"
using psi2 for i"http://www.topicmaps.org/xtm/1.0/core.xtm#"
using psi3 for i"http://www.h-gis.org/psi/agrovoc/"
select $LTNAME from
psi2:superclass-subclass(psi1:c_1665 : psi2:superclass, $SUB1 : psi2:subclass),
topic-name($SUB1, $TNAME),
scope($TNAME, psi3:TH),
value($TNAME, $LTNAME)
order by $LTNAME?



    
Knowledge Synergy Inc.