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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<java.lang.String>
getCreatorDependencies()
Returns list of IndexCreator IDs that this creator depends on.java.lang.String
getId()
Returns IndexCreator ID, that has to be unique across all existing creators.java.util.Collection<IndexerField>
getIndexerFields()
Returns the indexer fields that this IndexCreator introduces to index.void
populateArtifactInfo(ArtifactContext artifactContext)
Populate anArtifactContext
with information about corresponding artifact.boolean
updateArtifactInfo(org.apache.lucene.document.Document document, ArtifactInfo artifactInfo)
Update anArtifactInfo
from given LuceneDocument
.void
updateDocument(ArtifactInfo artifactInfo, org.apache.lucene.document.Document document)
Update LuceneDocument
from a givenArtifactInfo
.
-
-
-
Method Detail
-
getId
java.lang.String getId()
Returns IndexCreator ID, that has to be unique across all existing creators.- Returns:
-
getCreatorDependencies
java.util.List<java.lang.String> 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
java.util.Collection<IndexerField> getIndexerFields()
Returns the indexer fields that this IndexCreator introduces to index.- Returns:
-
populateArtifactInfo
void populateArtifactInfo(ArtifactContext artifactContext) throws java.io.IOException
Populate anArtifactContext
with information about corresponding artifact.- Throws:
java.io.IOException
-
updateDocument
void updateDocument(ArtifactInfo artifactInfo, org.apache.lucene.document.Document document)
Update LuceneDocument
from a givenArtifactInfo
.
-
updateArtifactInfo
boolean updateArtifactInfo(org.apache.lucene.document.Document document, ArtifactInfo artifactInfo)
Update anArtifactInfo
from given LuceneDocument
.- Returns:
- true is artifact info has been updated
-
-