protected ElementBase( Graph graph, String id, Visibility visibility, Iterable<Property> properties, Iterable<PropertyRemoveMutation> propertyRemoveMutations, Iterable<Visibility> hiddenVisibilities, Authorizations authorizations ) { this.graph = graph; this.id = id; this.visibility = visibility; this.properties = new ConcurrentSkipListSet<>(); this.authorizations = authorizations; if (hiddenVisibilities != null) { for (Visibility v : hiddenVisibilities) { this.hiddenVisibilities.add(v); } } updatePropertiesInternal(properties, propertyRemoveMutations); }
protected ElementBase( Graph graph, String id, Visibility visibility, Iterable<Property> properties, Iterable<PropertyRemoveMutation> propertyRemoveMutations, Iterable<Visibility> hiddenVisibilities, Authorizations authorizations ) { this.graph = graph; this.id = id; this.visibility = visibility; this.properties = new ConcurrentSkipListSet<>(); this.authorizations = authorizations; if (hiddenVisibilities != null) { for (Visibility v : hiddenVisibilities) { this.hiddenVisibilities.add(v); } } updatePropertiesInternal(properties, propertyRemoveMutations); }
@Override protected void updatePropertiesInternal(Iterable<Property> properties, Iterable<PropertyRemoveMutation> propertyRemoveMutations) { try { for (Property property : properties) { if (property.getValue() instanceof StreamingPropertyValue) { StreamingPropertyValue value = (StreamingPropertyValue) property.getValue(); byte[] valueData = StreamUtils.toBytes(value.getInputStream()); ((MutableProperty) property).setValue(new InMemoryStreamingPropertyValue(valueData, value.getValueType())); } } super.updatePropertiesInternal(properties, propertyRemoveMutations); } catch (IOException ex) { throw new SecureGraphException(ex); } }