org.ow2.weblab.service.normaliser.tika.metadatawriter
Class MappingDescriptionWithUnit

java.lang.Object
  extended by org.ow2.weblab.service.normaliser.tika.metadatawriter.MappingDescription
      extended by org.ow2.weblab.service.normaliser.tika.metadatawriter.MappingDescriptionWithUnit

public class MappingDescriptionWithUnit
extends MappingDescription

This subclass of MappingDescription allows to specify a unit that will be added at the end of the text value.

Author:
Frédéric Praca

Field Summary
 
Fields inherited from class org.ow2.weblab.service.normaliser.tika.metadatawriter.MappingDescription
logger
 
Constructor Summary
MappingDescriptionWithUnit(Property property, java.net.URI uri, java.lang.String unit)
          Constructor that take an additional parameter compared to its base class MappingDescription.
 
Method Summary
protected  void writeText(Metadata metadataToWrite, PoKHelper pokHelperToWriteInto, java.net.URI documentUri)
          This method defines how to write a Text metadata.
 
Methods inherited from class org.ow2.weblab.service.normaliser.tika.metadatawriter.MappingDescription
getAnnotation_URI, getPropertyLinked, write, writeDate, writeURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappingDescriptionWithUnit

public MappingDescriptionWithUnit(Property property,
                                  java.net.URI uri,
                                  java.lang.String unit)
Constructor that take an additional parameter compared to its base class MappingDescription. This parameter is simply a String object containing the unit that will be added at the end of the property value.

Parameters:
property - the Tika property to map
uri - The URI representing the mapping
unit - The unit used as String
Method Detail

writeText

protected void writeText(Metadata metadataToWrite,
                         PoKHelper pokHelperToWriteInto,
                         java.net.URI documentUri)
Description copied from class: MappingDescription
This method defines how to write a Text metadata. It's called from write and simply writes the text as is. It should only be overridden in subclasses that needs to modify or add some text value to the property.

Overrides:
writeText in class MappingDescription
Parameters:
metadataToWrite - Metadata set to write
pokHelperToWriteInto - PokHelper to write into
documentUri - The document URI that will be used for reference


Copyright © 2004-2012. All Rights Reserved.