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.StringTIMESTAMP_FILE
-
Constructor Summary
Constructors Constructor Description IndexUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclose(java.io.InputStream is)static voidclose(java.io.OutputStream os)static voidclose(org.apache.lucene.index.IndexReader r)static voidclose(org.apache.lucene.index.IndexWriter w)static voidclose(org.apache.lucene.store.Directory d)static voidclose(org.apache.lucene.store.IndexInput in)static voidclose(org.apache.lucene.store.IndexOutput io)static ArtifactInfoconstructArtifactInfo(org.apache.lucene.document.Document doc, IndexingContext context)static voidcopyDirectory(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target)static booleancopyFile(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target, java.lang.String name)static booleancopyFile(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target, java.lang.String srcName, java.lang.String targetName)static voiddelete(java.io.File indexDir)static voiddeleteTimestamp(org.apache.lucene.store.Directory directory)static java.util.DategetTimestamp(org.apache.lucene.store.Directory directory)static org.apache.lucene.document.DocumentupdateDocument(org.apache.lucene.document.Document doc, IndexingContext context)static org.apache.lucene.document.DocumentupdateDocument(org.apache.lucene.document.Document doc, IndexingContext context, boolean updateLastModified)static org.apache.lucene.document.DocumentupdateDocument(org.apache.lucene.document.Document doc, IndexingContext context, boolean updateLastModified, ArtifactInfo ai)static voidupdateTimestamp(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)
-
-