Class IndexUtils

java.lang.Object
org.apache.maven.index.context.IndexUtils

public class IndexUtils extends Object
  • Field Details

  • Constructor Details

    • IndexUtils

      public IndexUtils()
  • Method Details

    • copyDirectory

      public static void copyDirectory(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target) throws IOException
      Throws:
      IOException
    • copyFile

      public static boolean copyFile(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target, String name) throws IOException
      Throws:
      IOException
    • copyFile

      public static boolean copyFile(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target, String srcName, String targetName) throws IOException
      Throws:
      IOException
    • constructArtifactInfo

      public static ArtifactInfo constructArtifactInfo(org.apache.lucene.document.Document doc, IndexingContext context)
    • updateDocument

      public static org.apache.lucene.document.Document updateDocument(org.apache.lucene.document.Document doc, IndexingContext context)
    • updateDocument

      public static org.apache.lucene.document.Document updateDocument(org.apache.lucene.document.Document doc, IndexingContext context, boolean updateLastModified)
    • updateDocument

      public static org.apache.lucene.document.Document updateDocument(org.apache.lucene.document.Document doc, IndexingContext context, boolean updateLastModified, ArtifactInfo ai)
    • deleteTimestamp

      public static void deleteTimestamp(org.apache.lucene.store.Directory directory) throws IOException
      Throws:
      IOException
    • updateTimestamp

      public static void updateTimestamp(org.apache.lucene.store.Directory directory, Date timestamp) throws IOException
      Throws:
      IOException
    • getTimestamp

      public static Date getTimestamp(org.apache.lucene.store.Directory directory)
    • close

      public static void close(OutputStream os)
    • close

      public static void close(InputStream is)
    • close

      public static void close(org.apache.lucene.store.IndexOutput io)
    • close

      public static void close(org.apache.lucene.store.IndexInput in)
    • close

      public static void close(org.apache.lucene.index.IndexReader r)
    • close

      public static void close(org.apache.lucene.index.IndexWriter w)
    • close

      public static void close(org.apache.lucene.store.Directory d)
    • delete

      public static void delete(File indexDir)