net.sf.taverna.t2.provenance.api
Class NativeAnswer

java.lang.Object
  extended by net.sf.taverna.t2.provenance.api.NativeAnswer

public class NativeAnswer
extends java.lang.Object

Author:
Paolo Missier
Java bean used to encapsulate the results of a provenance query.
This takes the form of a nested map, see getAnswer() for details on its structure.

Constructor Summary
NativeAnswer()
           
 
Method Summary
 java.util.Map<QueryVar,java.util.Map<java.lang.String,java.util.List<Dependencies>>> getAnswer()
           
 void setAnswer(java.util.Map<QueryVar,java.util.Map<java.lang.String,java.util.List<Dependencies>>> answer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeAnswer

public NativeAnswer()
Method Detail

getAnswer

public java.util.Map<QueryVar,java.util.Map<java.lang.String,java.util.List<Dependencies>>> getAnswer()
Returns:
a Map of the form: QueryVar --> ( <path> --> [ Dependencies ]) where
  • QueryVar denotes one of the ports in the <select> element of the input query, for example: converter:atlasSlice
  • <path> is the index within the value associated to the port, for instance [1,2,3] or []. The inner Map structure accounts for multiple paths, so for example if the query asked for the provenance of elements [1,2] and [2,3] of the value bound to converter:atlasSlice, then the inner Map structure contains two entries, one for each of the two paths.
  • for each such path, the corresponding [Dependencies] is a list of Dependencies, each associated with one target processor and port mentioned in the input query. For example, for path [1,2] of value bound to converter:atlasSlice, you may see the following list of Dependencies:
    • converter:atlasSlice:[2]
    • slicer:atlasAverage[2]
    • slicer:atlasAverage[0]
    etc.
    Each of these elements is described by a Java bean, LineageQueryResultRecord, which represents a single provenance data record. This means that the particular value depends on each of these other values that are mentioned in the Dependencies list.

setAnswer

public void setAnswer(java.util.Map<QueryVar,java.util.Map<java.lang.String,java.util.List<Dependencies>>> answer)
Parameters:
sets - the query answer, in the format described in getAnswer()