Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.owasp.dependencycheck.data.cpe
Class BaseIndex

    java.lang.Object
      org.owasp.dependencycheck.data.cpe.BaseIndex

Direct Known Subclasses:
  CpeIndexReader, CpeIndexWriter

    public abstract class BaseIndex

extends Object

The Base Index class used to access the CPE Index.

Author:
  Jeremy Long (jeremy.long@owasp.org)

Constructor Summary
`BaseIndex()`

Method Summary
`void` | `close()` Closes the CPE Index.
`static File` | `getDataDirectory()` Retrieves the directory that the JAR file exists in so that we can ensure we always use a common data directory.
`org.apache.lucene.store.Directory` | `getDirectory()` Gets the directory.
`boolean` | `isOpen()` Returns the status of the data source - is the index open.
`void` | `open()` Opens the CPE Index.
`protected org.apache.lucene.store.Directory` | `openDirectory()` Returns the Lucene directory object for the CPE Index.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BaseIndex

    public BaseIndex()

Method Detail

### getDirectory

    public org.apache.lucene.store.Directory getDirectory()

  Gets the directory.

  Returns:
    the directory

### open

    public void open()
              throws IOException

  Opens the CPE Index.

  Throws:
    `IOException` - is thrown if an IOException occurs opening the index.

### close

    public void close()

  Closes the CPE Index.

### isOpen

    public boolean isOpen()

  Returns the status of the data source - is the index open.

  Returns:
    true or false.

### openDirectory

    protected org.apache.lucene.store.Directory openDirectory()
                                                       throws IOException

  Returns the Lucene directory object for the CPE Index.

  Returns:
    the Lucene Directory object for the CPE Index.
  Throws:
    `IOException` - is thrown if an IOException occurs.

### getDataDirectory

    public static File getDataDirectory()
                                 throws IOException

  Retrieves the directory that the JAR file exists in so that we can ensure we always use a common data directory.

  Returns:
    the data directory for this index.
  Throws:
    `IOException` - is thrown if an IOException occurs of course...

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012-2013 OWASP. All Rights Reserved.