use of org.olat.search.service.document.file.IMSMetadataDocument in project openolat by klemens.
the class ScormRepositoryIndexer method createManifestDocument.
private Document createManifestDocument(VFSLeaf fManifest, Element rootElement, SearchResourceContext resourceContext) {
IMSMetadataDocument document = new IMSMetadataDocument();
document.setResourceUrl(resourceContext.getResourceUrl());
if (isLogDebugEnabled())
logDebug("MM: URL=" + document.getResourceUrl());
document.setLastChange(new Date(fManifest.getLastModified()));
document.setDocumentType(resourceContext.getDocumentType());
if (StringHelper.containsNonWhitespace(resourceContext.getTitle())) {
document.setTitle(resourceContext.getTitle());
} else {
document.setTitle(fManifest.getName());
}
document.setParentContextType(resourceContext.getParentContextType());
document.setParentContextName(resourceContext.getParentContextName());
StringBuilder sb = new StringBuilder();
collectLangString(sb, rootElement);
document.setContent(sb.toString());
return document.getLuceneDocument();
}
use of org.olat.search.service.document.file.IMSMetadataDocument in project OpenOLAT by OpenOLAT.
the class ScormRepositoryIndexer method createManifestDocument.
private Document createManifestDocument(VFSLeaf fManifest, Element rootElement, SearchResourceContext resourceContext) {
IMSMetadataDocument document = new IMSMetadataDocument();
document.setResourceUrl(resourceContext.getResourceUrl());
if (isLogDebugEnabled())
logDebug("MM: URL=" + document.getResourceUrl());
document.setLastChange(new Date(fManifest.getLastModified()));
document.setDocumentType(resourceContext.getDocumentType());
if (StringHelper.containsNonWhitespace(resourceContext.getTitle())) {
document.setTitle(resourceContext.getTitle());
} else {
document.setTitle(fManifest.getName());
}
document.setParentContextType(resourceContext.getParentContextType());
document.setParentContextName(resourceContext.getParentContextName());
StringBuilder sb = new StringBuilder();
collectLangString(sb, rootElement);
document.setContent(sb.toString());
return document.getLuceneDocument();
}
Aggregations