net.semanticmetadata.lire.impl
Class SimpleDocumentBuilder

java.lang.Object
  extended by net.semanticmetadata.lire.AbstractDocumentBuilder
      extended by net.semanticmetadata.lire.impl.SimpleDocumentBuilder
All Implemented Interfaces:
DocumentBuilder

public class SimpleDocumentBuilder
extends AbstractDocumentBuilder

This file is part of the Caliph and Emir project: http://www.SemanticMetadata.net
Date: 31.01.2006
Time: 23:02:52

Author:
Mathias Lux, mathias@juggle.at

Field Summary
 
Fields inherited from interface net.semanticmetadata.lire.DocumentBuilder
FIELD_NAME_AUTOCOLORCORRELOGRAM, FIELD_NAME_COLORLAYOUT, FIELD_NAME_EDGEHISTOGRAM, FIELD_NAME_IDENTIFIER, FIELD_NAME_SCALABLECOLOR, MAX_IMAGE_SIDE_LENGTH
 
Constructor Summary
SimpleDocumentBuilder(boolean scalableColor, boolean colorLayout, boolean edgeHistogram)
          Creates a new SimpleDocumentBuilder using the defined descriptors.
 
Method Summary
 org.apache.lucene.document.Document createDocument(java.awt.image.BufferedImage image, java.lang.String identifier)
          Creates a new Lucene document from a BufferedImage.
 
Methods inherited from class net.semanticmetadata.lire.AbstractDocumentBuilder
createDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDocumentBuilder

public SimpleDocumentBuilder(boolean scalableColor,
                             boolean colorLayout,
                             boolean edgeHistogram)
Creates a new SimpleDocumentBuilder using the defined descriptors. Please note that ColorLayoutImpl and ScalableColorImpl are quite fast while EdgeHistogramImplementation is quite slow.

Do not use this constructor yourself, use the DocumentBuilderFactory instead.

Parameters:
scalableColor - defines if ScalableColorImpl should be used.
colorLayout - defines if ColorLayoutImpl should be used.
edgeHistogram - defines if EdgeHistogramImplementation should be used.
See Also:
DocumentBuilderFactory
Method Detail

createDocument

public org.apache.lucene.document.Document createDocument(java.awt.image.BufferedImage image,
                                                          java.lang.String identifier)
Description copied from interface: DocumentBuilder
Creates a new Lucene document from a BufferedImage. The identifier can be used like an id (e.g. the file name or the url of the image)

Parameters:
image - the image to index. Cannot be NULL.
identifier - an id for the image, for instance the filename or an URL. Can be NULL.
Returns:
a Lucene Document containing the indexed image.