| 
 | Esri Geoportal Server 1.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.gpt.catalog.search.ASearchEngine
com.esri.gpt.catalog.search.SearchEngineCSW
public class SearchEngineCSW
The class SearchEngineCSW. Accesses a CSW repository to send searTch and parse back results. works closely with the csw client jar. Parameters that can be used are "url" and "profileId".
| Nested Class Summary | |
|---|---|
| static class | SearchEngineCSW.AimsContentTypesArcIMS content types | 
| static class | SearchEngineCSW.SchemeThe Enum Scheme. | 
| static class | SearchEngineCSW.SEARCH_OPERATIONThe Enum SEARCH_OPERATION. | 
| Field Summary | |
|---|---|
| static String | DATE_FORMATDate format used by csw | 
| static String | KEY_LINK_INFO | 
| static String | KEY_REFERENCES | 
| static String | KEY_TYPES | 
| Constructor Summary | |
|---|---|
| protected  | SearchEngineCSW()Instantiates a new search DAOCSW. | 
|   | SearchEngineCSW(RequestContext context)constructors ============================================================ | 
| Method Summary | |
|---|---|
|  Map<String,Object> | createInstances(StringSet rids)Creates instances | 
|  void | doSearch()Performs search. | 
|  void | doSearch(String cswRequest)Performs a search using a supplied CSW request string. | 
|  CswCatalogCapabilities | getCapabilities()Gets the capabilities. | 
|  CswClient | getCswClient()Gets the csw client. | 
| protected  CswProfile | getCswProfile()Gets the csw profile. | 
|  String | getGetCapabiltiesUrl()Gets the gets the capabilties url. | 
|  String | getGetMetadataRecordUrl()Gets the gets the metadata record url. | 
|  String | getGetRecordsUrl()Gets the get records request url. | 
| protected  CswRecord | getMetadata(String uuid)Gets the metadata as a csw client api record. | 
|  SearchResultRecord | getMetadataAsSearchResultRecord(String uuid)Gets metadata as search result record | 
|  String | getMetadataAsText(String uuid)Gets the metadata as text. | 
|  String | getMetadataUrl(String uuid)Gets the metadata url for get record by Id. | 
|  String | getProfileId()Gets the profile id. | 
|  String | getSearchQuery()Returns the search query for the search operation | 
|  void | init()Inits the Object after you have set the properties. | 
|  CswSearchCriteria | marshallGptToCswClientCriteria(SearchCriteria gptSearchCriteria)Marshall gpt to csw client criteria. | 
| static CswSearchCriteria | marshallGptToCswClientCriteria2(SearchCriteria gptSearchCriteria)Marshall gpt to csw client criteria. | 
| protected  SearchResultRecord | marshallRecord(CswRecord cswRecord)Marshall record. | 
| protected  void | marshallRecords(CswRecords cswRecords)Marshall CSW client records and gpt search records. | 
|  CswRecords | parseResponse(String cswResponse)Parses the CSW response. | 
| protected  boolean | readIsExternalSearch()Tells us if the search is external to GPT9 or Internal | 
| protected  CswRecords | sendRequest(String cswRequest)Sends a CSW GetRecords request to CSW service. | 
|  void | setCapabilities(CswCatalogCapabilities capabilities)Sets the capabilities. | 
|  void | setCswClient(CswClient cswClient)Sets the csw client. | 
|  void | setGetCapabiltiesUrl(String getCapabiltiesUrl)Sets the gets the capabilties url. | 
|  void | setGetMetadataRecordUrl(String getMetadataRecordUrl)Sets the gets the metadata record url. | 
|  void | setGetRecordsUrl(String postRequestUrl)Sets the get records request url. | 
|  void | setProfileId(String profileId)Sets the profile id. | 
| static String | transformGptToCswRequest(SearchCriteria criteria,
                         SearchEngineCSW.SEARCH_OPERATION operation)Transform GPT criteria to CSW request. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String DATE_FORMAT
public static final String KEY_LINK_INFO
public static final String KEY_REFERENCES
public static final String KEY_TYPES
| Constructor Detail | 
|---|
public SearchEngineCSW(RequestContext context)
protected SearchEngineCSW()
| Method Detail | 
|---|
public CswCatalogCapabilities getCapabilities()
public void setCapabilities(CswCatalogCapabilities capabilities)
capabilities - the new capabilitiespublic String getGetMetadataRecordUrl()
public void setGetMetadataRecordUrl(String getMetadataRecordUrl)
getMetadataRecordUrl - the new gets the metadata record urlpublic String getGetCapabiltiesUrl()
public void setGetCapabiltiesUrl(String getCapabiltiesUrl)
getCapabiltiesUrl - the new gets the capabilties urlpublic String getGetRecordsUrl()
public void setGetRecordsUrl(String postRequestUrl)
                      throws SearchException
postRequestUrl - the new post request url
SearchException - the search exceptionpublic CswClient getCswClient()
public void setCswClient(CswClient cswClient)
cswClient - the new csw clientpublic String getProfileId()
public void setProfileId(String profileId)
profileId - the new profile id
public void init()
          throws SearchException
ASearchEngine
init in class ASearchEngineSearchException - the search exceptionprotected boolean readIsExternalSearch()
readIsExternalSearch in class ASearchEngine
public void doSearch()
              throws SearchException
doSearch in class ASearchEngineSearchException - thrown when error with search.
public void doSearch(String cswRequest)
              throws SearchException
cswRequest - the CSW request string.
SearchException - if an exception occurs
public String getMetadataUrl(String uuid)
                      throws SearchException
getMetadataUrl in class ASearchEngineuuid - the uuid
SearchException - the search exception
public CswRecords parseResponse(String cswResponse)
                         throws SearchException
cswResponse - the input source associated with the CSW response XML
SearchException - if an exception occurs
protected CswRecords sendRequest(String cswRequest)
                          throws SearchException
cswRequest - the CSW XML request
SearchException - the search exception
public String getSearchQuery()
                      throws SearchException
getSearchQuery in class ASearchEngineSearchException
public static String transformGptToCswRequest(SearchCriteria criteria,
                                              SearchEngineCSW.SEARCH_OPERATION operation)
                                       throws SearchException
criteria - the criteriaoperation - Type of operation to be appended into DOM.
SearchException - the search exception
protected void marshallRecords(CswRecords cswRecords)
                        throws SearchException
cswRecords - the CSW records
SearchException
protected SearchResultRecord marshallRecord(CswRecord cswRecord)
                                     throws SearchException
cswRecord - the csw record
SearchException
protected CswProfile getCswProfile()
                            throws SearchException
SearchException - the search exception
public String getMetadataAsText(String uuid)
                         throws SearchException
getMetadataAsText in class ASearchEngineuuid - (Guid or uuid, method will not verify parameter)
SearchException - the search exception
protected CswRecord getMetadata(String uuid)
                         throws SearchException
uuid - the uuid
SearchException - the search exceptionpublic static CswSearchCriteria marshallGptToCswClientCriteria2(SearchCriteria gptSearchCriteria)
gptSearchCriteria - the gpt search criteria
public CswSearchCriteria marshallGptToCswClientCriteria(SearchCriteria gptSearchCriteria)
gptSearchCriteria - the gpt search criteria
public SearchResultRecord getMetadataAsSearchResultRecord(String uuid)
                                                   throws SearchException
getMetadataAsSearchResultRecord in class ASearchEngineuuid - Uniquie id of the record
SearchException
public Map<String,Object> createInstances(StringSet rids)
                                   throws SearchException
createInstances in class ASearchEnginerids - 
SearchException - (Currently does not throw an excpetion)| 
 | Esri Geoportal Server 1.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||