Package org.apache.maven.index.context
Interface IndexCreator
- All Known Implementing Classes:
AbstractIndexCreator,JarFileContentsIndexCreator,MavenArchetypeArtifactInfoIndexCreator,MavenPluginArtifactInfoIndexCreator,MinimalArtifactInfoIndexCreator,OsgiArtifactIndexCreator
public interface IndexCreator
An index creator is responsible for storing and reading data to and from Lucene index.
- Author:
- Jason van Zyl
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns list of IndexCreator IDs that this creator depends on.getId()Returns IndexCreator ID, that has to be unique across all existing creators.Returns the indexer fields that this IndexCreator introduces to index.voidpopulateArtifactInfo(ArtifactContext artifactContext) Populate anArtifactContextwith information about corresponding artifact.booleanupdateArtifactInfo(org.apache.lucene.document.Document document, ArtifactInfo artifactInfo) Update anArtifactInfofrom given LuceneDocument.voidupdateDocument(ArtifactInfo artifactInfo, org.apache.lucene.document.Document document) Update LuceneDocumentfrom a givenArtifactInfo.
-
Method Details
-
getId
String getId()Returns IndexCreator ID, that has to be unique across all existing creators.- Returns:
-
getCreatorDependencies
Returns list of IndexCreator IDs that this creator depends on. Needed to perform a topological sort on IndexCreators to guarantee proper ordering of them, as some IndexCreators might rely on informations already extracted by some other IndexCreator.- Returns:
-
getIndexerFields
Collection<IndexerField> getIndexerFields()Returns the indexer fields that this IndexCreator introduces to index.- Returns:
-
populateArtifactInfo
Populate anArtifactContextwith information about corresponding artifact.- Throws:
IOException
-
updateDocument
Update LuceneDocumentfrom a givenArtifactInfo. -
updateArtifactInfo
Update anArtifactInfofrom given LuceneDocument.- Returns:
- true is artifact info has been updated
-