Class RepositoryIndexer

java.lang.Object
org.apache.maven.index.examples.indexing.RepositoryIndexer

public class RepositoryIndexer extends Object
This class provides means to index and search for artifacts in a repository on the file system.
Author:
mtodorov
  • Constructor Details

    • RepositoryIndexer

      public RepositoryIndexer()
  • Method Details

    • close

      public void close() throws IOException
      Throws:
      IOException
    • close

      public void close(boolean deleteFiles) throws IOException
      Throws:
      IOException
    • delete

      public void delete(Collection<org.apache.maven.index.ArtifactInfo> artifacts) throws IOException
      Throws:
      IOException
    • search

      public Set<org.apache.maven.index.ArtifactInfo> search(String groupId, String artifactId, String version, String packaging, String classifier) throws IOException
      Throws:
      IOException
    • search

      public Set<org.apache.maven.index.ArtifactInfo> search(String queryText) throws org.apache.lucene.queryparser.classic.ParseException, IOException
      Throws:
      org.apache.lucene.queryparser.classic.ParseException
      IOException
    • searchBySHA1

      public Set<org.apache.maven.index.ArtifactInfo> searchBySHA1(String checksum) throws IOException
      Throws:
      IOException
    • index

      public int index(File startingPath)
    • addArtifactToIndex

      public void addArtifactToIndex(File artifactFile, org.apache.maven.index.ArtifactInfo artifactInfo) throws IOException
      Throws:
      IOException
    • addArtifactToIndex

      public void addArtifactToIndex(String repository, File artifactFile, String groupId, String artifactId, String version, String extension, String classifier) throws IOException
      Throws:
      IOException
    • getIndexer

      public org.apache.maven.index.Indexer getIndexer()
    • setIndexer

      public void setIndexer(org.apache.maven.index.Indexer indexer)
    • getScanner

      public org.apache.maven.index.Scanner getScanner()
    • setScanner

      public void setScanner(org.apache.maven.index.Scanner scanner)
    • getIndexers

      public List<org.apache.maven.index.context.IndexCreator> getIndexers()
    • setIndexers

      public void setIndexers(List<org.apache.maven.index.context.IndexCreator> indexers)
    • getIndexingContext

      public org.apache.maven.index.context.IndexingContext getIndexingContext()
    • setIndexingContext

      public void setIndexingContext(org.apache.maven.index.context.IndexingContext indexingContext)
    • getRepositoryId

      public String getRepositoryId()
    • setRepositoryId

      public void setRepositoryId(String repositoryId)
    • getRepositoryBasedir

      public File getRepositoryBasedir()
    • setRepositoryBasedir

      public void setRepositoryBasedir(File repositoryBasedir)
    • getIndexDir

      public File getIndexDir()
    • setIndexDir

      public void setIndexDir(File indexDir)