|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectFRBRData
public class FRBRData
Keeps a large in-memory table of the title, author, and other info for each document.
Field Summary | |
---|---|
private static WeakHashMap |
cache
Cached data. |
IntMultiMap |
docTags
|
static int |
FIRST_TYPE
|
static int |
LAST_TYPE
|
IntMultiMap |
tagDocs
|
TagArray |
tags
|
static int |
TYPE_AUTHOR
|
static int |
TYPE_DATE
|
static int |
TYPE_ID
|
static int |
TYPE_TITLE
|
Constructor Summary | |
---|---|
private |
FRBRData(IndexReader reader,
String[] fields)
Read tags for a given set of fields from the given reader. |
Method Summary | |
---|---|
private int |
addTag(String term,
int type)
Add a tag for the given term and type. |
private int |
calcType(String field)
Calculate the type of a given field, based on the field name. |
static FRBRData |
getCachedTags(IndexReader reader,
String[] fields)
Retrieves tags for a given set of fields from a given reader. |
private int |
readField(IndexReader reader,
String field,
int type)
Read all the term->document mappings from a given field, and add them to the tag array, and docTags mapping. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static WeakHashMap cache
public static final int FIRST_TYPE
public static final int TYPE_TITLE
public static final int TYPE_AUTHOR
public static final int TYPE_DATE
public static final int TYPE_ID
public static final int LAST_TYPE
public final TagArray tags
public final IntMultiMap docTags
public final IntMultiMap tagDocs
Constructor Detail |
---|
private FRBRData(IndexReader reader, String[] fields) throws IOException
getCachedTags(IndexReader, String[])
.
IOException
Method Detail |
---|
public static FRBRData getCachedTags(IndexReader reader, String[] fields) throws IOException
reader
- Where to read the tags fromfields
- Which fields to read
IOException
private int readField(IndexReader reader, String field, int type) throws IOException
IOException
private int addTag(String term, int type)
term
- Term to parse and addtype
- Type to add the tag underprivate int calcType(String field) throws IOException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |