Package com.esri.gpt.framework.search

Examples of com.esri.gpt.framework.search.SearchXslRecord


}

private SearchXslRecord getMetadataAsObjectX(String uuid) throws SearchException {
  SearchResultRecord record = new SearchResultRecord();
  String metaUrl = this.getMetadataUrl(uuid);
  SearchXslRecord recordX = null;

  URL url = null;
  Exception ex = null;
  try {
    url = new URL(metaUrl);

    HttpClientRequest clientRequest = HttpClientRequest.newRequest(
        HttpClientRequest.MethodName.GET, url.toExternalForm());
    clientRequest.setConnectionTimeMs(getConnectionTimeoutMs());
    clientRequest.setResponseTimeOutMs(getResponseTimeoutMs());
    clientRequest.execute();
    String response = clientRequest.readResponseAsCharacters();
    LOG.log(Level.FINER, "Response from get Metadata url = {0}\n response = \n{1}", new Object[]{url.toExternalForm(), response});
    recordX = new SearchXslRecord();
    this.readXslProfile().readGetMetadataByIDResponse(response, recordX);
  } catch (MalformedURLException e) {
    ex = e;
  } catch (IOException e) {
    ex = e;
View Full Code Here


        this.getKey());
}

@Override
public ARecord getARecord(String uuid) throws SearchException {
  final SearchXslRecord record = getMetadataAsObjectX(uuid);
  ARecord aRecord = new ARecord() {
    @Override
    public String getMetadataAsText() {
      return record.getFullMetadata();
    }

    @Override
    public Date getModifiedDate() {
      String modifedDateAsString = record.getModifiedDate();
      try {
        return new IsoDateFormat().parseObject(modifedDateAsString);
      } catch (ParseException ex) {
        return null;
      }
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.search.SearchXslRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.