Package org.apache.maven.index.context
Class IndexUtils
- java.lang.Object
-
- org.apache.maven.index.context.IndexUtils
-
public class IndexUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
TIMESTAMP_FILE
-
Constructor Summary
Constructors Constructor Description IndexUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
close(java.io.InputStream is)
static void
close(java.io.OutputStream os)
static void
close(org.apache.lucene.index.IndexReader r)
static void
close(org.apache.lucene.index.IndexWriter w)
static void
close(org.apache.lucene.store.Directory d)
static void
close(org.apache.lucene.store.IndexInput in)
static void
close(org.apache.lucene.store.IndexOutput io)
static ArtifactInfo
constructArtifactInfo(org.apache.lucene.document.Document doc, IndexingContext context)
static void
copyDirectory(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target)
static boolean
copyFile(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target, java.lang.String name)
static boolean
copyFile(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target, java.lang.String srcName, java.lang.String targetName)
static void
delete(java.io.File indexDir)
static void
deleteTimestamp(org.apache.lucene.store.Directory directory)
static java.util.Date
getTimestamp(org.apache.lucene.store.Directory directory)
static org.apache.lucene.document.Document
updateDocument(org.apache.lucene.document.Document doc, IndexingContext context)
static org.apache.lucene.document.Document
updateDocument(org.apache.lucene.document.Document doc, IndexingContext context, boolean updateLastModified)
static org.apache.lucene.document.Document
updateDocument(org.apache.lucene.document.Document doc, IndexingContext context, boolean updateLastModified, ArtifactInfo ai)
static void
updateTimestamp(org.apache.lucene.store.Directory directory, java.util.Date timestamp)
-
-
-
Field Detail
-
TIMESTAMP_FILE
public static final java.lang.String TIMESTAMP_FILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
copyDirectory
public static void copyDirectory(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target) throws java.io.IOException
- Throws:
java.io.IOException
-
copyFile
public static boolean copyFile(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target, java.lang.String name) throws java.io.IOException
- Throws:
java.io.IOException
-
copyFile
public static boolean copyFile(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target, java.lang.String srcName, java.lang.String targetName) throws java.io.IOException
- Throws:
java.io.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 java.io.IOException
- Throws:
java.io.IOException
-
updateTimestamp
public static void updateTimestamp(org.apache.lucene.store.Directory directory, java.util.Date timestamp) throws java.io.IOException
- Throws:
java.io.IOException
-
getTimestamp
public static java.util.Date getTimestamp(org.apache.lucene.store.Directory directory)
-
close
public static void close(java.io.OutputStream os)
-
close
public static void close(java.io.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(java.io.File indexDir)
-
-