*/
public SearchResultRecord readAsSearchResult(
ResourceLinkBuilder resourceLinkBuilder, boolean isExternal, String rid)
throws SearchException {
SearchResultRecord searchResultRecord = new SearchResultRecord();
searchResultRecord.setAbstract(this.getAbstractData());
searchResultRecord.setTitle(this.getTitle());
searchResultRecord.setExternal(isExternal);
searchResultRecord.setExternalId(rid);
// marshall envelopes
searchResultRecord.setEnvelope(this.getEnvelope());
// marshall id
searchResultRecord.setUuid(this.getId());
try {
searchResultRecord.setModifiedDate(
this.getModifiedDateAsDateObject("yyyy-MM-dd'T'HH:mm:ssZ")
);
} catch (Exception e) {
LOG.log(Level.INFO, "Could not set modfied time on record "
+ searchResultRecord.getUuid());
}
if(resourceLinkBuilder == null) {
throw new SearchException(new NullPointerException("ResourceLinkBuilder "
+ "object in search engine is null"));
}
searchResultRecord.getObjectMap().put(KEY_LINK_INFO, this.getLinks());
searchResultRecord.getObjectMap().put(KEY_TYPES, this.getTypes());
searchResultRecord.getObjectMap().put(KEY_REFERENCES, this.getReferences());
searchResultRecord.setDefaultGeometry(this.isDefaultGeometry());
resourceLinkBuilder.build(this, searchResultRecord);
return searchResultRecord;