public StreamingPropertyValueTableDataRef(String dataRowKey, StreamingPropertyValue propertyValue, long length) { super(propertyValue); this.dataRowKey = dataRowKey; this.valueType = propertyValue.getValueType(); this.length = length; }
@Override public String toString() { return "StreamingPropertyValue{" + "valueType=" + getValueType() + ", length=" + getLength() + '}'; } }
@SuppressWarnings("unchecked") @Override protected StreamingPropertyValue loadStreamingPropertyValue(StreamingPropertyValueRef<?> streamingPropertyValueRef, long timestamp) { return ((StreamingPropertyValueRef<SqlGraph>) streamingPropertyValueRef).toStreamingPropertyValue(graph, timestamp); } }
protected Class<?> getValueType(Object value) { Class<?> valueClass = value.getClass(); if (value instanceof StreamingPropertyValue) { valueClass = ((StreamingPropertyValue) value).getValueType(); } else if (value instanceof StreamingPropertyValueRef) { valueClass = ((StreamingPropertyValueRef) value).getValueType(); } return valueClass; }
public void update(Property property) { if (property.getHiddenVisibilities() != null) { for (Visibility v : property.getHiddenVisibilities()) { addHiddenVisibility(v); } } setValue(property.getValue()); setTimestamp(property.getTimestamp()); updateMetadata(property); } }
@Override @SuppressWarnings("unchecked") protected StreamingPropertyValueRef saveStreamingPropertyValue(String rowKey, Property property, StreamingPropertyValue propertyValue) { StreamingPropertyValueRef streamingPropertyValueRef = super.saveStreamingPropertyValue(rowKey, property, propertyValue); ((MutableProperty) property).setValue(streamingPropertyValueRef.toStreamingPropertyValue(AccumuloGraph.this, property.getTimestamp())); return streamingPropertyValueRef; } };
public static StreamingPropertyValue create(InputStream inputStream, Class type, Long length) { return new DefaultStreamingPropertyValue(inputStream, type, length); }
@Override public boolean isHidden(Authorizations authorizations) { if (hiddenVisibilities != null) { for (Visibility v : getHiddenVisibilities()) { if (authorizations.canRead(v)) { return true; } } } return false; }
@Override public String toString() { return "StreamingPropertyValue{" + "valueType=" + getValueType() + ", length=" + getLength() + '}'; } }
public StreamingPropertyValueTableDataRef(String dataRowKey, StreamingPropertyValue propertyValue, long length) { super(propertyValue); this.dataRowKey = dataRowKey; this.valueType = propertyValue.getValueType(); this.length = length; }
protected Class<?> getValueType(Object value) { Class<?> valueClass = value.getClass(); if (value instanceof StreamingPropertyValue) { valueClass = ((StreamingPropertyValue) value).getValueType(); } else if (value instanceof StreamingPropertyValueRef) { valueClass = ((StreamingPropertyValueRef) value).getValueType(); } return valueClass; }
public void update(Property property) { if (property.getHiddenVisibilities() != null) { for (Visibility v : property.getHiddenVisibilities()) { addHiddenVisibility(v); } } setValue(property.getValue()); setTimestamp(property.getTimestamp()); updateMetadata(property); } }
@Override @SuppressWarnings("unchecked") protected StreamingPropertyValueRef saveStreamingPropertyValue(String rowKey, Property property, StreamingPropertyValue propertyValue) { StreamingPropertyValueRef streamingPropertyValueRef = super.saveStreamingPropertyValue(rowKey, property, propertyValue); ((MutableProperty) property).setValue(streamingPropertyValueRef.toStreamingPropertyValue(AccumuloGraph.this, property.getTimestamp())); return streamingPropertyValueRef; } };
protected StreamingPropertyValue loadStreamingPropertyValue(StreamingPropertyValueRef<?> streamingPropertyValueRef, long timestamp) { // There's no need to have a Graph object for the pure in-memory implementation. Subclasses should override. return streamingPropertyValueRef.toStreamingPropertyValue(null, timestamp); }
public static StreamingPropertyValue create(InputStream inputStream, Class type) { return new DefaultStreamingPropertyValue(inputStream, type, null); }
@Override public boolean isHidden(Authorizations authorizations) { if (hiddenVisibilities != null) { for (Visibility v : getHiddenVisibilities()) { if (authorizations.canRead(v)) { return true; } } } return false; }
private boolean canEvaulate(Object first) { if (first instanceof String) { return true; } if (first instanceof GeoPoint) { return true; } if (first instanceof StreamingPropertyValue && ((StreamingPropertyValue) first).getValueType() == String.class) { return true; } return false; } }
public static StreamingPropertyValue create(InputStream inputStream, Class type) { return new DefaultStreamingPropertyValue(inputStream, type, null); }
private boolean canEvaulate(Object first) { if (first instanceof String) { return true; } if (first instanceof GeoPoint) { return true; } if (first instanceof StreamingPropertyValue && ((StreamingPropertyValue) first).getValueType() == String.class) { return true; } return false; } }
public static StreamingPropertyValue create(InputStream inputStream, Class type, Long length) { return new DefaultStreamingPropertyValue(inputStream, type, length); }