private void restoreStreamingPropertyValue(InputStream in, Graph graph, JSONObject propertyJson, Element element, Authorizations authorizations) throws ClassNotFoundException, IOException { String key = propertyJson.getString("key"); String name = propertyJson.getString("name"); Metadata metadata = jsonToPropertyMetadata(propertyJson.optJSONObject("metadata")); Visibility visibility = new Visibility(propertyJson.getString("visibility")); Class valueType = Class.forName(propertyJson.getString("valueType")); InputStream spvin = new StreamingPropertyValueInputStream(in); StreamingPropertyValue value = new StreamingPropertyValue(spvin, valueType); value.searchIndex(propertyJson.optBoolean("searchIndex", false)); value.store(propertyJson.optBoolean("store", true)); element.addPropertyValue(key, name, value, metadata, visibility, authorizations); }