gate.util.spring
Class FeatureMapFactoryBean

java.lang.Object
  extended by gate.util.spring.GateAwareObject
      extended by gate.util.spring.FeatureMapFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.FactoryBean

public class FeatureMapFactoryBean
extends GateAwareObject
implements org.springframework.beans.factory.FactoryBean

Spring FactoryBean to create a FeatureMap from a source Map (typically one created with a <map> element in a spring config file). Values in the source map whose type is Spring "Resource" are converted to URLs in the feature map (file: URLs if possible). If you are defining the source map inline (as opposed to ref-ing another bean) the following shorthand is available.

 <gate:feature-map>
   <entry key="kind" value="word" />
 </gate:feature-map>
 
The entry elements follow the same pattern as those in a <map> element in normal Spring configuration. See Init for an example of how to include the gate namespace.


Constructor Summary
FeatureMapFactoryBean()
           
 
Method Summary
 Object getObject()
           
 Class getObjectType()
           
 boolean isSingleton()
           
 void setSourceMap(Map<Object,Object> sourceMap)
           
 
Methods inherited from class gate.util.spring.GateAwareObject
ensureGateInit, setBeanFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureMapFactoryBean

public FeatureMapFactoryBean()
Method Detail

setSourceMap

public void setSourceMap(Map<Object,Object> sourceMap)

getObject

public Object getObject()
                 throws IOException
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean
Throws:
IOException

getObjectType

public Class getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean