prop.getValues().size() > 0 ? prop.getValues() : ((PropertyData)stateProvider.getItemData(prop.getIdentifier())).getValues();
if (data == null)
log.warn("null value found at property " + prop.getQPath().getAsString());
ExtendedValue val = null;
InternalQName name = prop.getQPath().getName();
for (ValueData value : data)
{
val = (ExtendedValue)vFactory.loadValue(value, propType);
switch (propType)
{
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), useInExcerpt(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 :