Project

General

Profile

Actions

Bug #2649

open

Ecogrid returnfields don't return enough information

Added by Chad Berkley about 18 years ago. Updated about 18 years ago.

Status:
New
Priority:
Immediate
Assignee:
Category:
ecogrid
Target version:
Start date:
11/08/2006
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
2649

Description

When using returnfields in an ecogrid query, the original xpath used in the returnfield is not returned with the results, making it very difficult to parse the results. When a query is submited, a ResultsetTypeRecordReturnfield object is returned. This object only has two useful methods: get_value() and getId(). I thought getId() would return the original xpath query used to create the returnfield, but instead it returns a cryptic identifier starting with 'f' then a number.

Example:
Given these returnfields:
<returnField>/entity/@name</returnField>
<returnField>/entity/property/@name</returnField>
<returnField>/entity/property/@value</returnField>

And this input document:

<entity name="Variable Setter" class="ptolemy.kernel.ComponentEntity">
<property name="entityId" value="urn:lsid:kepler-project.org:actor:10:2"
class="org.kepler.moml.NamedObjId"/>
<property name="documentation" class="org.kepler.moml.DocumentationAttribute">
null
</property>

&lt;property name="class" value="ptolemy.actor.lib.SetVariable" 
class="ptolemy.kernel.util.StringAttribute">
&lt;property name="id" value="null"
class="ptolemy.kernel.util.StringAttribute"/>
&lt;/property&gt;
&lt;property name="kepler:input" class="org.kepler.moml.PortAttribute"&gt;
&lt;property name="direction" value="input"
class="ptolemy.kernel.util.StringAttribute"/>
&lt;property name="dataType" value="unknown"
class="ptolemy.kernel.util.StringAttribute"/>
&lt;property name="isMultiport" value="false"
class="ptolemy.kernel.util.StringAttribute"/>
&lt;/property&gt;
&lt;property name="variableName" class="ptolemy.kernel.util.StringAttribute" 
value="parameter">
&lt;/property&gt;
&lt;property name="delayed" class="ptolemy.data.expr.Parameter" value="true"&gt;
&lt;/property&gt;
&lt;property name="semanticType000" class="org.kepler.sms.SemanticType"
value="urn:lsid:localhost:onto:1:1#Variable">
&lt;/property&gt;
&lt;property name="semanticType111" class="org.kepler.sms.SemanticType"
value="urn:lsid:localhost:onto:2:1#LocalInput">
&lt;/property&gt;
&lt;property name="_location" class="ptolemy.kernel.util.Location"
value="{250, 300}">
&lt;/property&gt;
&lt;property name="karId" class="ptolemy.kernel.util.StringAttribute"
value="urn:lsid:kepler-project.org:kar:11:1">
&lt;/property&gt;
&lt;/entity&gt;

You will get returnfields (in the format getId():get_value()) like this:
returnfield: f0:Variable Setter
returnfield: f1:entityId
returnfield: f2:urn:lsid:kepler-project.org:actor:10:2
returnfield: f1:documentation
returnfield: f1:class
returnfield: f2:ptolemy.actor.lib.SetVariable
returnfield: f1:kepler:input
returnfield: f1:variableName
returnfield: f2:parameter
returnfield: f1:delayed
returnfield: f2:true
returnfield: f1:semanticType000
returnfield: f2:urn:lsid:localhost:onto:1:1#Variable
returnfield: f1:semanticType111
returnfield: f2:urn:lsid:localhost:onto:2:1#LocalInput
returnfield: f1:_location
returnfield: f2:{250, 300}
returnfield: f1:karId
returnfield: f2:urn:lsid:kepler-project.org:kar:11:1

Instead, there either needs to be a new method, getQuery(), that would return the query for each field, or the getId() should return the query or some other more meaninful identifier.


Related issues

Blocked by SEEK - Bug #2650: ecogrid returnfields need to support more xpathNewMatt Jones11/08/2006

Actions
Actions

Also available in: Atom PDF