Class NodeUtilities

    • Constructor Detail

      • NodeUtilities

        public NodeUtilities()
    • 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:
      • getString

        public static String getString​(org.neo4j.graphdb.Node term,
                                       String property)