|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.compass.core.converter.xsem.SimpleXmlValueConverter
org.compass.core.converter.xsem.ResourcePropertyValueConverter
public class ResourcePropertyValueConverter
An extension to simple xml value converter that delegates the toString(org.compass.core.xml.XmlObject, org.compass.core.mapping.ResourcePropertyMapping)
method to a ResourcePropertyConverter
which can normalize the string using
its ResourcePropertyConverter.fromString(String, org.compass.core.mapping.ResourcePropertyMapping)
and then ResourcePropertyConverter.toString(Object, org.compass.core.mapping.ResourcePropertyMapping)
.
Constructor Summary | |
---|---|
ResourcePropertyValueConverter(ResourcePropertyConverter converter)
|
Method Summary | |
---|---|
boolean |
canNormalize()
Returns true if this converter should be used to convert query parser related
values. |
Object |
fromString(String str,
ResourcePropertyMapping resourcePropertyMapping)
Converts from a String and into it's Object representation. |
Property.Index |
suggestIndex()
The converter can suggest what type of index will be used in case no index is configured. |
Boolean |
suggestOmitNorms()
The converter can suggest if norms should be saved for this type in case no explicit one is configured. |
Boolean |
suggestOmitTf()
The converter can suggest if tf should be saved for this type in case no explicit one is configured. |
Property.Store |
suggestStore()
The converter can suggest the store type for this type in case no explicit one is configured. |
Property.TermVector |
suggestTermVector()
The converter can suggest if term vectors should be saved for this type in case no explicit one is configured. |
String |
toString(Object o,
ResourcePropertyMapping resourcePropertyMapping)
Converts the Object into a String. |
String |
toString(XmlObject xmlObject,
ResourcePropertyMapping resourcePropertyMapping)
Normalizes the XmlObject.getValue() using the delegated
ResourcePropertyConverter.fromString(String, org.compass.core.mapping.ResourcePropertyMapping) ,
and then using toString(Object, org.compass.core.mapping.ResourcePropertyMapping) . |
Methods inherited from class org.compass.core.converter.xsem.SimpleXmlValueConverter |
---|
doSetBoost, getNullValue, handleNulls, marshall, unmarshall |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.compass.core.converter.Converter |
---|
marshall, unmarshall |
Constructor Detail |
---|
public ResourcePropertyValueConverter(ResourcePropertyConverter converter)
Method Detail |
---|
public String toString(XmlObject xmlObject, ResourcePropertyMapping resourcePropertyMapping)
XmlObject.getValue()
using the delegated
ResourcePropertyConverter.fromString(String, org.compass.core.mapping.ResourcePropertyMapping)
,
and then using toString(Object, org.compass.core.mapping.ResourcePropertyMapping)
.
toString
in class SimpleXmlValueConverter
public Object fromString(String str, ResourcePropertyMapping resourcePropertyMapping) throws ConversionException
ResourcePropertyConverter
fromString
in interface ResourcePropertyConverter
str
- The string to convert fromresourcePropertyMapping
- The resource property mapping
ConversionException
public String toString(Object o, ResourcePropertyMapping resourcePropertyMapping) throws ConversionException
ResourcePropertyConverter
Note that toString must be able to handle a null
resourcePropertyMapping.
toString
in interface ResourcePropertyConverter
o
- The Object to convert fromresourcePropertyMapping
- The resource proeprty mapping
ConversionException
public boolean canNormalize()
ResourcePropertyConverter
true
if this converter should be used to convert query parser related
values. Conversion is done by calling ResourcePropertyConverter.fromString(String, org.compass.core.mapping.ResourcePropertyMapping)
and then ResourcePropertyConverter.toString(Object, org.compass.core.mapping.ResourcePropertyMapping)
.
canNormalize
in interface ResourcePropertyConverter
public Property.Index suggestIndex()
ResourcePropertyConverter
null
and will let global Compass defaults to be used.
suggestIndex
in interface ResourcePropertyConverter
public Property.TermVector suggestTermVector()
ResourcePropertyConverter
null
and will let global Compass defaults to be used.
suggestTermVector
in interface ResourcePropertyConverter
public Property.Store suggestStore()
ResourcePropertyConverter
null
and will let global Compass defaults to be used.
suggestStore
in interface ResourcePropertyConverter
public Boolean suggestOmitNorms()
ResourcePropertyConverter
null
and will let global Compass defaults to be used.
suggestOmitNorms
in interface ResourcePropertyConverter
public Boolean suggestOmitTf()
ResourcePropertyConverter
null
and will let global Compass defaults to be used.
suggestOmitTf
in interface ResourcePropertyConverter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |