gate.util.spring
Class FeatureMapFactoryBean
java.lang.Object
gate.util.spring.GateAwareObject
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FeatureMapFactoryBean
public FeatureMapFactoryBean()
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