Are these nodes connected to the root node in any way? Also, how big
is your graph? If you have a big graph and disconnected nodes, then an
"show" index might be more efficient to maintain and iterate when you
need it than traversing the graph. Depends a big on your layout.
<daniel.ascha...@gmail.com> wrote:
> I have a graph where I want to copy a part of it starting from a root node.
> All subnode with a boolean value show=true should be included.
> Is there a simple way to do that or do I have to iterate throug the nodes
> and copy "by hand"?
Yes, there are connection between root and the other (sub)nodes, but there are nodes inbetween that as well have to be copied (and don't (need to) have a show=true property) How big the graph will become, let's say a few thousand nodes..
Daniel
Am Montag, 7. Mai 2012 10:21:38 UTC+2 schrieb Peter Neubauer:
> Are these nodes connected to the root node in any way? Also, how big > is your graph? If you have a big graph and disconnected nodes, then an > "show" index might be more efficient to maintain and iterate when you > need it than traversing the graph. Depends a big on your layout.
> If you can write, you can code - @coderdojomalmo > If you can sketch, you can use a graph database - @neo4j
> On Mon, May 7, 2012 at 10:06 AM, Daniel Aschauer > <daniel.ascha...@gmail.com> wrote: > > I have a graph where I want to copy a part of it starting from a root > node. > > All subnode with a boolean value show=true should be included.
> > Is there a simple way to do that or do I have to iterate throug the > nodes > > and copy "by hand"?
<daniel.ascha...@gmail.com> wrote:
> Thanks for your reply!
> Yes, there are connection between root and the other (sub)nodes, but there
> are nodes inbetween that as well have to be copied (and don't (need to) have
> a show=true property)
> How big the graph will become, let's say a few thousand nodes..
> Daniel
> Am Montag, 7. Mai 2012 10:21:38 UTC+2 schrieb Peter Neubauer:
>> Are these nodes connected to the root node in any way? Also, how big
>> is your graph? If you have a big graph and disconnected nodes, then an
>> "show" index might be more efficient to maintain and iterate when you
>> need it than traversing the graph. Depends a big on your layout.
>> If you can write, you can code - @coderdojomalmo
>> If you can sketch, you can use a graph database - @neo4j
>> On Mon, May 7, 2012 at 10:06 AM, Daniel Aschauer
>> <daniel.ascha...@gmail.com> wrote:
>> > I have a graph where I want to copy a part of it starting from a root
>> > node.
>> > All subnode with a boolean value show=true should be included.
>> > Is there a simple way to do that or do I have to iterate throug the
>> > nodes
>> > and copy "by hand"?
That is a solution I thought about as well. But wouldn't that produce a lot of overhead. The case is that a lot of these leaves (show=true) will be connected to a subnode -> so this gives me a lot of path that would contain the same (sub)nodes in between? Something cool would be the possibility to define a view on the graph to work with.
Thanks, Daniel
Am Montag, 7. Mai 2012 10:49:42 UTC+2 schrieb Peter Neubauer:
> If you can write, you can code - @coderdojomalmo > If you can sketch, you can use a graph database - @neo4j
> On Mon, May 7, 2012 at 10:38 AM, Daniel Aschauer > <daniel.ascha...@gmail.com> wrote: > > Thanks for your reply!
> > Yes, there are connection between root and the other (sub)nodes, but > there > > are nodes inbetween that as well have to be copied (and don't (need to) > have > > a show=true property) > > How big the graph will become, let's say a few thousand nodes..
> > Daniel
> > Am Montag, 7. Mai 2012 10:21:38 UTC+2 schrieb Peter Neubauer:
> >> Are these nodes connected to the root node in any way? Also, how big > >> is your graph? If you have a big graph and disconnected nodes, then an > >> "show" index might be more efficient to maintain and iterate when you > >> need it than traversing the graph. Depends a big on your layout.
> >> If you can write, you can code - @coderdojomalmo > >> If you can sketch, you can use a graph database - @neo4j
> >> On Mon, May 7, 2012 at 10:06 AM, Daniel Aschauer > >> <daniel.ascha...@gmail.com> wrote: > >> > I have a graph where I want to copy a part of it starting from a root > >> > node. > >> > All subnode with a boolean value show=true should be included.
> >> > Is there a simple way to do that or do I have to iterate throug the > >> > nodes > >> > and copy "by hand"?
Mmh,
with that amount of data that shouldn't be a problem, just pipe that
cypher into some export format (graphML or GEOFF) and use that do have
your derived graph read in?
<daniel.ascha...@gmail.com> wrote:
> That is a solution I thought about as well. But wouldn't that produce a lot
> of overhead.
> The case is that a lot of these leaves (show=true) will be connected to a
> subnode -> so this gives me a lot of path that would contain the same
> (sub)nodes in between?
> Something cool would be the possibility to define a view on the graph to
> work with.
> Thanks, Daniel
> Am Montag, 7. Mai 2012 10:49:42 UTC+2 schrieb Peter Neubauer:
>> In that case, I would just try to fish these paths out with a Cypher
>> query, something like
>> start root=node(0)
>> match path = root-[*1..]-node
>> where node.show = true
>> return path
>> which even gives you the paths and the nodes in between?
>> If you can write, you can code - @coderdojomalmo
>> If you can sketch, you can use a graph database - @neo4j
>> On Mon, May 7, 2012 at 10:38 AM, Daniel Aschauer
>> <daniel.ascha...@gmail.com> wrote:
>> > Thanks for your reply!
>> > Yes, there are connection between root and the other (sub)nodes, but
>> > there
>> > are nodes inbetween that as well have to be copied (and don't (need to)
>> > have
>> > a show=true property)
>> > How big the graph will become, let's say a few thousand nodes..
>> > Daniel
>> > Am Montag, 7. Mai 2012 10:21:38 UTC+2 schrieb Peter Neubauer:
>> >> Are these nodes connected to the root node in any way? Also, how big
>> >> is your graph? If you have a big graph and disconnected nodes, then an
>> >> "show" index might be more efficient to maintain and iterate when you
>> >> need it than traversing the graph. Depends a big on your layout.
>> >> If you can write, you can code - @coderdojomalmo
>> >> If you can sketch, you can use a graph database - @neo4j
>> >> On Mon, May 7, 2012 at 10:06 AM, Daniel Aschauer
>> >> <daniel.ascha...@gmail.com> wrote:
>> >> > I have a graph where I want to copy a part of it starting from a root
>> >> > node.
>> >> > All subnode with a boolean value show=true should be included.
>> >> > Is there a simple way to do that or do I have to iterate throug the
>> >> > nodes
>> >> > and copy "by hand"?
Good point, although I do copying now by collection nodes and relationships from all paths and copying their properties. However could be interesting to be able to directly export some cypher query results. How can this be done? I used the (com.tinkerpop.blueprints*)GraphMLWriter already, but there I have to provide a Graph? Thanks, Daniel
Am Montag, 7. Mai 2012 16:32:22 UTC+2 schrieb Peter Neubauer:
> Mmh, > with that amount of data that shouldn't be a problem, just pipe that > cypher into some export format (graphML or GEOFF) and use that do have > your derived graph read in?
> If you can write, you can code - @coderdojomalmo > If you can sketch, you can use a graph database - @neo4j
> On Mon, May 7, 2012 at 1:01 PM, Daniel Aschauer > <daniel.ascha...@gmail.com> wrote: > > That is a solution I thought about as well. But wouldn't that produce a > lot > > of overhead. > > The case is that a lot of these leaves (show=true) will be connected to > a > > subnode -> so this gives me a lot of path that would contain the same > > (sub)nodes in between? > > Something cool would be the possibility to define a view on the graph to > > work with.
> > Thanks, Daniel
> > Am Montag, 7. Mai 2012 10:49:42 UTC+2 schrieb Peter Neubauer:
> >> In that case, I would just try to fish these paths out with a Cypher > >> query, something like
> >> start root=node(0) > >> match path = root-[*1..]-node > >> where node.show = true > >> return path
> >> which even gives you the paths and the nodes in between?
> >> If you can write, you can code - @coderdojomalmo > >> If you can sketch, you can use a graph database - @neo4j
> >> On Mon, May 7, 2012 at 10:38 AM, Daniel Aschauer > >> <daniel.ascha...@gmail.com> wrote: > >> > Thanks for your reply!
> >> > Yes, there are connection between root and the other (sub)nodes, but > >> > there > >> > are nodes inbetween that as well have to be copied (and don't (need > to) > >> > have > >> > a show=true property) > >> > How big the graph will become, let's say a few thousand nodes..
> >> > Daniel
> >> > Am Montag, 7. Mai 2012 10:21:38 UTC+2 schrieb Peter Neubauer:
> >> >> Are these nodes connected to the root node in any way? Also, how big > >> >> is your graph? If you have a big graph and disconnected nodes, then > an > >> >> "show" index might be more efficient to maintain and iterate when > you > >> >> need it than traversing the graph. Depends a big on your layout.
> >> >> If you can write, you can code - @coderdojomalmo > >> >> If you can sketch, you can use a graph database - @neo4j
> >> >> On Mon, May 7, 2012 at 10:06 AM, Daniel Aschauer > >> >> <daniel.ascha...@gmail.com> wrote: > >> >> > I have a graph where I want to copy a part of it starting from a > root > >> >> > node. > >> >> > All subnode with a boolean value show=true should be included.
> >> >> > Is there a simple way to do that or do I have to iterate throug > the > >> >> > nodes > >> >> > and copy "by hand"?
<daniel.ascha...@gmail.com> wrote:
> Good point, although I do copying now by collection nodes and relationships
> from all paths and copying their properties.
> However could be interesting to be able to directly export some cypher query
> results. How can this be done?
> I used the (com.tinkerpop.blueprints*)GraphMLWriter already, but there I
> have to provide a Graph?
> Thanks,
> Daniel
> Am Montag, 7. Mai 2012 16:32:22 UTC+2 schrieb Peter Neubauer:
>> Mmh,
>> with that amount of data that shouldn't be a problem, just pipe that
>> cypher into some export format (graphML or GEOFF) and use that do have
>> your derived graph read in?
>> If you can write, you can code - @coderdojomalmo
>> If you can sketch, you can use a graph database - @neo4j
>> On Mon, May 7, 2012 at 1:01 PM, Daniel Aschauer
>> <daniel.ascha...@gmail.com> wrote:
>> > That is a solution I thought about as well. But wouldn't that produce a
>> > lot
>> > of overhead.
>> > The case is that a lot of these leaves (show=true) will be connected to
>> > a
>> > subnode -> so this gives me a lot of path that would contain the same
>> > (sub)nodes in between?
>> > Something cool would be the possibility to define a view on the graph to
>> > work with.
>> > Thanks, Daniel
>> > Am Montag, 7. Mai 2012 10:49:42 UTC+2 schrieb Peter Neubauer:
>> >> In that case, I would just try to fish these paths out with a Cypher
>> >> query, something like
>> >> start root=node(0)
>> >> match path = root-[*1..]-node
>> >> where node.show = true
>> >> return path
>> >> which even gives you the paths and the nodes in between?
>> >> If you can write, you can code - @coderdojomalmo
>> >> If you can sketch, you can use a graph database - @neo4j
>> >> On Mon, May 7, 2012 at 10:38 AM, Daniel Aschauer
>> >> <daniel.ascha...@gmail.com> wrote:
>> >> > Thanks for your reply!
>> >> > Yes, there are connection between root and the other (sub)nodes, but
>> >> > there
>> >> > are nodes inbetween that as well have to be copied (and don't (need
>> >> > to)
>> >> > have
>> >> > a show=true property)
>> >> > How big the graph will become, let's say a few thousand nodes..
>> >> > Daniel
>> >> > Am Montag, 7. Mai 2012 10:21:38 UTC+2 schrieb Peter Neubauer:
>> >> >> Are these nodes connected to the root node in any way? Also, how big
>> >> >> is your graph? If you have a big graph and disconnected nodes, then
>> >> >> an
>> >> >> "show" index might be more efficient to maintain and iterate when
>> >> >> you
>> >> >> need it than traversing the graph. Depends a big on your layout.
>> >> >> If you can write, you can code - @coderdojomalmo
>> >> >> If you can sketch, you can use a graph database - @neo4j
>> >> >> On Mon, May 7, 2012 at 10:06 AM, Daniel Aschauer
>> >> >> <daniel.ascha...@gmail.com> wrote:
>> >> >> > I have a graph where I want to copy a part of it starting from a
>> >> >> > root
>> >> >> > node.
>> >> >> > All subnode with a boolean value show=true should be included.
>> >> >> > Is there a simple way to do that or do I have to iterate throug
>> >> >> > the
>> >> >> > nodes
>> >> >> > and copy "by hand"?
It works fine already put all nodes/relationships from the pathes in
one Collection, and then copying their properties.
The only problem I'm still facing is that the index is not updated for
the copies - will have to use some lookup table which properties to
index.
Cheers, Daniel
2012/5/10 Peter Neubauer <peter.neuba...@neotechnology.com>:
> If you can write, you can code - @coderdojomalmo
> If you can sketch, you can use a graph database - @neo4j
> On Mon, May 7, 2012 at 5:00 PM, Daniel Aschauer
> <daniel.ascha...@gmail.com> wrote:
>> Good point, although I do copying now by collection nodes and relationships
>> from all paths and copying their properties.
>> However could be interesting to be able to directly export some cypher query
>> results. How can this be done?
>> I used the (com.tinkerpop.blueprints*)GraphMLWriter already, but there I
>> have to provide a Graph?
>> Thanks,
>> Daniel
>> Am Montag, 7. Mai 2012 16:32:22 UTC+2 schrieb Peter Neubauer:
>>> Mmh,
>>> with that amount of data that shouldn't be a problem, just pipe that
>>> cypher into some export format (graphML or GEOFF) and use that do have
>>> your derived graph read in?
>>> If you can write, you can code - @coderdojomalmo
>>> If you can sketch, you can use a graph database - @neo4j
>>> On Mon, May 7, 2012 at 1:01 PM, Daniel Aschauer
>>> <daniel.ascha...@gmail.com> wrote:
>>> > That is a solution I thought about as well. But wouldn't that produce a
>>> > lot
>>> > of overhead.
>>> > The case is that a lot of these leaves (show=true) will be connected to
>>> > a
>>> > subnode -> so this gives me a lot of path that would contain the same
>>> > (sub)nodes in between?
>>> > Something cool would be the possibility to define a view on the graph to
>>> > work with.
>>> > Thanks, Daniel
>>> > Am Montag, 7. Mai 2012 10:49:42 UTC+2 schrieb Peter Neubauer:
>>> >> In that case, I would just try to fish these paths out with a Cypher
>>> >> query, something like
>>> >> start root=node(0)
>>> >> match path = root-[*1..]-node
>>> >> where node.show = true
>>> >> return path
>>> >> which even gives you the paths and the nodes in between?
>>> >> If you can write, you can code - @coderdojomalmo
>>> >> If you can sketch, you can use a graph database - @neo4j
>>> >> On Mon, May 7, 2012 at 10:38 AM, Daniel Aschauer
>>> >> <daniel.ascha...@gmail.com> wrote:
>>> >> > Thanks for your reply!
>>> >> > Yes, there are connection between root and the other (sub)nodes, but
>>> >> > there
>>> >> > are nodes inbetween that as well have to be copied (and don't (need
>>> >> > to)
>>> >> > have
>>> >> > a show=true property)
>>> >> > How big the graph will become, let's say a few thousand nodes..
>>> >> > Daniel
>>> >> > Am Montag, 7. Mai 2012 10:21:38 UTC+2 schrieb Peter Neubauer:
>>> >> >> Are these nodes connected to the root node in any way? Also, how big
>>> >> >> is your graph? If you have a big graph and disconnected nodes, then
>>> >> >> an
>>> >> >> "show" index might be more efficient to maintain and iterate when
>>> >> >> you
>>> >> >> need it than traversing the graph. Depends a big on your layout.
>>> >> >> If you can write, you can code - @coderdojomalmo
>>> >> >> If you can sketch, you can use a graph database - @neo4j
>>> >> >> On Mon, May 7, 2012 at 10:06 AM, Daniel Aschauer
>>> >> >> <daniel.ascha...@gmail.com> wrote:
>>> >> >> > I have a graph where I want to copy a part of it starting from a
>>> >> >> > root
>>> >> >> > node.
>>> >> >> > All subnode with a boolean value show=true should be included.
>>> >> >> > Is there a simple way to do that or do I have to iterate throug
>>> >> >> > the
>>> >> >> > nodes
>>> >> >> > and copy "by hand"?
The problem a have is that I copy the Node objects with their properties, but I have to convert them somehow back to the according object (SDN annotated @NodeEntity) otherwise the repository methods and the index won't work? How can this be done?
Thanks, Daniel
Am Donnerstag, 10. Mai 2012 15:30:41 UTC+2 schrieb Peter Neubauer:
> If you can write, you can code - @coderdojomalmo > If you can sketch, you can use a graph database - @neo4j
> On Mon, May 7, 2012 at 5:00 PM, Daniel Aschauer > <daniel.ascha...@gmail.com> wrote: > > Good point, although I do copying now by collection nodes and > relationships > > from all paths and copying their properties. > > However could be interesting to be able to directly export some cypher > query > > results. How can this be done? > > I used the (com.tinkerpop.blueprints*)GraphMLWriter already, but there I > > have to provide a Graph? > > Thanks, > > Daniel
> > Am Montag, 7. Mai 2012 16:32:22 UTC+2 schrieb Peter Neubauer:
> >> Mmh, > >> with that amount of data that shouldn't be a problem, just pipe that > >> cypher into some export format (graphML or GEOFF) and use that do have > >> your derived graph read in?
> >> If you can write, you can code - @coderdojomalmo > >> If you can sketch, you can use a graph database - @neo4j
> >> On Mon, May 7, 2012 at 1:01 PM, Daniel Aschauer > >> <daniel.ascha...@gmail.com> wrote: > >> > That is a solution I thought about as well. But wouldn't that produce > a > >> > lot > >> > of overhead. > >> > The case is that a lot of these leaves (show=true) will be connected > to > >> > a > >> > subnode -> so this gives me a lot of path that would contain the same > >> > (sub)nodes in between? > >> > Something cool would be the possibility to define a view on the graph > to > >> > work with.
> >> > Thanks, Daniel
> >> > Am Montag, 7. Mai 2012 10:49:42 UTC+2 schrieb Peter Neubauer:
> >> >> In that case, I would just try to fish these paths out with a Cypher > >> >> query, something like
> >> >> If you can write, you can code - @coderdojomalmo > >> >> If you can sketch, you can use a graph database - @neo4j
> >> >> On Mon, May 7, 2012 at 10:38 AM, Daniel Aschauer > >> >> <daniel.ascha...@gmail.com> wrote: > >> >> > Thanks for your reply!
> >> >> > Yes, there are connection between root and the other (sub)nodes, > but > >> >> > there > >> >> > are nodes inbetween that as well have to be copied (and don't > (need > >> >> > to) > >> >> > have > >> >> > a show=true property) > >> >> > How big the graph will become, let's say a few thousand nodes..
> >> >> > Daniel
> >> >> > Am Montag, 7. Mai 2012 10:21:38 UTC+2 schrieb Peter Neubauer:
> >> >> >> Are these nodes connected to the root node in any way? Also, how > big > >> >> >> is your graph? If you have a big graph and disconnected nodes, > then > >> >> >> an > >> >> >> "show" index might be more efficient to maintain and iterate when > >> >> >> you > >> >> >> need it than traversing the graph. Depends a big on your layout.
> >> >> >> If you can write, you can code - @coderdojomalmo > >> >> >> If you can sketch, you can use a graph database - @neo4j
> >> >> >> On Mon, May 7, 2012 at 10:06 AM, Daniel Aschauer > >> >> >> <daniel.ascha...@gmail.com> wrote: > >> >> >> > I have a graph where I want to copy a part of it starting from > a > >> >> >> > root > >> >> >> > node. > >> >> >> > All subnode with a boolean value show=true should be included.
> >> >> >> > Is there a simple way to do that or do I have to iterate throug > >> >> >> > the > >> >> >> > nodes > >> >> >> > and copy "by hand"?
Right,
I suspect that you need to update the indexes that are attached to an
entity (maybe you can infer that from the annotations of the objects,
since the indexes have names reflecting those, MH knows more) and of
course create the corresponding graph data. Maybe you could examine
what exactly the raw node looks like that is backing an object, and
create it that way?
I think inferring the used indexes might be the tricky part, but not impossible.
<daniel.ascha...@gmail.com> wrote:
> The problem a have is that I copy the Node objects with their properties,
> but I have to convert them somehow back to the according object (SDN
> annotated @NodeEntity) otherwise the repository methods and the index won't
> work?
> How can this be done?
> Thanks, Daniel
> Am Donnerstag, 10. Mai 2012 15:30:41 UTC+2 schrieb Peter Neubauer:
>> If you can write, you can code - @coderdojomalmo
>> If you can sketch, you can use a graph database - @neo4j
>> On Mon, May 7, 2012 at 5:00 PM, Daniel Aschauer
>> <daniel.ascha...@gmail.com> wrote:
>> > Good point, although I do copying now by collection nodes and
>> > relationships
>> > from all paths and copying their properties.
>> > However could be interesting to be able to directly export some cypher
>> > query
>> > results. How can this be done?
>> > I used the (com.tinkerpop.blueprints*)GraphMLWriter already, but there I
>> > have to provide a Graph?
>> > Thanks,
>> > Daniel
>> > Am Montag, 7. Mai 2012 16:32:22 UTC+2 schrieb Peter Neubauer:
>> >> Mmh,
>> >> with that amount of data that shouldn't be a problem, just pipe that
>> >> cypher into some export format (graphML or GEOFF) and use that do have
>> >> your derived graph read in?
>> >> If you can write, you can code - @coderdojomalmo
>> >> If you can sketch, you can use a graph database - @neo4j
>> >> On Mon, May 7, 2012 at 1:01 PM, Daniel Aschauer
>> >> <daniel.ascha...@gmail.com> wrote:
>> >> > That is a solution I thought about as well. But wouldn't that produce
>> >> > a
>> >> > lot
>> >> > of overhead.
>> >> > The case is that a lot of these leaves (show=true) will be connected
>> >> > to
>> >> > a
>> >> > subnode -> so this gives me a lot of path that would contain the same
>> >> > (sub)nodes in between?
>> >> > Something cool would be the possibility to define a view on the graph
>> >> > to
>> >> > work with.
>> >> > Thanks, Daniel
>> >> > Am Montag, 7. Mai 2012 10:49:42 UTC+2 schrieb Peter Neubauer:
>> >> >> In that case, I would just try to fish these paths out with a Cypher
>> >> >> query, something like
>> >> >> If you can write, you can code - @coderdojomalmo
>> >> >> If you can sketch, you can use a graph database - @neo4j
>> >> >> On Mon, May 7, 2012 at 10:38 AM, Daniel Aschauer
>> >> >> <daniel.ascha...@gmail.com> wrote:
>> >> >> > Thanks for your reply!
>> >> >> > Yes, there are connection between root and the other (sub)nodes,
>> >> >> > but
>> >> >> > there
>> >> >> > are nodes inbetween that as well have to be copied (and don't
>> >> >> > (need
>> >> >> > to)
>> >> >> > have
>> >> >> > a show=true property)
>> >> >> > How big the graph will become, let's say a few thousand nodes..
>> >> >> > Daniel
>> >> >> > Am Montag, 7. Mai 2012 10:21:38 UTC+2 schrieb Peter Neubauer:
>> >> >> >> Are these nodes connected to the root node in any way? Also, how
>> >> >> >> big
>> >> >> >> is your graph? If you have a big graph and disconnected nodes,
>> >> >> >> then
>> >> >> >> an
>> >> >> >> "show" index might be more efficient to maintain and iterate when
>> >> >> >> you
>> >> >> >> need it than traversing the graph. Depends a big on your layout.
>> >> >> >> If you can write, you can code - @coderdojomalmo
>> >> >> >> If you can sketch, you can use a graph database - @neo4j
>> >> >> >> On Mon, May 7, 2012 at 10:06 AM, Daniel Aschauer
>> >> >> >> <daniel.ascha...@gmail.com> wrote:
>> >> >> >> > I have a graph where I want to copy a part of it starting from
>> >> >> >> > a
>> >> >> >> > root
>> >> >> >> > node.
>> >> >> >> > All subnode with a boolean value show=true should be included.
>> >> >> >> > Is there a simple way to do that or do I have to iterate throug
>> >> >> >> > the
>> >> >> >> > nodes
>> >> >> >> > and copy "by hand"?
You can call template.postEntityCreation(node,clazz) to add the necessary indices for the type information.
template.setPersistentState(object,node) // existing node
template.postEntityCreation(node,clazz) // store type information in graph
template.save(object) saves the properties of the object onto the node
> Right,
> I suspect that you need to update the indexes that are attached to an
> entity (maybe you can infer that from the annotations of the objects,
> since the indexes have names reflecting those, MH knows more) and of
> course create the corresponding graph data. Maybe you could examine
> what exactly the raw node looks like that is backing an object, and
> create it that way?
> I think inferring the used indexes might be the tricky part, but not impossible.
> If you can write, you can code - @coderdojomalmo
> If you can sketch, you can use a graph database - @neo4j
> On Fri, May 11, 2012 at 11:53 AM, Daniel Aschauer
> <daniel.ascha...@gmail.com> wrote:
>> The problem a have is that I copy the Node objects with their properties,
>> but I have to convert them somehow back to the according object (SDN
>> annotated @NodeEntity) otherwise the repository methods and the index won't
>> work?
>> How can this be done?
>> Thanks, Daniel
>> Am Donnerstag, 10. Mai 2012 15:30:41 UTC+2 schrieb Peter Neubauer:
>>> If you can write, you can code - @coderdojomalmo
>>> If you can sketch, you can use a graph database - @neo4j
>>> On Mon, May 7, 2012 at 5:00 PM, Daniel Aschauer
>>> <daniel.ascha...@gmail.com> wrote:
>>>> Good point, although I do copying now by collection nodes and
>>>> relationships
>>>> from all paths and copying their properties.
>>>> However could be interesting to be able to directly export some cypher
>>>> query
>>>> results. How can this be done?
>>>> I used the (com.tinkerpop.blueprints*)GraphMLWriter already, but there I
>>>> have to provide a Graph?
>>>> Thanks,
>>>> Daniel
>>>> Am Montag, 7. Mai 2012 16:32:22 UTC+2 schrieb Peter Neubauer:
>>>>> Mmh,
>>>>> with that amount of data that shouldn't be a problem, just pipe that
>>>>> cypher into some export format (graphML or GEOFF) and use that do have
>>>>> your derived graph read in?
>>>>> If you can write, you can code - @coderdojomalmo
>>>>> If you can sketch, you can use a graph database - @neo4j
>>>>> On Mon, May 7, 2012 at 1:01 PM, Daniel Aschauer
>>>>> <daniel.ascha...@gmail.com> wrote:
>>>>>> That is a solution I thought about as well. But wouldn't that produce
>>>>>> a
>>>>>> lot
>>>>>> of overhead.
>>>>>> The case is that a lot of these leaves (show=true) will be connected
>>>>>> to
>>>>>> a
>>>>>> subnode -> so this gives me a lot of path that would contain the same
>>>>>> (sub)nodes in between?
>>>>>> Something cool would be the possibility to define a view on the graph
>>>>>> to
>>>>>> work with.
>>>>>> Thanks, Daniel
>>>>>> Am Montag, 7. Mai 2012 10:49:42 UTC+2 schrieb Peter Neubauer:
>>>>>>> In that case, I would just try to fish these paths out with a Cypher
>>>>>>> query, something like
>>>>>>> start root=node(0)
>>>>>>> match path = root-[*1..]-node
>>>>>>> where node.show = true
>>>>>>> return path
>>>>>>> which even gives you the paths and the nodes in between?
>>>>>>> If you can write, you can code - @coderdojomalmo
>>>>>>> If you can sketch, you can use a graph database - @neo4j
>>>>>>> On Mon, May 7, 2012 at 10:38 AM, Daniel Aschauer
>>>>>>> <daniel.ascha...@gmail.com> wrote:
>>>>>>>> Thanks for your reply!
>>>>>>>> Yes, there are connection between root and the other (sub)nodes,
>>>>>>>> but
>>>>>>>> there
>>>>>>>> are nodes inbetween that as well have to be copied (and don't
>>>>>>>> (need
>>>>>>>> to)
>>>>>>>> have
>>>>>>>> a show=true property)
>>>>>>>> How big the graph will become, let's say a few thousand nodes..
>>>>>>>> Daniel
>>>>>>>> Am Montag, 7. Mai 2012 10:21:38 UTC+2 schrieb Peter Neubauer:
>>>>>>>>> Are these nodes connected to the root node in any way? Also, how
>>>>>>>>> big
>>>>>>>>> is your graph? If you have a big graph and disconnected nodes,
>>>>>>>>> then
>>>>>>>>> an
>>>>>>>>> "show" index might be more efficient to maintain and iterate when
>>>>>>>>> you
>>>>>>>>> need it than traversing the graph. Depends a big on your layout.
>>>>>>>>> If you can write, you can code - @coderdojomalmo
>>>>>>>>> If you can sketch, you can use a graph database - @neo4j
>>>>>>>>> On Mon, May 7, 2012 at 10:06 AM, Daniel Aschauer
>>>>>>>>> <daniel.ascha...@gmail.com> wrote:
>>>>>>>>>> I have a graph where I want to copy a part of it starting from
>>>>>>>>>> a
>>>>>>>>>> root
>>>>>>>>>> node.
>>>>>>>>>> All subnode with a boolean value show=true should be included.
>>>>>>>>>> Is there a simple way to do that or do I have to iterate throug
>>>>>>>>>> the
>>>>>>>>>> nodes
>>>>>>>>>> and copy "by hand"?
template.postEntityCreation(node,clazz) is deprecated.
As convert a Node to a @NodeEntity by this: Class<?> targettype = Class.forName((String) nRootNode.getProperty("__type__")); template.save(template.convert(nRootNode, targettype));
This works fine for some part, the node and the indices are created, but by using the repository method findAll these nodes are not included, why or what can be done to inlcude them?
I am using Sring data neo4j 2.0.1
Am Freitag, 11. Mai 2012 20:34:06 UTC+2 schrieb Michael Hunger:
> You can call template.postEntityCreation(node,clazz) to add the necessary > indices for the type information.
> template.setPersistentState(object,node) // existing node > template.postEntityCreation(node,clazz) // store type information in graph > template.save(object) saves the properties of the object onto the node
> HTH
> Michael
> Am 11.05.2012 um 14:24 schrieb Peter Neubauer:
> > Right, > > I suspect that you need to update the indexes that are attached to an > > entity (maybe you can infer that from the annotations of the objects, > > since the indexes have names reflecting those, MH knows more) and of > > course create the corresponding graph data. Maybe you could examine > > what exactly the raw node looks like that is backing an object, and > > create it that way?
> > I think inferring the used indexes might be the tricky part, but not > impossible.
> > If you can write, you can code - @coderdojomalmo > > If you can sketch, you can use a graph database - @neo4j
> > On Fri, May 11, 2012 at 11:53 AM, Daniel Aschauer > > <daniel.ascha...@gmail.com> wrote: > >> The problem a have is that I copy the Node objects with their > properties, > >> but I have to convert them somehow back to the according object (SDN > >> annotated @NodeEntity) otherwise the repository methods and the index > won't > >> work?
> >> How can this be done?
> >> Thanks, Daniel
> >> Am Donnerstag, 10. Mai 2012 15:30:41 UTC+2 schrieb Peter Neubauer:
> >>> Mmh, > >>> I think simply iterating over all nodes/relationships and then > >>> deduping them should work. We do something similar when providing > >>> D3.js with data, see
> >>> If you can write, you can code - @coderdojomalmo > >>> If you can sketch, you can use a graph database - @neo4j
> >>> On Mon, May 7, 2012 at 5:00 PM, Daniel Aschauer > >>> <daniel.ascha...@gmail.com> wrote: > >>>> Good point, although I do copying now by collection nodes and > >>>> relationships > >>>> from all paths and copying their properties. > >>>> However could be interesting to be able to directly export some > cypher > >>>> query > >>>> results. How can this be done? > >>>> I used the (com.tinkerpop.blueprints*)GraphMLWriter already, but > there I > >>>> have to provide a Graph? > >>>> Thanks, > >>>> Daniel
> >>>> Am Montag, 7. Mai 2012 16:32:22 UTC+2 schrieb Peter Neubauer:
> >>>>> Mmh, > >>>>> with that amount of data that shouldn't be a problem, just pipe that > >>>>> cypher into some export format (graphML or GEOFF) and use that do > have > >>>>> your derived graph read in?
> >>>>> If you can write, you can code - @coderdojomalmo > >>>>> If you can sketch, you can use a graph database - @neo4j
> >>>>> On Mon, May 7, 2012 at 1:01 PM, Daniel Aschauer > >>>>> <daniel.ascha...@gmail.com> wrote: > >>>>>> That is a solution I thought about as well. But wouldn't that > produce > >>>>>> a > >>>>>> lot > >>>>>> of overhead. > >>>>>> The case is that a lot of these leaves (show=true) will be > connected > >>>>>> to > >>>>>> a > >>>>>> subnode -> so this gives me a lot of path that would contain the > same > >>>>>> (sub)nodes in between? > >>>>>> Something cool would be the possibility to define a view on the > graph > >>>>>> to > >>>>>> work with.
> >>>>>> Thanks, Daniel
> >>>>>> Am Montag, 7. Mai 2012 10:49:42 UTC+2 schrieb Peter Neubauer:
> >>>>>>> In that case, I would just try to fish these paths out with a > Cypher > >>>>>>> query, something like
> >>>>>>> start root=node(0) > >>>>>>> match path = root-[*1..]-node > >>>>>>> where node.show = true > >>>>>>> return path
> >>>>>>> which even gives you the paths and the nodes in between?
> >>>>>>> If you can write, you can code - @coderdojomalmo > >>>>>>> If you can sketch, you can use a graph database - @neo4j
> >>>>>>> On Mon, May 7, 2012 at 10:38 AM, Daniel Aschauer > >>>>>>> <daniel.ascha...@gmail.com> wrote: > >>>>>>>> Thanks for your reply!
> >>>>>>>> Yes, there are connection between root and the other (sub)nodes, > >>>>>>>> but > >>>>>>>> there > >>>>>>>> are nodes inbetween that as well have to be copied (and don't > >>>>>>>> (need > >>>>>>>> to) > >>>>>>>> have > >>>>>>>> a show=true property) > >>>>>>>> How big the graph will become, let's say a few thousand nodes..
> >>>>>>>> Daniel
> >>>>>>>> Am Montag, 7. Mai 2012 10:21:38 UTC+2 schrieb Peter Neubauer:
> >>>>>>>>> Are these nodes connected to the root node in any way? Also, how > >>>>>>>>> big > >>>>>>>>> is your graph? If you have a big graph and disconnected nodes, > >>>>>>>>> then > >>>>>>>>> an > >>>>>>>>> "show" index might be more efficient to maintain and iterate > when > >>>>>>>>> you > >>>>>>>>> need it than traversing the graph. Depends a big on your layout.
> >>>>>>>>> If you can write, you can code - @coderdojomalmo > >>>>>>>>> If you can sketch, you can use a graph database - @neo4j
> >>>>>>>>> On Mon, May 7, 2012 at 10:06 AM, Daniel Aschauer > >>>>>>>>> <daniel.ascha...@gmail.com> wrote: > >>>>>>>>>> I have a graph where I want to copy a part of it starting from > >>>>>>>>>> a > >>>>>>>>>> root > >>>>>>>>>> node. > >>>>>>>>>> All subnode with a boolean value show=true should be included.
> >>>>>>>>>> Is there a simple way to do that or do I have to iterate throug > >>>>>>>>>> the > >>>>>>>>>> nodes > >>>>>>>>>> and copy "by hand"?
> template.postEntityCreation(node,clazz) is deprecated.
> As convert a Node to a @NodeEntity by this:
> Class<?> targettype = Class.forName((String) nRootNode.getProperty("__type__"));
> template.save(template.convert(nRootNode, targettype));
> This works fine for some part, the node and the indices are created, but by using the repository method findAll these nodes are not included, why or what can be done to inlcude them?
> I am using Sring data neo4j 2.0.1
> Am Freitag, 11. Mai 2012 20:34:06 UTC+2 schrieb Michael Hunger:
> You can call template.postEntityCreation(node,clazz) to add the necessary indices for the type information.
> template.setPersistentState(object,node) // existing node > template.postEntityCreation(node,clazz) // store type information in graph > template.save(object) saves the properties of the object onto the node
> HTH
> Michael
> Am 11.05.2012 um 14:24 schrieb Peter Neubauer:
> > Right, > > I suspect that you need to update the indexes that are attached to an > > entity (maybe you can infer that from the annotations of the objects, > > since the indexes have names reflecting those, MH knows more) and of > > course create the corresponding graph data. Maybe you could examine > > what exactly the raw node looks like that is backing an object, and > > create it that way?
> > I think inferring the used indexes might be the tricky part, but not impossible.
> > If you can write, you can code - @coderdojomalmo > > If you can sketch, you can use a graph database - @neo4j
> > On Fri, May 11, 2012 at 11:53 AM, Daniel Aschauer > > <daniel.ascha...@gmail.com> wrote: > >> The problem a have is that I copy the Node objects with their properties, > >> but I have to convert them somehow back to the according object (SDN > >> annotated @NodeEntity) otherwise the repository methods and the index won't > >> work?
> >> How can this be done?
> >> Thanks, Daniel
> >> Am Donnerstag, 10. Mai 2012 15:30:41 UTC+2 schrieb Peter Neubauer:
> >>> If you can write, you can code - @coderdojomalmo > >>> If you can sketch, you can use a graph database - @neo4j
> >>> On Mon, May 7, 2012 at 5:00 PM, Daniel Aschauer > >>> <daniel.ascha...@gmail.com> wrote: > >>>> Good point, although I do copying now by collection nodes and > >>>> relationships > >>>> from all paths and copying their properties. > >>>> However could be interesting to be able to directly export some cypher > >>>> query > >>>> results. How can this be done? > >>>> I used the (com.tinkerpop.blueprints*)GraphMLWriter already, but there I > >>>> have to provide a Graph? > >>>> Thanks, > >>>> Daniel
> >>>> Am Montag, 7. Mai 2012 16:32:22 UTC+2 schrieb Peter Neubauer:
> >>>>> Mmh, > >>>>> with that amount of data that shouldn't be a problem, just pipe that > >>>>> cypher into some export format (graphML or GEOFF) and use that do have > >>>>> your derived graph read in?
> >>>>> If you can write, you can code - @coderdojomalmo > >>>>> If you can sketch, you can use a graph database - @neo4j
> >>>>> On Mon, May 7, 2012 at 1:01 PM, Daniel Aschauer > >>>>> <daniel.ascha...@gmail.com> wrote: > >>>>>> That is a solution I thought about as well. But wouldn't that produce > >>>>>> a > >>>>>> lot > >>>>>> of overhead. > >>>>>> The case is that a lot of these leaves (show=true) will be connected > >>>>>> to > >>>>>> a > >>>>>> subnode -> so this gives me a lot of path that would contain the same > >>>>>> (sub)nodes in between? > >>>>>> Something cool would be the possibility to define a view on the graph > >>>>>> to > >>>>>> work with.
> >>>>>> Thanks, Daniel
> >>>>>> Am Montag, 7. Mai 2012 10:49:42 UTC+2 schrieb Peter Neubauer:
> >>>>>>> In that case, I would just try to fish these paths out with a Cypher > >>>>>>> query, something like
> >>>>>>> start root=node(0) > >>>>>>> match path = root-[*1..]-node > >>>>>>> where node.show = true > >>>>>>> return path
> >>>>>>> which even gives you the paths and the nodes in between?
> >>>>>>> If you can write, you can code - @coderdojomalmo > >>>>>>> If you can sketch, you can use a graph database - @neo4j
> >>>>>>> On Mon, May 7, 2012 at 10:38 AM, Daniel Aschauer > >>>>>>> <daniel.ascha...@gmail.com> wrote: > >>>>>>>> Thanks for your reply!
> >>>>>>>> Yes, there are connection between root and the other (sub)nodes, > >>>>>>>> but > >>>>>>>> there > >>>>>>>> are nodes inbetween that as well have to be copied (and don't > >>>>>>>> (need > >>>>>>>> to) > >>>>>>>> have > >>>>>>>> a show=true property) > >>>>>>>> How big the graph will become, let's say a few thousand nodes..
> >>>>>>>> Daniel
> >>>>>>>> Am Montag, 7. Mai 2012 10:21:38 UTC+2 schrieb Peter Neubauer:
> >>>>>>>>> Are these nodes connected to the root node in any way? Also, how > >>>>>>>>> big > >>>>>>>>> is your graph? If you have a big graph and disconnected nodes, > >>>>>>>>> then > >>>>>>>>> an > >>>>>>>>> "show" index might be more efficient to maintain and iterate when > >>>>>>>>> you > >>>>>>>>> need it than traversing the graph. Depends a big on your layout.
> >>>>>>>>> If you can write, you can code - @coderdojomalmo > >>>>>>>>> If you can sketch, you can use a graph database - @neo4j
> >>>>>>>>> On Mon, May 7, 2012 at 10:06 AM, Daniel Aschauer > >>>>>>>>> <daniel.ascha...@gmail.com> wrote: > >>>>>>>>>> I have a graph where I want to copy a part of it starting from > >>>>>>>>>> a > >>>>>>>>>> root > >>>>>>>>>> node. > >>>>>>>>>> All subnode with a boolean value show=true should be included.
> >>>>>>>>>> Is there a simple way to do that or do I have to iterate throug > >>>>>>>>>> the > >>>>>>>>>> nodes > >>>>>>>>>> and copy "by hand"?
Do you think it would be possible to remove the @deprecation flag from that method or perhaps add a comment stating the alternative to use or that it is the one to be used now and deprecation is only for long term considerations?
I ran into this same method earlier today but kept on looking since I didn't want to write new code using a deprecated method. It would have helped me to know that this was the approved method to use at this time.
On Monday, May 14, 2012 8:52:05 AM UTC-7, Michael Hunger wrote:
> That's what template.postEntityCreation(node,clazz) is for, it is > deprecated b/c I want to replace it in the long term.
> But for now it is is the external API way to go.
> Michael
> Am 14.05.2012 um 17:07 schrieb Daniel Aschauer:
> template.postEntityCreation(node,clazz) is deprecated.
> As convert a Node to a @NodeEntity by this: > Class<?> targettype = Class.forName((String) > nRootNode.getProperty("__type__")); > template.save(template.convert(nRootNode, targettype));
> This works fine for some part, the node and the indices are created, but > by using the repository method findAll these nodes are not included, why or > what can be done to inlcude them?
> I am using Sring data neo4j 2.0.1
> Am Freitag, 11. Mai 2012 20:34:06 UTC+2 schrieb Michael Hunger:
>> You can call template.postEntityCreation(node,clazz) to add the necessary >> indices for the type information.
>> template.setPersistentState(object,node) // existing node >> template.postEntityCreation(node,clazz) // store type information in >> graph >> template.save(object) saves the properties of the object onto the node
>> HTH
>> Michael
>> Am 11.05.2012 um 14:24 schrieb Peter Neubauer:
>> > Right, >> > I suspect that you need to update the indexes that are attached to an >> > entity (maybe you can infer that from the annotations of the objects, >> > since the indexes have names reflecting those, MH knows more) and of >> > course create the corresponding graph data. Maybe you could examine >> > what exactly the raw node looks like that is backing an object, and >> > create it that way?
>> > I think inferring the used indexes might be the tricky part, but not >> impossible.
>> > If you can write, you can code - @coderdojomalmo >> > If you can sketch, you can use a graph database - @neo4j
>> > On Fri, May 11, 2012 at 11:53 AM, Daniel Aschauer >> > <daniel....@gmail.com <javascript:>> wrote: >> >> The problem a have is that I copy the Node objects with their >> properties, >> >> but I have to convert them somehow back to the according object (SDN >> >> annotated @NodeEntity) otherwise the repository methods and the index >> won't >> >> work?
>> >> How can this be done?
>> >> Thanks, Daniel
>> >> Am Donnerstag, 10. Mai 2012 15:30:41 UTC+2 schrieb Peter Neubauer:
>> >>> Mmh, >> >>> I think simply iterating over all nodes/relationships and then >> >>> deduping them should work. We do something similar when providing >> >>> D3.js with data, see
>> >>> If you can write, you can code - @coderdojomalmo >> >>> If you can sketch, you can use a graph database - @neo4j
>> >>> On Mon, May 7, 2012 at 5:00 PM, Daniel Aschauer >> >>> <daniel....@gmail.com <javascript:>> wrote: >> >>>> Good point, although I do copying now by collection nodes and >> >>>> relationships >> >>>> from all paths and copying their properties. >> >>>> However could be interesting to be able to directly export some >> cypher >> >>>> query >> >>>> results. How can this be done? >> >>>> I used the (com.tinkerpop.blueprints*)GraphMLWriter already, but >> there I >> >>>> have to provide a Graph? >> >>>> Thanks, >> >>>> Daniel
>> >>>> Am Montag, 7. Mai 2012 16:32:22 UTC+2 schrieb Peter Neubauer:
>> >>>>> Mmh, >> >>>>> with that amount of data that shouldn't be a problem, just pipe >> that >> >>>>> cypher into some export format (graphML or GEOFF) and use that do >> have >> >>>>> your derived graph read in?
>> >>>>> If you can write, you can code - @coderdojomalmo >> >>>>> If you can sketch, you can use a graph database - @neo4j
>> >>>>> On Mon, May 7, 2012 at 1:01 PM, Daniel Aschauer >> >>>>> <daniel....@gmail.com <javascript:>> wrote: >> >>>>>> That is a solution I thought about as well. But wouldn't that >> produce >> >>>>>> a >> >>>>>> lot >> >>>>>> of overhead. >> >>>>>> The case is that a lot of these leaves (show=true) will be >> connected >> >>>>>> to >> >>>>>> a >> >>>>>> subnode -> so this gives me a lot of path that would contain the >> same >> >>>>>> (sub)nodes in between? >> >>>>>> Something cool would be the possibility to define a view on the >> graph >> >>>>>> to >> >>>>>> work with.
>> >>>>>> Thanks, Daniel
>> >>>>>> Am Montag, 7. Mai 2012 10:49:42 UTC+2 schrieb Peter Neubauer:
>> >>>>>>> In that case, I would just try to fish these paths out with a >> Cypher >> >>>>>>> query, something like
>> >>>>>>> start root=node(0) >> >>>>>>> match path = root-[*1..]-node >> >>>>>>> where node.show = true >> >>>>>>> return path
>> >>>>>>> which even gives you the paths and the nodes in between?
>> >>>>>>> If you can write, you can code - @coderdojomalmo >> >>>>>>> If you can sketch, you can use a graph database - @neo4j
>> >>>>>>> On Mon, May 7, 2012 at 10:38 AM, Daniel Aschauer >> >>>>>>> <daniel....@gmail.com <javascript:>> wrote: >> >>>>>>>> Thanks for your reply!
>> >>>>>>>> Yes, there are connection between root and the other (sub)nodes, >> >>>>>>>> but >> >>>>>>>> there >> >>>>>>>> are nodes inbetween that as well have to be copied (and don't >> >>>>>>>> (need >> >>>>>>>> to) >> >>>>>>>> have >> >>>>>>>> a show=true property) >> >>>>>>>> How big the graph will become, let's say a few thousand nodes..
>> >>>>>>>> Daniel
>> >>>>>>>> Am Montag, 7. Mai 2012 10:21:38 UTC+2 schrieb Peter Neubauer:
>> >>>>>>>>> Are these nodes connected to the root node in any way? Also, >> how >> >>>>>>>>> big >> >>>>>>>>> is your graph? If you have a big graph and disconnected nodes, >> >>>>>>>>> then >> >>>>>>>>> an >> >>>>>>>>> "show" index might be more efficient to maintain and iterate >> when >> >>>>>>>>> you >> >>>>>>>>> need it than traversing the graph. Depends a big on your >> layout.
>> >>>>>>>>> If you can write, you can code - @coderdojomalmo >> >>>>>>>>> If you can sketch, you can use a graph database - @neo4j
>> >>>>>>>>> On Mon, May 7, 2012 at 10:06 AM, Daniel Aschauer >> >>>>>>>>> <daniel....@gmail.com <javascript:>> wrote: >> >>>>>>>>>> I have a graph where I want to copy a part of it starting from >> >>>>>>>>>> a >> >>>>>>>>>> root >> >>>>>>>>>> node. >> >>>>>>>>>> All subnode with a boolean value show=true should be included.
>> >>>>>>>>>> Is there a simple way to do that or do I have to iterate >> throug >> >>>>>>>>>> the >> >>>>>>>>>> nodes >> >>>>>>>>>> and copy "by hand"?
> Do you think it would be possible to remove the @deprecation flag from that method or perhaps add a comment stating the alternative to use or that it is the one to be used now and deprecation is only for long term considerations?
> I ran into this same method earlier today but kept on looking since I didn't want to write new code using a deprecated method. It would have helped me to know that this was the approved method to use at this time.
> On Monday, May 14, 2012 8:52:05 AM UTC-7, Michael Hunger wrote:
>> That's what template.postEntityCreation(node,clazz) is for, it is deprecated b/c I want to replace it in the long term.
>> But for now it is is the external API way to go.
>> Michael
>> Am 14.05.2012 um 17:07 schrieb Daniel Aschauer:
>>> template.postEntityCreation(node,clazz) is deprecated.
>>> As convert a Node to a @NodeEntity by this:
>>> Class<?> targettype = Class.forName((String) nRootNode.getProperty("__type__"));
>>> template.save(template.convert(nRootNode, targettype));
>>> This works fine for some part, the node and the indices are created, but by using the repository method findAll these nodes are not included, why or what can be done to inlcude them?
>>> I am using Sring data neo4j 2.0.1
>>> Am Freitag, 11. Mai 2012 20:34:06 UTC+2 schrieb Michael Hunger:
>>>> You can call template.postEntityCreation(node,clazz) to add the necessary indices for the type information.
>>>> template.setPersistentState(object,node) // existing node >>>> template.postEntityCreation(node,clazz) // store type information in graph >>>> template.save(object) saves the properties of the object onto the node
>>>> HTH
>>>> Michael
>>>> Am 11.05.2012 um 14:24 schrieb Peter Neubauer:
>>>> > Right, >>>> > I suspect that you need to update the indexes that are attached to an >>>> > entity (maybe you can infer that from the annotations of the objects, >>>> > since the indexes have names reflecting those, MH knows more) and of >>>> > course create the corresponding graph data. Maybe you could examine >>>> > what exactly the raw node looks like that is backing an object, and >>>> > create it that way?
>>>> > I think inferring the used indexes might be the tricky part, but not impossible.
>>>> > If you can write, you can code - @coderdojomalmo >>>> > If you can sketch, you can use a graph database - @neo4j
>>>> > On Fri, May 11, 2012 at 11:53 AM, Daniel Aschauer >>>> > <daniel....@gmail.com> wrote: >>>> >> The problem a have is that I copy the Node objects with their properties, >>>> >> but I have to convert them somehow back to the according object (SDN >>>> >> annotated @NodeEntity) otherwise the repository methods and the index won't >>>> >> work?
>>>> >> How can this be done?
>>>> >> Thanks, Daniel
>>>> >> Am Donnerstag, 10. Mai 2012 15:30:41 UTC+2 schrieb Peter Neubauer:
>>>> >>> Mmh, >>>> >>> I think simply iterating over all nodes/relationships and then >>>> >>> deduping them should work. We do something similar when providing >>>> >>> D3.js with data, see >>>> >>> https://github.com/mbostock/d3/blob/master/examples/force/miserables.... >>>> >>> for the data, and
>>>> >>> If you can write, you can code - @coderdojomalmo >>>> >>> If you can sketch, you can use a graph database - @neo4j
>>>> >>> On Mon, May 7, 2012 at 5:00 PM, Daniel Aschauer >>>> >>> <daniel....@gmail.com> wrote: >>>> >>>> Good point, although I do copying now by collection nodes and >>>> >>>> relationships >>>> >>>> from all paths and copying their properties. >>>> >>>> However could be interesting to be able to directly export some cypher >>>> >>>> query >>>> >>>> results. How can this be done? >>>> >>>> I used the (com.tinkerpop.blueprints*)GraphMLWriter already, but there I >>>> >>>> have to provide a Graph? >>>> >>>> Thanks, >>>> >>>> Daniel
>>>> >>>> Am Montag, 7. Mai 2012 16:32:22 UTC+2 schrieb Peter Neubauer:
>>>> >>>>> Mmh, >>>> >>>>> with that amount of data that shouldn't be a problem, just pipe that >>>> >>>>> cypher into some export format (graphML or GEOFF) and use that do have >>>> >>>>> your derived graph read in?
>>>> >>>>> If you can write, you can code - @coderdojomalmo >>>> >>>>> If you can sketch, you can use a graph database - @neo4j
>>>> >>>>> On Mon, May 7, 2012 at 1:01 PM, Daniel Aschauer >>>> >>>>> <daniel....@gmail.com> wrote: >>>> >>>>>> That is a solution I thought about as well. But wouldn't that produce >>>> >>>>>> a >>>> >>>>>> lot >>>> >>>>>> of overhead. >>>> >>>>>> The case is that a lot of these leaves (show=true) will be connected >>>> >>>>>> to >>>> >>>>>> a >>>> >>>>>> subnode -> so this gives me a lot of path that would contain the same >>>> >>>>>> (sub)nodes in between? >>>> >>>>>> Something cool would be the possibility to define a view on the graph >>>> >>>>>> to >>>> >>>>>> work with.
>>>> >>>>>> Thanks, Daniel
>>>> >>>>>> Am Montag, 7. Mai 2012 10:49:42 UTC+2 schrieb Peter Neubauer:
>>>> >>>>>>> In that case, I would just try to fish these paths out with a Cypher >>>> >>>>>>> query, something like
>>>> >>>>>>> start root=node(0) >>>> >>>>>>> match path = root-[*1..]-node >>>> >>>>>>> where node.show = true >>>> >>>>>>> return path
>>>> >>>>>>> which even gives you the paths and the nodes in between?
>>>> >>>>>>> If you can write, you can code - @coderdojomalmo >>>> >>>>>>> If you can sketch, you can use a graph database - @neo4j
>>>> >>>>>>> On Mon, May 7, 2012 at 10:38 AM, Daniel Aschauer >>>> >>>>>>> <daniel....@gmail.com> wrote: >>>> >>>>>>>> Thanks for your reply!
>>>> >>>>>>>> Yes, there are connection between root and the other (sub)nodes, >>>> >>>>>>>> but >>>> >>>>>>>> there >>>> >>>>>>>> are nodes inbetween that as well have to be copied (and don't >>>> >>>>>>>> (need >>>> >>>>>>>> to) >>>> >>>>>>>> have >>>> >>>>>>>> a show=true property) >>>> >>>>>>>> How big the graph will become, let's say a few thousand nodes..
>>>> >>>>>>>> Daniel
>>>> >>>>>>>> Am Montag, 7. Mai 2012 10:21:38 UTC+2 schrieb Peter Neubauer:
>>>> >>>>>>>>> Are these nodes connected to the root node in any way? Also, how >>>> >>>>>>>>> big >>>> >>>>>>>>> is your graph? If you have a big graph and disconnected nodes, >>>> >>>>>>>>> then >>>> >>>>>>>>> an >>>> >>>>>>>>> "show" index might be more efficient to maintain and iterate when >>>> >>>>>>>>> you >>>> >>>>>>>>> need it than traversing the graph. Depends a big on your layout.
>>>> >>>>>>>>> If you can write, you can code - @coderdojomalmo >>>> >>>>>>>>> If you can sketch, you can use a graph database - @neo4j
>>>> >>>>>>>>> On Mon, May 7, 2012 at 10:06 AM, Daniel Aschauer >>>> >>>>>>>>> <daniel....@gmail.com> wrote: >>>> >>>>>>>>>> I have a graph where I want to copy a part of it starting from >>>> >>>>>>>>>> a >>>> >>>>>>>>>> root >>>> >>>>>>>>>> node. >>>> >>>>>>>>>> All subnode with a boolean value show=true should be included.
>>>> >>>>>>>>>> Is there a simple way to do that or do I have to iterate throug >>>> >>>>>>>>>> the >>>> >>>>>>>>>> nodes >>>> >>>>>>>>>> and copy "by hand"?
>>>> >>>>>>>>>> Daniel
> -- > You received this message because you are subscribed to the Google Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.