Package org.neo4j.graphdb

Examples of org.neo4j.graphdb.Relationship


    @Path(UrlReverseLookerUpper.PATH_RELATIONSHIP_PROPERTY)
    @DeserializeWith(PropertyValueDeserializationStrategy.class)
    public void setRelationshipProperty(Invocation invocation, Output result)
            throws Exception
    {
        Relationship rel = invocation.getDB().getRelationshipById(getRelationshipId(invocation));
        rel.setProperty(getPropertyKey(invocation), invocation.getContent());
        result.okNoContent();
    }
View Full Code Here


    // be sure geomNode is inside this RTree
    Node indexNode = findLeafContainingGeometryNode(geomNode, throwExceptionIfNotFound);
    if (indexNode == null) return;
   
    // remove the entry
        final Relationship geometryRtreeReference = geomNode.getSingleRelationship(RTreeRelationshipTypes.RTREE_REFERENCE, Direction.INCOMING);
        if (geometryRtreeReference != null) {
            geometryRtreeReference.delete();
        }
    if (deleteGeomNode) deleteNode(geomNode);

    // reorganize the tree if needed
    if (countChildren(indexNode, RTreeRelationshipTypes.RTREE_REFERENCE) == 0) {
View Full Code Here

  }
 
  // returns the old parent node
  private Node disconnectFromParent()
  {
    Relationship toParentNode = treeNode.getSingleRelationship(
      RelTypes.SUB_TREE, Direction.INCOMING );
    Node parentNode = toParentNode.getStartNode();
    toParentNode.delete();
    return parentNode;
  }
View Full Code Here

    return treeNode.getBTree();
  }

  TreeNode getBeforeSubTree()
  {
    Relationship subTreeRel = getStartNode().getSingleRelationship(
      RelTypes.SUB_TREE, Direction.OUTGOING );
    if ( subTreeRel != null )
    {
      return new TreeNode( getBTree(),
        subTreeRel.getEndNode() );
    }
    return null;
  }
View Full Code Here

     
      // delete tree
      deleteRecursivelySubtree(indexRoot);
     
      // delete tree metadata
      Relationship metadataNodeRelationship = getRootNode().getSingleRelationship(RTreeRelationshipTypes.RTREE_METADATA, Direction.OUTGOING);
      Node metadataNode = metadataNodeRelationship.getEndNode();
      metadataNodeRelationship.delete();
      metadataNode.delete();
   
      tx.success();
    } finally {
      tx.finish();
View Full Code Here

    return null;
  }

  TreeNode getAfterSubTree()
  {
    Relationship subTreeRel = getEndNode().getSingleRelationship(
      RelTypes.SUB_TREE, Direction.OUTGOING );
    if ( subTreeRel != null )
    {
      return new TreeNode( getBTree(),
        subTreeRel.getEndNode() );
    }
    return null;
  }
View Full Code Here

      return false;
    }
  }
 
  private Node getIndexNodeParent(Node indexNode) {
    Relationship relationship = indexNode.getSingleRelationship(RTreeRelationshipTypes.RTREE_CHILD, Direction.INCOMING);
    if (relationship == null) return null;
    else return relationship.getStartNode();
 
View Full Code Here

    return count;
  }
 
  KeyEntry getFirstEntry()
  {
    Relationship keyEntryRel = treeNode.getSingleRelationship(
      RelTypes.KEY_ENTRY, Direction.OUTGOING );
    assert treeNode.getSingleRelationship( RelTypes.KEY_ENTRY,
      Direction.INCOMING ) == null;
    if ( keyEntryRel != null )
    {
View Full Code Here

    return null;
  }

  NodeEntry getNextKey()
  {
    Relationship nextKeyRel = getEndNode().getSingleRelationship(
      RelTypes.KEY_ENTRY, Direction.OUTGOING );
    if ( nextKeyRel != null )
    {
      return new NodeEntry( getTreeNode(), nextKeyRel );
    }
View Full Code Here

    return null;
  }
 
  KeyEntry getLastEntry()
  {
    Relationship keyEntryRel = treeNode.getSingleRelationship(
      RelTypes.KEY_ENTRY, Direction.OUTGOING );
    KeyEntry last = null;
    while ( keyEntryRel != null )
    {
      last = new KeyEntry( this, keyEntryRel );
      keyEntryRel = keyEntryRel.getEndNode().getSingleRelationship(
        RelTypes.KEY_ENTRY, Direction.OUTGOING );
    }
    return last;
  }
View Full Code Here

TOP

Related Classes of org.neo4j.graphdb.Relationship

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.