dalclient
Class QueryRecord

java.lang.Object
  extended bydalclient.QueryRecord

public class QueryRecord
extends java.lang.Object

Query record class. Holds a table row or dataset descriptor containing a set of keyword=value pairs for the record. For a dataset, the keywords are the data model attributes for the dataset descriptor.


Method Summary
 QRAttribute getAttribute(java.lang.String key)
          Get an attribute given the corresponding keyword name.
 int getAttributeCount()
          Get the number of fields in the query response record.
 java.lang.String getDataset()
          Fetch the dataset referenced by the access reference and store the returned object in a file, using an automatically generated filename.
 boolean getDataset(java.lang.String path)
          Get the dataset pointed to by the AccessReference attribute and store the returned object in the specified filename.
 java.util.LinkedHashMap getMap()
          Get the map itself.
 long readURL(java.lang.String url, java.lang.String path)
          ReadURL -- Copy the contents of a URL to the named output file as a binary stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAttributeCount

public int getAttributeCount()
Get the number of fields in the query response record.


getAttribute

public QRAttribute getAttribute(java.lang.String key)
Get an attribute given the corresponding keyword name.

Parameters:
key - The attribute name

getMap

public java.util.LinkedHashMap getMap()
Get the map itself.


getDataset

public java.lang.String getDataset()
                            throws java.lang.Exception
Fetch the dataset referenced by the access reference and store the returned object in a file, using an automatically generated filename. By default we try to create the file in the current working directory. We try to guess the file extension from the "Format" dataset attribute, if given, otherwise a ".tmp" filename is used.

Throws:
java.lang.Exception

getDataset

public boolean getDataset(java.lang.String path)
                   throws java.lang.Exception
Get the dataset pointed to by the AccessReference attribute and store the returned object in the specified filename. Returns true if the download is successful, false if there is no AccessReference attribute for the dataset.

Parameters:
path - The output file pathname
Throws:
java.lang.Exception

readURL

public long readURL(java.lang.String url,
                    java.lang.String path)
             throws java.lang.Exception
ReadURL -- Copy the contents of a URL to the named output file as a binary stream.

Parameters:
url - The URL to be read
path - The output file pathname
Throws:
java.lang.Exception