https://github.com/technige/geoff
Geoff reader/loader library
https://github.com/technige/geoff
Last synced: 23 days ago
JSON representation
Geoff reader/loader library
- Host: GitHub
- URL: https://github.com/technige/geoff
- Owner: technige
- License: apache-2.0
- Created: 2014-01-15T23:43:15.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-01-17T21:44:29.000Z (over 12 years ago)
- Last Synced: 2025-03-22T19:44:41.248Z (about 1 year ago)
- Language: Java
- Size: 1.65 MB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/nigelsmall/geoff)
# Geoff
[http://nigelsmall.com/geoff](http://nigelsmall.com/geoff)
##Usage
The code below gives a quick example of usage.
```java
// Set up a GeoffReader from any Reader object
GeoffReader geoffReader = new GeoffReader(reader);
// And a NeoLoader for a GraphDatabaseService
NeoLoader neoLoader = new NeoLoader(database);
// Iterate through the available subgraphs
while (geoffReader.hasMore()) {
// Read the subgraph
Subgraph subgraph = geoffReader.readSubgraph();
try (Transaction tx = database.beginTx()) {
// And load it into the database, returning the named nodes
Map nodes = neoLoader.load(subgraph);
// Maybe do something with the returned nodes here
// ...
tx.success();
}
}
```