// Convert first to a string ...
String strValue = typeSystem.getStringFactory().create(value);
jcrValue = factory.createValue(strValue);
} else if (value instanceof Node) {
try {
jcrValue = factory.createValue((Node)value);
} catch (RepositoryException e) {
throw new ValueFormatException(value, PropertyType.REFERENCE,
GraphI18n.errorConvertingType.text(Node.class.getSimpleName(),
Reference.class.getSimpleName(), value), e);
}