jpl.mipl.mdms.FileService.komodo.services.query.server
Class AtlasIISearchService

java.lang.Object
  extended by jpl.mipl.mdms.FileService.komodo.services.query.server.AtlasIISearchService
All Implemented Interfaces:
Closeable, QSearchService

public class AtlasIISearchService
extends Object
implements QSearchService

Purpose: Implementation of the QSearchService for the Atlas II service.

   Copyright 2007, California Institute of Technology.
   ALL RIGHTS RESERVED.
   U.S. Government Sponsorship acknowledge. 2007.
   
 ============================================================================
 Modification History :
 ----------------------

 Date              Who              What
 ----------------------------------------------------------------------------
 08/07/2007        Nick             Initial Release
 ============================================================================
 

Version:
$Id: AtlasIISearchService.java,v 1.9 2007/09/24 23:34:50 ntt Exp $
Author:
Nicholas Toole (Nicholas.T.Toole@jpl.nasa.gov)

Field Summary
static String ATLAS_KEY_FILETYPE
           
static String ATLAS_KEY_NAME
           
static String ATLAS_KEY_SIZE
           
static String ATLAS_KEY_TIME
           
protected  URL configLocation
           
static String FEI_KEY_FILETYPE
           
static String FEI_KEY_NAME
           
static String FEI_KEY_SIZE
           
static String FEI_KEY_TIME
           
protected  boolean isClosed
           
protected  Properties properties
           
protected  URL serviceLocation
           
 
Constructor Summary
AtlasIISearchService()
          Constructor
AtlasIISearchService(URL serviceLocation)
          Constructor with initial service location
 
Method Summary
 void close()
          Closes this service.
 String getProperty(String name)
          Returns the value of a property.
 void init()
           
 boolean isClosed()
          Implementation of the Closeable interface.
 boolean performQuery(QSession session)
          Performs the search query using Atlas II.
 void setProperty(String name, String value)
          Sets a property.
 void setServiceUrl(URL serviceLocation)
          Sets the service location URL
protected  String translateConstraints(String original)
          Performs a translation of the SQL_like query constraints replacing the generic keywords with Atlas-specific names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATLAS_KEY_FILETYPE

public static String ATLAS_KEY_FILETYPE

ATLAS_KEY_NAME

public static String ATLAS_KEY_NAME

ATLAS_KEY_SIZE

public static String ATLAS_KEY_SIZE

ATLAS_KEY_TIME

public static String ATLAS_KEY_TIME

FEI_KEY_FILETYPE

public static String FEI_KEY_FILETYPE

FEI_KEY_NAME

public static String FEI_KEY_NAME

FEI_KEY_SIZE

public static String FEI_KEY_SIZE

FEI_KEY_TIME

public static String FEI_KEY_TIME

isClosed

protected boolean isClosed

serviceLocation

protected URL serviceLocation

configLocation

protected URL configLocation

properties

protected Properties properties
Constructor Detail

AtlasIISearchService

public AtlasIISearchService()
Constructor


AtlasIISearchService

public AtlasIISearchService(URL serviceLocation)
Constructor with initial service location

Parameters:
serviceLocation - URL of Atlas service location
Method Detail

setServiceUrl

public void setServiceUrl(URL serviceLocation)
Sets the service location URL

Specified by:
setServiceUrl in interface QSearchService
Parameters:
URL - of service location

init

public void init()

setProperty

public void setProperty(String name,
                        String value)
Sets a property.

Specified by:
setProperty in interface QSearchService
Parameters:
name - Property name
value - Property value

getProperty

public String getProperty(String name)
Returns the value of a property.

Specified by:
getProperty in interface QSearchService
Parameters:
name - Property name
Returns:
Property value, possibly null

close

public void close()
Closes this service. If another thread is in the performQuery() method, then it will soon exit, even if results remain.

Specified by:
close in interface Closeable

performQuery

public boolean performQuery(QSession session)
Performs the search query using Atlas II. The user and system queries are retrieved from the session data, and results are added to the same structure.

Specified by:
performQuery in interface QSearchService
Parameters:
session - Session requesting the query
Returns:
True if query completed fully, false if query was interrupted with a close() call.

isClosed

public boolean isClosed()
Implementation of the Closeable interface. Returns true if this service has been closed, false otherwise.

Specified by:
isClosed in interface Closeable
Returns:
Closed state

translateConstraints

protected String translateConstraints(String original)
Performs a translation of the SQL_like query constraints replacing the generic keywords with Atlas-specific names.

Parameters:
original - SQL-string from a QueryConstraints instance
Returns:
Translated SQL-string with Atlas names