|
Esri Geoportal Server 1.0
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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.AimsContentTypes
ArcIMS content types |
static class |
SearchEngineCSW.Scheme
The Enum Scheme. |
static class |
SearchEngineCSW.SEARCH_OPERATION
The Enum SEARCH_OPERATION. |
Field Summary | |
---|---|
static String |
DATE_FORMAT
Date 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 idpublic void init() throws SearchException
ASearchEngine
init
in class ASearchEngine
SearchException
- the search exceptionprotected boolean readIsExternalSearch()
readIsExternalSearch
in class ASearchEngine
public void doSearch() throws SearchException
doSearch
in class ASearchEngine
SearchException
- thrown when error with search.public void doSearch(String cswRequest) throws SearchException
cswRequest
- the CSW request string.
SearchException
- if an exception occurspublic String getMetadataUrl(String uuid) throws SearchException
getMetadataUrl
in class ASearchEngine
uuid
- the uuid
SearchException
- the search exceptionpublic CswRecords parseResponse(String cswResponse) throws SearchException
cswResponse
- the input source associated with the CSW response XML
SearchException
- if an exception occursprotected CswRecords sendRequest(String cswRequest) throws SearchException
cswRequest
- the CSW XML request
SearchException
- the search exceptionpublic String getSearchQuery() throws SearchException
getSearchQuery
in class ASearchEngine
SearchException
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 exceptionprotected 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 exceptionpublic String getMetadataAsText(String uuid) throws SearchException
getMetadataAsText
in class ASearchEngine
uuid
- (Guid or uuid, method will not verify parameter)
SearchException
- the search exceptionprotected 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 ASearchEngine
uuid
- Uniquie id of the record
SearchException
public Map<String,Object> createInstances(StringSet rids) throws SearchException
createInstances
in class ASearchEngine
rids
-
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 |