de.fuberlin.wiwiss.d2rq.download
Class DownloadContentQuery

java.lang.Object
  extended by de.fuberlin.wiwiss.d2rq.download.DownloadContentQuery

public class DownloadContentQuery
extends Object

A helper that evaluates a DownloadMap for a particular URI, returning either the content, or null if the URI isn't applicable for the download map or there is nothing in the table for the value. This directly runs its own SQL query because the handling of BLOBs here requires returning an InputStream, and that's not easily supported by SQLIterator.

Author:
RichardCyganiak

Constructor Summary
DownloadContentQuery(DownloadMap downloadMap, String uri)
           
 
Method Summary
 void close()
           
 InputStream getContentStream()
           
 String getMediaType()
           
 boolean hasContent()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DownloadContentQuery

public DownloadContentQuery(DownloadMap downloadMap,
                            String uri)
Parameters:
downloadMap - The download map to be queried
uri - The URI whose content is desired
Method Detail

hasContent

public boolean hasContent()

getContentStream

public InputStream getContentStream()

getMediaType

public String getMediaType()

close

public void close()