| Modifier | Constructor and Description |
|---|---|
protected |
ElementBase(Graph graph,
String id,
Visibility visibility,
Iterable<Property> properties,
Iterable<PropertyRemoveMutation> propertyRemoveMutations,
Iterable<Visibility> hiddenVisibilities,
Authorizations authorizations) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addHiddenVisibility(Visibility visibility) |
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.
|
boolean |
equals(Object obj) |
Authorizations |
getAuthorizations()
Gets the authorizations used to get this element.
|
Graph |
getGraph()
Gets the graph that this element belongs to.
|
Iterable<Visibility> |
getHiddenVisibilities() |
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.
|
Iterable<PropertyRemoveMutation> |
getPropertyRemoveMutations() |
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.
|
int |
hashCode() |
boolean |
isHidden(Authorizations authorizations)
Given the supplied authorizations is this element hidden?
|
protected String[] |
labelToArrayOrNull(String label) |
void |
markPropertyHidden(String key,
String name,
Visibility propertyVisibility,
Visibility visibility,
Authorizations authorizations)
Marks a property as hidden for a given visibility.
|
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.
|
protected void |
removeHiddenVisibility(Visibility visibility) |
abstract void |
removeProperty(String name,
Authorizations authorizations)
Removes all properties with the given name that you have access to.
|
abstract void |
removeProperty(String key,
String name,
Authorizations authorizations)
Removes a property given it's key and name from the element.
|
protected Iterable<Property> |
removePropertyInternal(String name) |
protected Property |
removePropertyInternal(String key,
String name) |
protected Property |
removePropertyInternal(String key,
String name,
Visibility visibility) |
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.
|
protected void |
setVisibility(Visibility visibility) |
String |
toString() |
protected void |
updatePropertiesInternal(Iterable<Property> properties,
Iterable<PropertyRemoveMutation> propertyRemoves) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitmarkPropertyHidden, markPropertyVisible, prepareMutationprotected ElementBase(Graph graph, String id, Visibility visibility, Iterable<Property> properties, Iterable<PropertyRemoveMutation> propertyRemoveMutations, Iterable<Visibility> hiddenVisibilities, Authorizations authorizations)
public Iterable<Object> getPropertyValues(String name)
ElementgetPropertyValues in interface Elementname - The name of the property to retrievepublic Iterable<Object> getPropertyValues(String key, String name)
ElementgetPropertyValues in interface Elementkey - The property keyname - The name of the property to retrievepublic Property getProperty(String name, Visibility visibility)
ElementgetProperty in interface Elementname - the name of the property.visibility - The visibility of the property to get.public Property getProperty(String key, String name, Visibility visibility)
ElementgetProperty in interface Elementkey - the key of the property.name - the name of the property.visibility - The visibility of the property to get.public Property getProperty(String key, String name)
ElementgetProperty in interface Elementkey - the key of the property.name - the name of the property.public Property getProperty(String name)
ElementgetProperty in interface Elementname - the name of the property.public Object getPropertyValue(String name)
ElementgetPropertyValue in interface Elementname - The name of the property to retrievepublic Object getPropertyValue(String name, int index)
ElementgetPropertyValue in interface Elementname - The name of the property to retrieve.index - The zero based index into the values.public Object getPropertyValue(String key, String name, int index)
ElementgetPropertyValue in interface Elementkey - The property keyname - The name of the property to retrieve.index - The zero based index into the values.public Object getPropertyValue(String key, String name)
ElementgetPropertyValue in interface Elementkey - The key of the propertyname - The name of the property to retrievepublic Visibility getVisibility()
ElementgetVisibility in interface Elementprotected void setVisibility(Visibility visibility)
public Iterable<Property> getProperties()
ElementgetProperties in interface Elementpublic Iterable<PropertyRemoveMutation> getPropertyRemoveMutations()
public Iterable<Property> getProperties(String name)
ElementgetProperties in interface Elementname - The name of the property to retrievepublic Iterable<Property> getProperties(String key, String name)
ElementgetProperties in interface Elementkey - The property keyname - The name of the property to retrieveprotected void updatePropertiesInternal(Iterable<Property> properties, Iterable<PropertyRemoveMutation> propertyRemoves)
protected Property removePropertyInternal(String key, String name, Visibility visibility)
public Graph getGraph()
Elementpublic abstract void removeProperty(String key, String name, Authorizations authorizations)
ElementremoveProperty in interface Elementkey - The property key.name - The property name.public void addPropertyValue(String key, String name, Object value, Visibility visibility, Authorizations authorizations)
ElementaddPropertyValue in interface Elementkey - 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.public void addPropertyValue(String key, String name, Object value, Metadata metadata, Visibility visibility, Authorizations authorizations)
ElementaddPropertyValue in interface Elementkey - 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.public void setProperty(String name, Object value, Visibility visibility, Authorizations authorizations)
ElementsetProperty in interface Elementname - The name of the property.value - The value of the property.visibility - The visibility to give this property.public void setProperty(String name, Object value, Metadata metadata, Visibility visibility, Authorizations authorizations)
ElementsetProperty in interface Elementname - 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.public void markPropertyHidden(String key, String name, Visibility propertyVisibility, Visibility visibility, Authorizations authorizations)
ElementmarkPropertyHidden in interface Elementkey - 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.public void markPropertyVisible(String key, String name, Visibility propertyVisibility, Visibility visibility, Authorizations authorizations)
ElementmarkPropertyVisible in interface Elementkey - 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.public abstract void removeProperty(String name, Authorizations authorizations)
ElementremoveProperty in interface Elementname - The name of the property to remove.public Authorizations getAuthorizations()
ElementgetAuthorizations in interface Elementpublic void mergeProperties(Element element)
ElementmergeProperties in interface Elementelement - The element to merge properties from.public Iterable<Visibility> getHiddenVisibilities()
public boolean isHidden(Authorizations authorizations)
Elementprotected void addHiddenVisibility(Visibility visibility)
protected void removeHiddenVisibility(Visibility visibility)
Copyright © 2014–2015. All rights reserved.