if (value == null) {
return null;
}
if (!NodeKey.isValidFormat(value)) {
// references should only be created from node keys
throw new ValueFormatException(value, getPropertyType(),
GraphI18n.unableToCreateValue.text(getPropertyType().getName(),
String.class.getSimpleName(),
value));
}
return new NodeKeyReference(new NodeKey(value), weak, false, simple);