path = URI_PREFIX + "/" + id;
url = new WebUrlImpl(site, path);
}
ResourceURI uri = new FileResourceURIImpl(site, path, id, version);
FileResourceSearchResultItemImpl result = new FileResourceSearchResultItemImpl(uri, url, relevance, site, metadata);
if (metadataMap.get(XML) != null)
result.setFileXml((String) metadataMap.get(XML).getValues().get(0));
if (metadataMap.get(HEADER_XML) != null)
result.setFileHeaderXml((String) metadataMap.get(HEADER_XML).getValues().get(0));
// TODO: Add remaining metadata
return result;
}