public interface Element
| 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.
|
Authorizations |
getAuthorizations()
Gets the authorizations used to get this element.
|
Graph |
getGraph()
Gets the graph that this element belongs to.
|
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.
|
Visibility |
getVisibility()
the visibility of the element.
|
boolean |
isHidden(Authorizations authorizations)
Given the supplied authorizations is this element hidden?
|
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,
Visibility visibility,
Authorizations authorizations)
Marks a property as hidden for a given visibility.
|
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,
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 |
removeProperty(String name,
Authorizations authorizations)
Removes all properties with the given name that you have access to.
|
void |
removeProperty(String key,
String name,
Authorizations authorizations)
Removes a property given it's key and name from the element.
|
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.
|
String getId()
Visibility getVisibility()
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.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 removeProperty(String key, String name, Authorizations authorizations)
key - The property key.name - The property name.void removeProperty(String name, Authorizations authorizations)
name - The name of the property to remove.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(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 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(Property property, Visibility visibility, Authorizations authorizations)
property - The property.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.Copyright © 2014–2015. All rights reserved.