Hi Michael

Doesn't handle iterables (yet) but should be quite easy to add in. What
purpose did you have behind longs?

I've just committed a few new methods allowing the Neo4jNamespace returned
from a loadIntoNeo4j call to be used to retrieve new entities by name (or a
map of such). The new methods are:

public Node getPreexistingNode(String name)
public Map<String, Node> getPreexistingNodes(String... names)
public Node getNewlyCreatedNode(String name)
public Map<String, Node> getNewlyCreatedNodes(String... names)
public Relationship getPreexistingRelationship(String name)
public Map<String, Relationship> getPreexistingRelationships(String...
names)
public Relationship getNewlyCreatedRelationship(String name)
public Map<String, Relationship> getNewlyCreatedRelationships(String...
names)

One of the tests in GraphDescriptionTest illustrates simple usage, thus:

Neo4jNamespace ns = GEOFFLoader.loadIntoNeo4j(reader, db, hooks);
Node nodeFoo = ns.getNewlyCreatedNode("foo");
Node nodeBar = ns.getNewlyCreatedNode("bar");

Hope this helps - I'll have a play with iterables next.

Cheers

Nige

*Nigel Small*
Phone: +44 7814 638 246
Blog: http://nigelsmall.name/
GTalk: ni...@nigelsmall.name
MSN: nasm...@live.co.uk
Skype: technige
Twitter: @technige <https://twitter.com/#%21/technige>
LinkedIn: http://uk.linkedin.com/in/nigelsmall



On 29 November 2011 15:58, Michael Hunger
<michael.hun...@neotechnology.com>wrote:

> does it also handle iterables of nodes/rels (and probably Longs?)
>
> while thinking about it
> it would be great if the loader could also return a map of variables of
> the things generated to be used further in processing
>
> that could also interesting for cascading  geoff and/or cypher
>
> cool stuff big thanks
>
> michael
>
> mobile mail please excuse brevity and typos
>
> Am 29.11.2011 um 16:18 schrieb Peter Neubauer <
> peter.neuba...@neotechnology.com>:
>
> > That sounds great! Let me know when you are stable, and I will see if
> > I can do some more on the server plugin side, so we can shoot in
> > things there!
> >
> > Cheers,
> >
> > /peter neubauer
> >
> > GTalk:      neubauer.peter
> > Skype       peter.neubauer
> > Phone       +46 704 106975
> > LinkedIn   http://www.linkedin.com/in/neubauer
> > Twitter      http://twitter.com/peterneubauer
> >
> > http://www.neo4j.org              - NOSQL for the Enterprise.
> > http://startupbootcamp.org/    - Ă–resund - Innovation happens HERE.
> >
> >
> >
> > On Mon, Nov 28, 2011 at 9:52 PM, Nigel Small <ni...@nigelsmall.name>
> wrote:
> >> Hi Peter
> >>
> >> Bulk of the work is now done on the Java version of the GEOFF
> enhancements.
> >> There have been some significant changes to the classes and a number of
> >> extra tests inserted. The signature of the load method has now been
> >> extended to:
> >>
> >> public static Neo4jNamespace loadIntoNeo4j(Reader reader,
> >> GraphDatabaseService graphDB, Map<String, ? extends PropertyContainer>
> >> hooks)
> >>
> >> ...where the final parameter expects a Map full of names
> >> Nodes/Relationships which may then be referenced from within the GEOFF
> >> source.
> >>
> >> Let me know how you get on and give me a shout if I've forgotten
> anything
> >> :-)
> >>
> >> Cheers
> >>
> >> Nige
> >>
> >> *Nigel Small*
> >> Phone: +44 7814 638 246
> >> Blog: http://nigelsmall.name/
> >> GTalk: ni...@nigelsmall.name
> >> MSN: nasm...@live.co.uk
> >> Skype: technige
> >> Twitter: @technige <https://twitter.com/#%21/technige>
> >> LinkedIn: http://uk.linkedin.com/in/nigelsmall
> >>
> >>
> >>
> >> On 23 November 2011 10:12, Peter Neubauer <pe...@neubauer.se> wrote:
> >>
> >>> Looks great to me Nigel! I think this is a very good first step on
> >>> parameters. Let me know when you are done with the Java code, would
> >>> like to bring this into the @Graph annotations after our next
> >>> milestone release, 1.6.M01.
> >>>
> >>> /peter
> >>>
> >>> On Tue, Nov 22, 2011 at 10:14 PM, Nigel Small <ni...@nigelsmall.name>
> >>> wrote:
> >>>> Hi all
> >>>>
> >>>> I have just completed a set of GEOFF enhancements within py2neo (as
> yet
> >>>> only available from GitHub). Named parameters (hooks) and composite
> >>>> descriptors are now supported, please see the following sample file
> for
> >>> an
> >>>> illustration of the new capabilites:
> >>>>
> >>>>
> >>>
> https://github.com/nigelsmall/py2neo/blob/master/src/py2neo-examples/geoff/node-hooks.geoff
> >>>>
> >>>> In addition, a change has been made for index entries to use |foo|
> syntax
> >>>> instead of {foo} syntax as previously (although the old syntax will
> still
> >>>> work for now).
> >>>>
> >>>> Finally, there is a new wiki page detailing the current format in
> full:
> >>>>
> >>>> https://github.com/nigelsmall/py2neo/wiki/GEOFF
> >>>>
> >>>> I will now start planning the set of work required for the neo4j-geoff
> >>>> project to bring that up to the same level.
> >>>>
> >>>> Cheers
> >>>>
> >>>> Nige
> >>>>
> >>>> *Nigel Small*
> >>>> Phone: +44 7814 638 246
> >>>> Blog: http://nigelsmall.name/
> >>>> GTalk: ni...@nigelsmall.name
> >>>> MSN: nasm...@live.co.uk
> >>>> Skype: technige
> >>>> Twitter: @technige <https://twitter.com/#!/technige>
> >>>> LinkedIn: http://uk.linkedin.com/in/nigelsmall
> >>>> _______________________________________________
> >>>> Neo4j mailing list
> >>>> User@lists.neo4j.org
> >>>> https://lists.neo4j.org/mailman/listinfo/user
> >>>>
> >>> _______________________________________________
> >>> Neo4j mailing list
> >>> User@lists.neo4j.org
> >>> https://lists.neo4j.org/mailman/listinfo/user
> >>>
> >> _______________________________________________
> >> Neo4j mailing list
> >> User@lists.neo4j.org
> >> https://lists.neo4j.org/mailman/listinfo/user
> > _______________________________________________
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to