@Deprecated
private void addValue(Document doc, ValueData value, InternalQName name, int propertyType)
throws ValueFormatException, IllegalStateException, RepositoryException
{
String fieldName = resolver.createJCRName(name).getAsString();
ExtendedValue val = null;
if (PropertyType.BINARY != propertyType)
val = (ExtendedValue) vFactory.loadValue(((AbstractValueData) value).createTransientCopy(), propertyType);
switch (propertyType)
{
case PropertyType.BINARY :
if (isIndexed(name))
{
addBinaryValue(doc, fieldName, value);
}
break;
case PropertyType.BOOLEAN :
if (isIndexed(name))
{
addBooleanValue(doc, fieldName, Boolean.valueOf(val.getBoolean()));
}
break;
case PropertyType.DATE :
if (isIndexed(name))
{
addCalendarValue(doc, fieldName, val.getDate());
}
break;
case PropertyType.DOUBLE :
if (isIndexed(name))
{
addDoubleValue(doc, fieldName, new Double(val.getDouble()));
}
break;
case PropertyType.LONG :
if (isIndexed(name))
{
addLongValue(doc, fieldName, new Long(val.getLong()));
}
break;
case PropertyType.REFERENCE :
if (isIndexed(name))
{
addReferenceValue(doc, fieldName, val.getString());
}
break;
case PropertyType.PATH :
if (isIndexed(name))
{
addPathValue(doc, fieldName, val.getString());
}
break;
case PropertyType.STRING :
if (isIndexed(name))
{
// never fulltext index jcr:uuid String
if (name.equals(Constants.JCR_UUID))
{
addStringValue(doc, fieldName, val.getString(), false, false, DEFAULT_BOOST);
}
else
{
addStringValue(doc, fieldName, val.getString(), true, isIncludedInNodeIndex(name),
getPropertyBoost(name));
}
}
break;
case PropertyType.NAME :
// jcr:primaryType and jcr:mixinTypes are required for correct
// node type resolution in queries
if (isIndexed(name) || name.equals(Constants.JCR_PRIMARYTYPE) || name.equals(Constants.JCR_MIXINTYPES))
{
addNameValue(doc, fieldName, val.getString());
}
break;
case ExtendedPropertyType.PERMISSION :
break;
default :