Package lumis.content.bigdata
Class ContentTableSourceBigDataPersister
- java.lang.Object
-
- lumis.doui.bigdata.TabularSourceBigDataPersister<ContentTableSource>
-
- lumis.content.bigdata.ContentTableSourceBigDataPersister
-
- All Implemented Interfaces:
IContentTableSourceBigDataPersister
,ISourceBigDataPersister<ContentTableSource>
- Direct Known Subclasses:
AnnouncementBigDataPersister
,DocumentBigDataPersister
,HierarchicalContentBigDataPersister
,LinkBigDataPersister
,MediaBigDataPersister
,MessageBigDataPersister
,UserPostBigDataPersister
@StableMinor(version="17.0", sinceVersion="10.0") public class ContentTableSourceBigDataPersister extends TabularSourceBigDataPersister<ContentTableSource> implements IContentTableSourceBigDataPersister
Default big data persister implementation forContentTableSource
.- Since:
- 8.1.0
- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Constructor Description ContentTableSourceBigDataPersister()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addContextDocuments(java.lang.String sourceId, java.lang.String contextId)
Adds alldocuments
corresponding to the given source and context to the portal big data repository.protected void
addDocumentPublications(StandardDocument standardDocument, ContentTableSource source, ISourceData data)
Generates and adds the publications to be used as the value forStandardDocumentType#FIELD_PUBLICATIONS
.void
deleteDocumentsByContentId(ContentTableSource source, java.lang.String contentId)
Deletesdocuments
from the portal big data repository that corresponds to a content.protected java.util.Collection<? extends ContentVersionDocument>
generateDocuments(ContentTableSource source, ISourceData data)
Generates the documents to be stored for a given source data.protected IDocumentTypeBuilder<? extends ContentVersionDocumentType>
generateDocumentType(ContentTableSource source)
Generates the document type definition for documents relative to the specified source.
The default implementation generates a document type using as identifier the result ofTabularSourceBigDataPersister.getDocumentTypeId(S)
and this document type contains a field, with identifier of the result ofTabularSourceBigDataPersister.getDocumentTypeFieldId(S)
, that holds the source fields' values.protected java.util.Collection<? extends KnowledgeStandardDocument>
generateKnowledgeDocuments(java.util.Collection<? extends Document> searchDocuments, ContentTableSource source, ISourceData data)
Returns the documents used by chat assistant created from the given search documents.protected java.util.Collection<java.lang.String>
getPublishedPrincipalIds(ContentTableSource source, ISourceData row)
Returns the published principal identifiers to composepublications
that will be added toStandardDocumentType#FIELD_PUBLICATIONS
.-
Methods inherited from class lumis.doui.bigdata.TabularSourceBigDataPersister
addDocumentPublications, addDocuments, addDocuments, addDocuments, deleteBigData, deleteContextDocuments, deleteDocuments, deleteDocuments, generateDocumentPublishedContextURL, getDocumentPopularity, getDocumentTypeFieldId, getDocumentTypeId, getServiceSource, initBigData, updateBigData
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface lumis.doui.bigdata.ISourceBigDataPersister
addDocuments, addDocuments, deleteBigData, deleteContextDocuments, deleteDocuments, deleteDocuments, initBigData, updateBigData
-
-
-
-
Method Detail
-
generateDocumentType
protected IDocumentTypeBuilder<? extends ContentVersionDocumentType> generateDocumentType(ContentTableSource source)
Description copied from class:TabularSourceBigDataPersister
Generates the document type definition for documents relative to the specified source.
The default implementation generates a document type using as identifier the result ofTabularSourceBigDataPersister.getDocumentTypeId(S)
and this document type contains a field, with identifier of the result ofTabularSourceBigDataPersister.getDocumentTypeFieldId(S)
, that holds the source fields' values.- Overrides:
generateDocumentType
in classTabularSourceBigDataPersister<ContentTableSource>
- Parameters:
source
- the source.- Returns:
- the document type.
- See Also:
TabularSourceBigDataPersister.getDocumentTypeId(S)
,TabularSourceBigDataPersister.getDocumentTypeFieldId(S)
-
deleteDocumentsByContentId
public void deleteDocumentsByContentId(ContentTableSource source, java.lang.String contentId)
Description copied from interface:IContentTableSourceBigDataPersister
Deletesdocuments
from the portal big data repository that corresponds to a content.- Specified by:
deleteDocumentsByContentId
in interfaceIContentTableSourceBigDataPersister
- Parameters:
source
- the source.contentId
- the content identifier.
-
addContextDocuments
public void addContextDocuments(java.lang.String sourceId, java.lang.String contextId)
Description copied from interface:ISourceBigDataPersister
Adds alldocuments
corresponding to the given source and context to the portal big data repository.This method is usually called when re-indexing a source after its documents have been deleted.
- Specified by:
addContextDocuments
in interfaceISourceBigDataPersister<ContentTableSource>
- Overrides:
addContextDocuments
in classTabularSourceBigDataPersister<ContentTableSource>
- Parameters:
sourceId
- the source identifier.contextId
- the context identifier. Usually a service or service instance identifier.
-
generateDocuments
protected java.util.Collection<? extends ContentVersionDocument> generateDocuments(ContentTableSource source, ISourceData data)
Description copied from class:TabularSourceBigDataPersister
Generates the documents to be stored for a given source data.The default implementations of
addDocuments
methods call this method to generate the documents to be added.- Overrides:
generateDocuments
in classTabularSourceBigDataPersister<ContentTableSource>
- Parameters:
source
- the source.data
- the source data.- Returns:
- a collection of documents to be added for the given data.
- See Also:
#generateDocumentPublications(TabularSource, ISourceData)
-
generateKnowledgeDocuments
protected java.util.Collection<? extends KnowledgeStandardDocument> generateKnowledgeDocuments(java.util.Collection<? extends Document> searchDocuments, ContentTableSource source, ISourceData data)
Description copied from class:TabularSourceBigDataPersister
Returns the documents used by chat assistant created from the given search documents.- Overrides:
generateKnowledgeDocuments
in classTabularSourceBigDataPersister<ContentTableSource>
- Parameters:
searchDocuments
- the search documentssource
- the sourcedata
- the source data- Returns:
- the documents used by chat assistant created from the given search documents.
-
addDocumentPublications
protected void addDocumentPublications(StandardDocument standardDocument, ContentTableSource source, ISourceData data)
Description copied from class:TabularSourceBigDataPersister
Generates and adds the publications to be used as the value forStandardDocumentType#FIELD_PUBLICATIONS
.This method is called by
TabularSourceBigDataPersister.generateDocuments(TabularSource, ISourceData)
.- Overrides:
addDocumentPublications
in classTabularSourceBigDataPersister<ContentTableSource>
- Parameters:
standardDocument
- the document to add the publications.source
- the source the document is being generated for.data
- the source data the document is being generated for.
-
getPublishedPrincipalIds
protected java.util.Collection<java.lang.String> getPublishedPrincipalIds(ContentTableSource source, ISourceData row)
Description copied from class:TabularSourceBigDataPersister
Returns the published principal identifiers to composepublications
that will be added toStandardDocumentType#FIELD_PUBLICATIONS
.This method is called by
TabularSourceBigDataPersister.addDocumentPublications(StandardDocument, TabularSource, ISourceData, Collection)
.- Overrides:
getPublishedPrincipalIds
in classTabularSourceBigDataPersister<ContentTableSource>
- Parameters:
source
- the source that the generated document belongs to.row
- the row being processed.- Returns:
- published principal identifiers.
-
-