public interface Element
| Modifier and Type | Field and Description |
|---|---|
static String |
ID_PROPERTY_NAME
Meta property name used for operations such as sorting
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyValue(String key,
String name,
Object value,
Metadata metadata,
Visibility visibility,
Authorizations authorizations)
Adds or updates a property.
|
void |
addPropertyValue(String key,
String name,
Object value,
Visibility visibility,
Authorizations authorizations)
Adds or updates a property.
|
void |
deleteProperties(String name,
Authorizations authorizations)
Permanently deletes all properties with the given name that you have access to.
|
void |
deleteProperty(String key,
String name,
Authorizations authorizations)
Permanently deletes a property given it's key and name from the element.
|
void |
deleteProperty(String key,
String name,
Visibility visibility,
Authorizations authorizations)
Permanently deletes a property given it's key and name from the element.
|
Authorizations |
getAuthorizations()
Gets the authorizations used to get this element.
|
Graph |
getGraph()
Gets the graph that this element belongs to.
|
Iterable<Visibility> |
getHiddenVisibilities()
Gets the list of hidden visibilities
|
Iterable<HistoricalPropertyValue> |
getHistoricalPropertyValues(Authorizations authorizations)
Gets all property values from all timestamps in descending timestamp order.
|
Iterable<HistoricalPropertyValue> |
getHistoricalPropertyValues(Long startTime,
Long endTime,
Authorizations authorizations)
Gets all property values from the given range of timestamps in descending timestamp order.
|
Iterable<HistoricalPropertyValue> |
getHistoricalPropertyValues(String key,
String name,
Visibility visibility,
Authorizations authorizations)
Gets property values from all timestamps in descending timestamp order.
|
Iterable<HistoricalPropertyValue> |
getHistoricalPropertyValues(String key,
String name,
Visibility visibility,
Long startTime,
Long endTime,
Authorizations authorizations)
Gets property values from the given range of timestamps in descending timestamp order.
|
String |
getId()
id of the element.
|
Iterable<Property> |
getProperties()
an Iterable of all the properties on this element that you have access to based on the authorizations
used to retrieve the element.
|
Iterable<Property> |
getProperties(String name)
an Iterable of all the properties with the given name on this element that you have access to based on the authorizations
used to retrieve the element.
|
Iterable<Property> |
getProperties(String key,
String name)
an Iterable of all the properties with the given name and key on this element that you have access to based on the authorizations
used to retrieve the element.
|
Property |
getProperty(String name)
Gets a property by name.
|
Property |
getProperty(String key,
String name)
Gets a property by key and name.
|
Property |
getProperty(String key,
String name,
Visibility visibility)
Gets a property by key, name, and visibility.
|
Property |
getProperty(String name,
Visibility visibility)
Gets a property by name, and visibility.
|
Object |
getPropertyValue(String name)
Convenience method to retrieve the first value of the property with the given name.
|
Object |
getPropertyValue(String name,
int index)
Gets the nth property value of the named property.
|
Object |
getPropertyValue(String key,
String name)
Convenience method to retrieve the first value of the property with the given name.
|
Object |
getPropertyValue(String key,
String name,
int index)
Gets the nth property value of the named property.
|
Iterable<Object> |
getPropertyValues(String name)
an Iterable of all the property values with the given name on this element that you have access to based on the authorizations
used to retrieve the element.
|
Iterable<Object> |
getPropertyValues(String key,
String name)
an Iterable of all the property values with the given name and key on this element that you have access to based on the authorizations
used to retrieve the element.
|
long |
getTimestamp()
The timestamp of when this element was updated.
|
Visibility |
getVisibility()
the visibility of the element.
|
boolean |
isHidden(Authorizations authorizations)
Given the supplied authorizations is this element hidden?
|
void |
markPropertyHidden(Property property,
Long timestamp,
Visibility visibility,
Authorizations authorizations)
Marks a property as hidden for a given visibility.
|
void |
markPropertyHidden(Property property,
Visibility visibility,
Authorizations authorizations)
Marks a property as hidden for a given visibility.
|
void |
markPropertyHidden(String key,
String name,
Visibility propertyVisibility,
Long timestamp,
Visibility visibility,
Authorizations authorizations)
Marks a property as hidden for a given visibility.
|
void |
markPropertyHidden(String key,
String name,
Visibility propertyVisibility,
Visibility visibility,
Authorizations authorizations)
Marks a property as hidden for a given visibility.
|
void |
markPropertyVisible(Property property,
Long timestamp,
Visibility visibility,
Authorizations authorizations)
Marks a property as visible for a given visibility, effectively undoing markPropertyHidden.
|
void |
markPropertyVisible(Property property,
Visibility visibility,
Authorizations authorizations)
Marks a property as visible for a given visibility, effectively undoing markPropertyHidden.
|
void |
markPropertyVisible(String key,
String name,
Visibility propertyVisibility,
Long timestamp,
Visibility visibility,
Authorizations authorizations)
Marks a property as visible for a given visibility, effectively undoing markPropertyHidden.
|
void |
markPropertyVisible(String key,
String name,
Visibility propertyVisibility,
Visibility visibility,
Authorizations authorizations)
Marks a property as visible for a given visibility, effectively undoing markPropertyHidden.
|
void |
mergeProperties(Element element)
Merge the given element's properties into this.
|
<T extends Element> |
prepareMutation()
Prepares a mutation to allow changing multiple property values at the same time.
|
void |
setProperty(String name,
Object value,
Metadata metadata,
Visibility visibility,
Authorizations authorizations)
Sets or updates a property value.
|
void |
setProperty(String name,
Object value,
Visibility visibility,
Authorizations authorizations)
Sets or updates a property value.
|
void |
softDeleteProperties(String name,
Authorizations authorizations)
Soft deletes all properties with the given name that you have access to.
|
void |
softDeleteProperty(String key,
String name,
Authorizations authorizations)
Soft deletes a property given it's key and name from the element.
|
void |
softDeleteProperty(String key,
String name,
Visibility visibility,
Authorizations authorizations)
Soft deletes a property given it's key and name from the element for a given visibility.
|
static final String ID_PROPERTY_NAME
String getId()
Visibility getVisibility()
long getTimestamp()
Iterable<Property> getProperties()
Property getProperty(String key, String name)
key - the key of the property.name - the name of the property.Property getProperty(String key, String name, Visibility visibility)
key - the key of the property.name - the name of the property.visibility - The visibility of the property to get.Iterable<HistoricalPropertyValue> getHistoricalPropertyValues(Authorizations authorizations)
Iterable<HistoricalPropertyValue> getHistoricalPropertyValues(Long startTime, Long endTime, Authorizations authorizations)
Iterable<HistoricalPropertyValue> getHistoricalPropertyValues(String key, String name, Visibility visibility, Authorizations authorizations)
key - the key of the property.name - the name of the property.visibility - The visibility of the property to get.Iterable<HistoricalPropertyValue> getHistoricalPropertyValues(String key, String name, Visibility visibility, Long startTime, Long endTime, Authorizations authorizations)
key - the key of the property.name - the name of the property.visibility - The visibility of the property to get.Property getProperty(String name, Visibility visibility)
name - the name of the property.visibility - The visibility of the property to get.Property getProperty(String name)
name - the name of the property.Iterable<Property> getProperties(String name)
name - The name of the property to retrieveIterable<Property> getProperties(String key, String name)
key - The property keyname - The name of the property to retrieveIterable<Object> getPropertyValues(String name)
name - The name of the property to retrieveIterable<Object> getPropertyValues(String key, String name)
key - The property keyname - The name of the property to retrieveObject getPropertyValue(String name)
name - The name of the property to retrieveObject getPropertyValue(String key, String name)
key - The key of the propertyname - The name of the property to retrieveObject getPropertyValue(String name, int index)
name - The name of the property to retrieve.index - The zero based index into the values.Object getPropertyValue(String key, String name, int index)
key - The property keyname - The name of the property to retrieve.index - The zero based index into the values.<T extends Element> ExistingElementMutation<T> prepareMutation()
void deleteProperty(String key, String name, Authorizations authorizations)
key - The property key.name - The property name.void deleteProperty(String key, String name, Visibility visibility, Authorizations authorizations)
key - The property key.name - The property name.visibility - The property visibility.void deleteProperties(String name, Authorizations authorizations)
name - The name of the property to delete.void softDeleteProperty(String key, String name, Authorizations authorizations)
key - The property key.name - The property name.void softDeleteProperty(String key, String name, Visibility visibility, Authorizations authorizations)
key - The property key.name - The property name.visibility - The visibility string of the property to soft delete.void softDeleteProperties(String name, Authorizations authorizations)
name - The name of the property to delete.Graph getGraph()
void addPropertyValue(String key, String name, Object value, Visibility visibility, Authorizations authorizations)
key - The unique key given to the property allowing for multi-valued properties.name - The name of the property.value - The value of the property.visibility - The visibility to give this property.void addPropertyValue(String key, String name, Object value, Metadata metadata, Visibility visibility, Authorizations authorizations)
key - The unique key given to the property allowing for multi-valued properties.name - The name of the property.value - The value of the property.metadata - The metadata to assign to this property.visibility - The visibility to give this property.void setProperty(String name, Object value, Visibility visibility, Authorizations authorizations)
name - The name of the property.value - The value of the property.visibility - The visibility to give this property.void setProperty(String name, Object value, Metadata metadata, Visibility visibility, Authorizations authorizations)
name - The name of the property.value - The value of the property.metadata - The metadata to assign to this property.visibility - The visibility to give this property.Authorizations getAuthorizations()
void mergeProperties(Element element)
element - The element to merge properties from.void markPropertyHidden(String key, String name, Visibility propertyVisibility, Visibility visibility, Authorizations authorizations)
key - The key of the property.name - The name of the property.propertyVisibility - The visibility of the property.visibility - The visibility string under which this property is hidden.
This visibility can be a superset of the property visibility to mark
it as hidden for only a subset of authorizations.authorizations - The authorizations used.void markPropertyHidden(String key, String name, Visibility propertyVisibility, Long timestamp, Visibility visibility, Authorizations authorizations)
key - The key of the property.name - The name of the property.propertyVisibility - The visibility of the property.timestamp - The timestamp.visibility - The visibility string under which this property is hidden.
This visibility can be a superset of the property visibility to mark
it as hidden for only a subset of authorizations.authorizations - The authorizations used.void markPropertyHidden(Property property, Visibility visibility, Authorizations authorizations)
property - The property.visibility - The visibility string under which this property is hidden.
This visibility can be a superset of the property visibility to mark
it as hidden for only a subset of authorizations.authorizations - The authorizations used.void markPropertyHidden(Property property, Long timestamp, Visibility visibility, Authorizations authorizations)
property - The property.timestamp - The timestamp.visibility - The visibility string under which this property is hidden.
This visibility can be a superset of the property visibility to mark
it as hidden for only a subset of authorizations.authorizations - The authorizations used.void markPropertyVisible(String key, String name, Visibility propertyVisibility, Visibility visibility, Authorizations authorizations)
key - The key of the property.name - The name of the property.propertyVisibility - The visibility of the property.visibility - The visibility string under which this property is now visible.authorizations - The authorizations used.void markPropertyVisible(String key, String name, Visibility propertyVisibility, Long timestamp, Visibility visibility, Authorizations authorizations)
key - The key of the property.name - The name of the property.propertyVisibility - The visibility of the property.timestamp - The timestamp.visibility - The visibility string under which this property is now visible.authorizations - The authorizations used.void markPropertyVisible(Property property, Visibility visibility, Authorizations authorizations)
property - The property.visibility - The visibility string under which this property is now visible.authorizations - The authorizations used.void markPropertyVisible(Property property, Long timestamp, Visibility visibility, Authorizations authorizations)
property - The property.timestamp - The timestamp.visibility - The visibility string under which this property is now visible.authorizations - The authorizations used.boolean isHidden(Authorizations authorizations)
authorizations - the authorizations to check against.Iterable<Visibility> getHiddenVisibilities()
Copyright © 2014–2017. All rights reserved.