uk.ac.ic.doc.automed.p2p
Class QueryGetter

java.lang.Object
  extended by uk.ac.ic.doc.automed.p2p.QueryGetter
All Implemented Interfaces:
IQueryAggregator
Direct Known Subclasses:
AdvancedQueryGetter

public class QueryGetter
extends java.lang.Object
implements IQueryAggregator

Author:
Charis TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Field Summary
protected  AutoMedPeer peer
           
 
Constructor Summary
QueryGetter(AutoMedPeer peer)
           
 
Method Summary
 ASG getQueryResults(java.lang.String peerName, java.lang.String address, QueryDescription queryDesc)
           
 ASG getQueryResults(java.lang.String peerName, java.lang.String address, java.lang.String schema, java.lang.String query)
          Use QEP to send query request for execution
 void getSODefinition(QuerySubGoal qsg, java.lang.String peerName, java.lang.String peerAddress)
          Ask a remote peer for the query definitions of a given schema object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

peer

protected AutoMedPeer peer
Constructor Detail

QueryGetter

public QueryGetter(AutoMedPeer peer)
Method Detail

getQueryResults

public ASG getQueryResults(java.lang.String peerName,
                           java.lang.String address,
                           java.lang.String schema,
                           java.lang.String query)
                    throws UnsuccessfulReplyException,
                           CommunicationException
Use QEP to send query request for execution

Specified by:
getQueryResults in interface IQueryAggregator
Parameters:
peerName - the logical name of the peer
address - a url that resolves to an IP addres, or an IP address, of the host where the peer is currently located.
schema - the name of the public schema on the peer to query
query - the query to pose on that public schema
Throws:
UnsuccessfulReplyException
CommunicationException

getQueryResults

public ASG getQueryResults(java.lang.String peerName,
                           java.lang.String address,
                           QueryDescription queryDesc)
                    throws UnsuccessfulReplyException,
                           CommunicationException,
                           QueryResultException
Specified by:
getQueryResults in interface IQueryAggregator
Throws:
UnsuccessfulReplyException
CommunicationException
QueryResultException

getSODefinition

public void getSODefinition(QuerySubGoal qsg,
                            java.lang.String peerName,
                            java.lang.String peerAddress)
                     throws CommunicationException,
                            QueryResultException
Ask a remote peer for the query definitions of a given schema object

Specified by:
getSODefinition in interface IQueryAggregator
Parameters:
so - the schema object in question
Throws:
CommunicationException
QueryResultException