|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectome.services.fulltext.BridgeHelper
ome.services.fulltext.FullTextBridge
public class FullTextBridge
Primary definition of what will be indexed via Hibernate Search. This class
is delegated to by the DetailsFieldBridge
, and further delegates to
classes as defined under "SearchBridges".
Field Summary | |
---|---|
protected Class<org.hibernate.search.bridge.FieldBridge>[] |
classes
|
protected OriginalFilesService |
files
|
protected Map<String,FileParser> |
parsers
|
Fields inherited from class ome.services.fulltext.BridgeHelper |
---|
COMBINED, publisher |
Constructor Summary | |
---|---|
FullTextBridge()
Since this constructor provides the instance with no way of parsing OriginalFile binaries, all files will be assumed to have blank
content. |
|
FullTextBridge(OriginalFilesService files,
Map<String,FileParser> parsers)
Constructor which provides an empty set of custom bridges . |
|
FullTextBridge(OriginalFilesService files,
Map<String,FileParser> parsers,
Class<org.hibernate.search.bridge.FieldBridge>[] bridgeClasses)
Main constructor. |
Method Summary | |
---|---|
void |
set_annotations(String name,
ome.model.IObject object,
Document document,
Field.Store store,
Field.Index index,
Float boost)
Walks the various Annotation instances attached to the object
argument and adds various levels to the index. |
void |
set_custom(String name,
ome.model.IObject object,
Document document,
Field.Store store,
Field.Index index,
Float boost)
Loops over each field bridge class and calls its
FieldBridge#set(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float)
method. |
void |
set_details(String name,
ome.model.IObject object,
Document document,
Field.Store store,
Field.Index index,
Float boost)
Parses all ownership and time-based details to the index for the given object. |
void |
set_file(String name,
ome.model.IObject object,
Document document,
Field.Store store,
Field.Index index,
Float boost)
Uses #parse(OriginalFile) to get a Reader for the given
file which is then passed to
#add(Document, String, Reader, Float) using the field name
"file". |
void |
set(String name,
Object value,
Document document,
Field.Store store,
Field.Index index,
Float boost)
Default implementation of the #set(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float)
method which calls
#set_file(String, IObject, Document, Store, org.apache.lucene.document.Field.Index, Float)
#set_annotations(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float) ,
#set_details(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float) ,
and finally
#set_custom(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float) . |
Methods inherited from class ome.services.fulltext.BridgeHelper |
---|
add, addContents, logger, parse, reindex, reindexAll, setApplicationEventPublisher |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final OriginalFilesService files
protected final Map<String,FileParser> parsers
protected final Class<org.hibernate.search.bridge.FieldBridge>[] classes
Constructor Detail |
---|
public FullTextBridge()
OriginalFile
binaries, all files will be assumed to have blank
content. Further, no custom bridges are provided and so only the default
indexing will take place.
public FullTextBridge(OriginalFilesService files, Map<String,FileParser> parsers)
bridges
.
public FullTextBridge(OriginalFilesService files, Map<String,FileParser> parsers, Class<org.hibernate.search.bridge.FieldBridge>[] bridgeClasses)
files
- OriginalFileServce
for getting access to binary files.parsers
- List of FileParser
instances which are currently
configured.bridgeClasses
- set of bridge classes
which will be
instantiated via a no-arg constructor.Method Detail |
---|
public void set(String name, Object value, Document document, Field.Store store, Field.Index index, Float boost)
#set(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float)
method which calls
#set_file(String, IObject, Document, Store, org.apache.lucene.document.Field.Index, Float)
#set_annotations(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float)
,
#set_details(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float)
,
and finally
#set_custom(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float)
.
as well as all annotations
.
set
in interface org.hibernate.search.bridge.FieldBridge
set
in class BridgeHelper
public void set_file(String name, ome.model.IObject object, Document document, Field.Store store, Field.Index index, Float boost)
#parse(OriginalFile)
to get a Reader
for the given
file which is then passed to
#add(Document, String, Reader, Float)
using the field name
"file".
name
- object
- document
- store
- index
- boost
- public void set_annotations(String name, ome.model.IObject object, Document document, Field.Store store, Field.Index index, Float boost)
Annotation
instances attached to the object
argument and adds various levels to the index.
name
- object
- document
- store
- index
- boost
- public void set_details(String name, ome.model.IObject object, Document document, Field.Store store, Field.Index index, Float boost)
name
- object
- document
- store
- index
- boost
- public void set_custom(String name, ome.model.IObject object, Document document, Field.Store store, Field.Index index, Float boost)
field bridge class
and calls its
FieldBridge#set(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float)
method. Any exceptions are logged but do not cancel execution.
name
- object
- document
- store
- index
- boost
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: Beta-4.1.1-r5927-b91
Copyright © 2009 The University of Dundee. All Rights Reserved.