Class NodeUtilities
- java.lang.Object
-
- de.julielab.neo4j.plugins.auxiliaries.PropertyUtilities
-
- de.julielab.neo4j.plugins.auxiliaries.NodeUtilities
-
public class NodeUtilities extends PropertyUtilities
-
-
Constructor Summary
Constructors Constructor Description NodeUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.neo4j.graphdb.NodecopyNode(org.neo4j.graphdb.Transaction tx, org.neo4j.graphdb.Node source)static String[]getNodePropertyAsStringArrayValue(org.neo4j.graphdb.Node node, String property)Gets the string or string array value of property from node.static org.neo4j.graphdb.NodegetSingleNode(org.neo4j.graphdb.ResourceIterable<org.neo4j.graphdb.Node> iterable)Returns the only node contained in iterable or null, if no such node exists.static org.neo4j.graphdb.NodegetSingleNode(org.neo4j.graphdb.ResourceIterator<org.neo4j.graphdb.Node> iterator)static org.neo4j.graphdb.NodegetSingleOtherNode(org.neo4j.graphdb.Node node, org.neo4j.graphdb.RelationshipType type)static StringgetString(org.neo4j.graphdb.Node term, String property)-
Methods inherited from class de.julielab.neo4j.plugins.auxiliaries.PropertyUtilities
addToArrayProperty, addToArrayProperty, addToArrayProperty, copyObjectToEntity, copyObjectToEntity, copyObjectToEntity, findFirstValueInArrayProperty, getNodePropertiesAsString, getNonNullNodeProperty, hasContradictingPropertyValue, hasSamePropertyValue, mergeArrayProperty, mergeArrayProperty, mergeEntityIntoEntity, mergeObjectIntoEntity, mergeObjectIntoEntity, mergeProperties, setNonNullNodeProperty, setNonNullNodeProperty, setNonNullNodeProperty
-
-
-
-
Method Detail
-
getSingleNode
public static org.neo4j.graphdb.Node getSingleNode(org.neo4j.graphdb.ResourceIterable<org.neo4j.graphdb.Node> iterable)
Returns the only node contained in iterable or null, if no such node exists. If the iterable contains more than one node, an exception will be thrown.- Parameters:
iterable-- Returns:
- The only node in iterable or null if there is no node.
- Throws:
IllegalStateException- If iterable contains more than one node.
-
getSingleNode
public static org.neo4j.graphdb.Node getSingleNode(org.neo4j.graphdb.ResourceIterator<org.neo4j.graphdb.Node> iterator)
-
getSingleOtherNode
public static org.neo4j.graphdb.Node getSingleOtherNode(org.neo4j.graphdb.Node node, org.neo4j.graphdb.RelationshipType type)
-
copyNode
public static org.neo4j.graphdb.Node copyNode(org.neo4j.graphdb.Transaction tx, org.neo4j.graphdb.Node source)
-
getNodePropertyAsStringArrayValue
public static String[] getNodePropertyAsStringArrayValue(org.neo4j.graphdb.Node node, String property)
Gets the string or string array value of property from node. Always returns an array. If the value is a single string, it will be returned as array of size one, containing only this value.- Parameters:
node-property-- Returns:
-
-