IndexDatabase.java revision 316
919N/A * See LICENSE.txt included in this distribution for the specific
919N/A * file and include the License file at LICENSE.txt.
public class IndexDatabase {
private boolean interrupted;
private boolean dirty;
initialize();
initialize();
public void run() {
} catch (Exception e) {
e.printStackTrace();
public void run() {
} catch (Exception e) {
e.printStackTrace();
throw new FileNotFoundException("Failed to create root directory [" + indexDir.getAbsolutePath() + "]");
throw new FileNotFoundException("Failed to create root directory [" + spellDir.getAbsolutePath() + "]");
interrupted = false;
while (uidIter.term() != null && uidIter.term().field().equals("u") && uidIter.term().text().startsWith(startuid)) {
removeFile();
} catch (IOException e) {
} catch (IOException e) {
optimize();
public void run() {
} catch (Exception e) {
e.printStackTrace();
public void run() {
} catch (Exception e) {
e.printStackTrace();
public void optimize() {
dirty = false;
} catch (IOException e) {
} catch (IOException e) {
public void createSpellingSuggestions() {
} catch (IOException e) {
} catch (IOException e) {
private void setDirty() {
if (!dirty) {
dirty = true;
} catch (Exception e) {
e.printStackTrace();
setDirty();
if (d != null) {
setDirty();
if (interrupted) {
String uid = Util.uid(path, DateTools.timeToString(file.lastModified(), DateTools.Resolution.MILLISECOND)); // construct uid for doc
removeFile();
public void interrupt() {
interrupted = true;
} catch (Exception e) {
} catch (Exception e) {
} catch (Exception e) {
} catch (Exception e) {
if (p != null) {
return null;
return ret;
if (this.project != other.project && (this.project == null || !this.project.equals(other.project))) {
public int hashCode() {
return hash;