public interface GraphNode
extends java.util.Map<java.lang.String,java.lang.Object>
GraphNode
represents a user in the social graph.Modifier and Type | Method and Description |
---|---|
Relationship |
createRelationshipTo(GraphNode other,
java.lang.String type)
Creates a relationship to the given node.
|
void |
delete()
Deletes this graph node and all outgoing relationships.
|
<T> T |
get(java.lang.String name,
java.lang.Class<T> type)
Get a named property and convert it into the given type.
|
<T> T |
get(java.lang.String name,
T defaultValue)
Get a named property and convert it into the given type.
|
java.lang.String |
getId()
Returns the id of this node.
|
Relationship |
getRelationship(Direction dir,
GraphNode node,
java.lang.String type)
Returns the relationship between this and the give node in the specified direction and type.
|
java.lang.Iterable<Relationship> |
getRelationships(Direction dir,
java.lang.String... types)
Returns the relationships attached to this node of the specific type and direction.
|
Resource |
getResource()
Returns the resource of object addressed by id or
null if it does not exist. |
boolean |
isVirtual()
Deprecated.
virtual nodes are no longer supported.
|
java.lang.String getId()
Resource getResource()
null
if it does not exist.@Deprecated boolean isVirtual()
true
if this node is virtual.Relationship createRelationshipTo(GraphNode other, java.lang.String type)
other
- the other nodetype
- the type of the relationshipjava.lang.IllegalArgumentException
- if the relationship already existsSocialGraphException
- if an error during this operation occurs.void delete()
java.lang.Iterable<Relationship> getRelationships(Direction dir, java.lang.String... types)
dir
- the directiontypes
- the types of relationships to return.Relationship getRelationship(Direction dir, GraphNode node, java.lang.String type)
dir
- direction of the relationship to returnnode
- the other nodetype
- the type of relationshipnull
<T> T get(java.lang.String name, java.lang.Class<T> type)
T
- the typename
- The name of the propertytype
- The class of the typenull
if
non existing or can't be converted.<T> T get(java.lang.String name, T defaultValue)
T
- the typename
- The name of the propertydefaultValue
- The default value to use if the named property does
not exist or cannot be converted to the requested type. The
default value is also used to define the type to convert the
value to. If this is null
any existing property is
not converted."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"