ATM [autonomous topic maps] :Operator Definition

http://www.semports.org/mwp/queryTopicMapIndex

 

Lutz Maicher (maicher@informatik.uni-leipzig.de)

Last update: 2006-11-08

 

PSI: http://www.semports.org/mwp/queryTopicMapIndex

Description

This operator queries a topic map index data handler with a specified query. This query is a bag of terms, which should appear in a topic. The result set is a table with the columns “TEXT”, “SI” and “SOURCE”. The values of the first column are textual representations of topics (where the query terms are found in). The values of the second column are subject identifiers of these topics and the values of the last column are the locations of the topics at indexing time. The whole result set is stored in the forwarded token.

Example: The query Picasso  executed in the transition "ID1" might return the following result set:

TEXT

SI

SOURCE

Pablo Picasso

http://www.artists.org/PabloPicasso

C:\artists.xtm

Picassos Home

http://www.spain.org/phome

C:\spain.xtm

 

In this case the operator stores in the forwarded token the following characteristics:

[ID1.http://psi.semports.org/pndm/table, “TABLE”]
[ID1.TABLE.TEXT.0, "Pablo Picasso"].
[ID1.TABLE.TEXT.1, "Picassos Home"]
[ID1.TABLE.SI.0, "http://www.artists.org/PabloPicasso"].
[ID1.TABLE.SI.1, "http://www.spain.org/phome"].
[ID1.TABLE.SOURCE.0, "C:\artists.xtm”]
[ID1.TABLE.SOURCE.1, "C:\spain.xtm"]

Input

Namespace pndm defined by http://psi.semports.org/pndm/

pndm:operand1
[mandatory]

The query.

This query is a bag of terms which should appear in (the textual representation of) a topic.

Output

key rule

One item identifier of the current transition item +"http://psi.semports.org/pndm/table"

example

id24.http://psi.semports.org/pndm/table

value

TABLE

for each element of the result of the index query at position (column name, row index)

Note: A result set of an index query always consists of the columns with the following names “SI”, “SOURCE”, “TEXT”.

Note: The row index always starts with 0.

key rule

One item identifier of the current transition item +".TABLE"+ "."+column name +"." + row index

example

id24.TABLE.SI.1

value

The string representing the element from the result set of the query at the given position.

If the element is not defined, the value will be “NULL”.

If the result set is empty, the value is the string “null”.