Package org.neo4j.graphdb

Examples of org.neo4j.graphdb.Transaction.finish()


          }         
        }     
      }
      tx.success();
    }finally{
      tx.finish();
    }
  } 
 
 
  public void calculateTopKLikesToCiteAuthors(int transactionThreshhold, int k){
View Full Code Here


          }
          if (topkCnt>=k)break;         
       
        if (++transactionCount % transactionThreshhold == 0){
          tx.success();
          tx.finish();
          tx = graphDB.beginTx();
          IOHelper.log(transactionCount + " nodes have been equipped with citedAuthor relations so far")
        }         
      }
      tx.success();
View Full Code Here

          IOHelper.log(transactionCount + " nodes have been equipped with citedAuthor relations so far")
        }         
      }
      tx.success();
    }finally{
      tx.finish();
    }
  } 
 
}
View Full Code Here

        if ( nodeCounter++ % 10000 == 9999){
          // New transactioon and print statistics
          IOHelper.log((nodeCounter-1) + " nodes added to search index.");
          transaction.success();
          transaction.finish();
          transaction = graphDB.beginTx();
          // REMOVE THIS
          // break;
        }
      }
View Full Code Here

      System.out.println("ERROR ABORTING");
      System.out.println(e.getMessage());
      transaction.failure();
     
    } finally {
      transaction.finish();
      System.out.println("Finished indexing.");
    }

    return searchIndex;
  }
View Full Code Here

    if (graphDB.index().existsForNodes(idxName)) {
      System.out.println("Deleting index:" + idxName);
      Transaction tx = graphDB.beginTx();
      graphDB.index().forNodes(idxName).delete();
      tx.success();
      tx.finish();
    }
  }

 
  public Index<Node> buildAutoCompleteIndex(String indexName){
View Full Code Here

            Integer cut = coCitationCount.get(coCitation);
            Double tanimotoScore = (cut*1.0) / (citationCount + citationCount1 - cut);
            coRel.setProperty(DBRelationshipProperties.CO_CITATION_SCORE, tanimotoScore);
            if (++transactionCount % transactionThreshhold == 0){
              tx.success();
              tx.finish();
              tx = graphDB.beginTx();
              IOHelper.log(transactionCount + " weighted coCitation relations have been inserted so far");
              System.out.println("current relations similartiy score is " +tanimotoScore);     
            }
          }
View Full Code Here

          }
        }
      }
      tx.success();
    }finally{
      tx.finish();
    }
    return true;
  }
 
 
View Full Code Here

              coRel.setProperty(DBRelationshipProperties.CO_CITATION_SCORE, tanimotoScore);
            }
          }
          if (++transactionCount % transactionThreshhold == 0){
            tx.success();
            tx.finish();
            tx = graphDB.beginTx();
            IOHelper.log(transactionCount + " papers have been equiped with coCitation relations so far");
          }

        }
View Full Code Here

        }
      }
      tx.success();
    }finally{
      tx.finish();
    }
    return true;
  }
 
  private boolean calculateBackLinks(int transactionThreshhold){
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.