ome.services.fulltext.bridges
Class ProjectWithImageNameBridge

java.lang.Object
  extended by ome.services.fulltext.BridgeHelper
      extended by ome.services.fulltext.bridges.ProjectWithImageNameBridge
All Implemented Interfaces:
org.hibernate.search.bridge.FieldBridge, org.springframework.context.ApplicationEventPublisherAware

public class ProjectWithImageNameBridge
extends BridgeHelper

Example custom FieldBridge implementation which parses all Image names from a Project and inserts them into the index for that Project.

Since:
3.0-Beta3
Author:
Josh Moore, josh at glencoesoftware.com

Field Summary
 
Fields inherited from class ome.services.fulltext.BridgeHelper
COMBINED, log, publisher
 
Constructor Summary
ProjectWithImageNameBridge()
           
 
Method Summary
 void set(String name, Object value, Document document, org.hibernate.search.bridge.LuceneOptions _opts)
          If the "value" argument is a Project, this bridge gathers all images and adds them to the index with a slightly reduced boost value.
 
Methods inherited from class ome.services.fulltext.BridgeHelper
add, addContents, getProxiedObject, logger, parse, reindex, reindexAll, setApplicationEventPublisher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectWithImageNameBridge

public ProjectWithImageNameBridge()
Method Detail

set

public void set(String name,
                Object value,
                Document document,
                org.hibernate.search.bridge.LuceneOptions _opts)
If the "value" argument is a Project, this bridge gathers all images and adds them to the index with a slightly reduced boost value. The field name of the image name is "image_name" but the values are also added to the BridgeHelper.COMBINED field via the #add(Document, String, String, org.apache.lucene.document.Field.Store, org.apache.lucene.document.Field.Index, Float) method.

Specified by:
set in interface org.hibernate.search.bridge.FieldBridge
Specified by:
set in class BridgeHelper


OmeroJava Api

Version: 4.3.3-00d1137e-b2894

Copyright © 2009 The University of Dundee. All Rights Reserved.