Re: [Neo4j] Neo4j and Java 1.5
The service code was written before Java 1.5 support was dropped, so that will still work. There are a few other places where we use java 6 APIs, mainly java.util.Queue and java.util.concurrent.TimeUnit. javax.scripting is super simple to support under 1.5 (there is a backport package), and it is only used in the server. Java 1.5 is not supported by Neo4j, since it has reached its End Of Life. If really need it, you could create your own (unsupported) branch of Neo4j and modify that yourself to make things work, or pay Neo Technology for commercial Java 1.5 +Neo4j support. Cheers, Tobias On Sat, May 14, 2011 at 1:04 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Julien, I think there are some parts in the server that require Java 1.6 liek the javax.scripting , but I am not sure about the kernel. I suspect some of the service loader extensions being Java 1.6. Anyone else having that info? 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 - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Fri, May 13, 2011 at 10:40 AM, Julien Serdaru jserd...@gmail.com wrote: Hi all, I am considering using Neo4j embedded into a web application. We have to support Java 1.5 since we deploy on client J2EE application servers which still run on 1.5. Looking at the documentation, it seems that Java 1.6 is a prerequisite. http://docs.neo4j.org/chunked/stable/deployment-requirements.html Are there any plans to maintain 1.5 compatibility? Thanks, ___ 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 -- Tobias Ivarsson tobias.ivars...@neotechnology.com Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Color suggestions for the Self-Relationship bike shed
There has been a few discussions around supporting Loops, relationships with the same start node as end node, recently. Both here on the mailing list, and even more at the Neo Technology office. We have a working patch for handling loops in Neo4j, but one final piece is missing: what should the API look like for creating a loop? There are three suggestions for this, I'll list them with the pros and cons we've found for each. It would be great if you could provide some feedback on what you think on the matter, and which alternative you prefer. The alternatives: 1. let the existing createRelationshipTo(Node,RelationshipType) create loops if the same node is passed as argument. 2. add a new createLoop(RelationshipType) method for creating loops. 3. add a createRelationshipOrLoop(Node,RelationshipType) method that would work like createRelationshipTo, except it would permit creating loops. The pros and cons: PRO 1: does not add a new method to the API that developers have to learn. CON 1: changes the semantics of the createRelationshipTo method slightly from what it is today. CON 1: will not help you catch programming errors where you've mistakenly written code that creates a relationship to the same node (most of the cases where code creates relationships to the wrong node it is to the same node). PRO 2: will let you be explicit of when creating a loop. PRO 2: will let createRelationshipTo preserve the semantics it has today. Which will help catching many create relationships to the wrong node cases. CON 2: will force you to be explicit about loops, most applications that wan't loops will just treat them as any relationship where the start node and end node will just happen to be the same. PRO 3: adds loops as a generic construct (start and end just happens to be the same) without changing the current semantics of createRelationshipTo CON 3: Introduces a new method that creates relationships between any two nodes. It would of course be possible to go with both 2 and 3, and I think option 3 makes more sense as an addition to option 2, rather than as an alternative to it. What do you think? -- Tobias Ivarsson tobias.ivars...@neotechnology.com Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Color suggestions for the Self-Relationship bike shed
Hi, I say option 1. Marko. On May 16, 2011 8:12 AM, Tobias Ivarsson tobias.ivars...@neotechnology.com wrote: There has been a few discussions around supporting Loops, relationships with the same start node as end node, recently. Both here on the mailing list, and even more at the Neo Technology office. We have a working patch for handling loops in Neo4j, but one final piece is missing: what should the API look like for creating a loop? There are three suggestions for this, I'll list them with the pros and cons we've found for each. It would be great if you could provide some feedback on what you think on the matter, and which alternative you prefer. The alternatives: 1. let the existing createRelationshipTo(Node,RelationshipType) create loops if the same node is passed as argument. 2. add a new createLoop(RelationshipType) method for creating loops. 3. add a createRelationshipOrLoop(Node,RelationshipType) method that would work like createRelationshipTo, except it would permit creating loops. The pros and cons: PRO 1: does not add a new method to the API that developers have to learn. CON 1: changes the semantics of the createRelationshipTo method slightly from what it is today. CON 1: will not help you catch programming errors where you've mistakenly written code that creates a relationship to the same node (most of the cases where code creates relationships to the wrong node it is to the same node). PRO 2: will let you be explicit of when creating a loop. PRO 2: will let createRelationshipTo preserve the semantics it has today. Which will help catching many create relationships to the wrong node cases. CON 2: will force you to be explicit about loops, most applications that wan't loops will just treat them as any relationship where the start node and end node will just happen to be the same. PRO 3: adds loops as a generic construct (start and end just happens to be the same) without changing the current semantics of createRelationshipTo CON 3: Introduces a new method that creates relationships between any two nodes. It would of course be possible to go with both 2 and 3, and I think option 3 makes more sense as an addition to option 2, rather than as an alternative to it. What do you think? -- Tobias Ivarsson tobias.ivars...@neotechnology.com Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 ___ 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
Re: [Neo4j] Color suggestions for the Self-Relationship bike shed
I agree with Marko. In fact, I'd say that if you can choose more than one option, I'd go with option 1 and 2. The option one when you're not sure you're creating a loop (not sure if the end node will be the start node), so in order to avoid ifs on the client code, option 1 will go for it. If you're sure, and the operation is explicitly a loop, use the 2nd option. Regards 2011/5/16 Marko Rodriguez okramma...@gmail.com Hi, I say option 1. Marko. On May 16, 2011 8:12 AM, Tobias Ivarsson tobias.ivars...@neotechnology.com wrote: There has been a few discussions around supporting Loops, relationships with the same start node as end node, recently. Both here on the mailing list, and even more at the Neo Technology office. We have a working patch for handling loops in Neo4j, but one final piece is missing: what should the API look like for creating a loop? There are three suggestions for this, I'll list them with the pros and cons we've found for each. It would be great if you could provide some feedback on what you think on the matter, and which alternative you prefer. The alternatives: 1. let the existing createRelationshipTo(Node,RelationshipType) create loops if the same node is passed as argument. 2. add a new createLoop(RelationshipType) method for creating loops. 3. add a createRelationshipOrLoop(Node,RelationshipType) method that would work like createRelationshipTo, except it would permit creating loops. The pros and cons: PRO 1: does not add a new method to the API that developers have to learn. CON 1: changes the semantics of the createRelationshipTo method slightly from what it is today. CON 1: will not help you catch programming errors where you've mistakenly written code that creates a relationship to the same node (most of the cases where code creates relationships to the wrong node it is to the same node). PRO 2: will let you be explicit of when creating a loop. PRO 2: will let createRelationshipTo preserve the semantics it has today. Which will help catching many create relationships to the wrong node cases. CON 2: will force you to be explicit about loops, most applications that wan't loops will just treat them as any relationship where the start node and end node will just happen to be the same. PRO 3: adds loops as a generic construct (start and end just happens to be the same) without changing the current semantics of createRelationshipTo CON 3: Introduces a new method that creates relationships between any two nodes. It would of course be possible to go with both 2 and 3, and I think option 3 makes more sense as an addition to option 2, rather than as an alternative to it. What do you think? -- Tobias Ivarsson tobias.ivars...@neotechnology.com Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 ___ 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 -- Adriano Almeida Caelum | Ensino e Inovação www.caelum.com.br ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Color suggestions for the Self-Relationship bike shed
Hi, definitely +1 for option 1 Pablo On Mon, May 16, 2011 at 2:40 PM, Adriano Henrique de Almeida adrianoalmei...@gmail.com wrote: I agree with Marko. In fact, I'd say that if you can choose more than one option, I'd go with option 1 and 2. The option one when you're not sure you're creating a loop (not sure if the end node will be the start node), so in order to avoid ifs on the client code, option 1 will go for it. If you're sure, and the operation is explicitly a loop, use the 2nd option. Regards 2011/5/16 Marko Rodriguez okramma...@gmail.com Hi, I say option 1. Marko. On May 16, 2011 8:12 AM, Tobias Ivarsson tobias.ivars...@neotechnology.com wrote: There has been a few discussions around supporting Loops, relationships with the same start node as end node, recently. Both here on the mailing list, and even more at the Neo Technology office. We have a working patch for handling loops in Neo4j, but one final piece is missing: what should the API look like for creating a loop? There are three suggestions for this, I'll list them with the pros and cons we've found for each. It would be great if you could provide some feedback on what you think on the matter, and which alternative you prefer. The alternatives: 1. let the existing createRelationshipTo(Node,RelationshipType) create loops if the same node is passed as argument. 2. add a new createLoop(RelationshipType) method for creating loops. 3. add a createRelationshipOrLoop(Node,RelationshipType) method that would work like createRelationshipTo, except it would permit creating loops. The pros and cons: PRO 1: does not add a new method to the API that developers have to learn. CON 1: changes the semantics of the createRelationshipTo method slightly from what it is today. CON 1: will not help you catch programming errors where you've mistakenly written code that creates a relationship to the same node (most of the cases where code creates relationships to the wrong node it is to the same node). PRO 2: will let you be explicit of when creating a loop. PRO 2: will let createRelationshipTo preserve the semantics it has today. Which will help catching many create relationships to the wrong node cases. CON 2: will force you to be explicit about loops, most applications that wan't loops will just treat them as any relationship where the start node and end node will just happen to be the same. PRO 3: adds loops as a generic construct (start and end just happens to be the same) without changing the current semantics of createRelationshipTo CON 3: Introduces a new method that creates relationships between any two nodes. It would of course be possible to go with both 2 and 3, and I think option 3 makes more sense as an addition to option 2, rather than as an alternative to it. What do you think? -- Tobias Ivarsson tobias.ivars...@neotechnology.com Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 ___ 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 -- Adriano Almeida Caelum | Ensino e Inovação www.caelum.com.br ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Pablo Pareja Tobes LinkedInhttp://www.linkedin.com/in/pabloparejatobes Twitter http://www.twitter.com/pablopareja http://about.me/pablopareja http://www.ohnosequences.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Color suggestions for the Self-Relationship bike shed
+1 on the +1 for option 1 On Mon, May 16, 2011 at 2:49 PM, Pablo Pareja ppar...@era7.com wrote: Hi, definitely +1 for option 1 Pablo ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Color suggestions for the Self-Relationship bike shed
I'll go with option 1 as well. /anders On 05/16/2011 03:16 PM, Jim Webber wrote: And a +1 to option 1 from me as well. Jim On 16 May 2011, at 14:08, Andres Taylor wrote: +1 on the +1 for option 1 On Mon, May 16, 2011 at 2:49 PM, Pablo Parejappar...@era7.com wrote: Hi, definitely +1 for option 1 Pablo ___ 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
Re: [Neo4j] Spring Data Graph in an OSGi environment
This could be the problem, yes. The repository factories that create the repositories from the interface definitions would need to import the domain specific packages that contain the interfaces to have access to them - which requires buddy loading. It seems as if the CGLIB enhanced class org.springframework.data.graph.neo4j.config.Neo4jConfiguration cannot be created when the app starts up. This is the relevant part of the log file: [2011-05-16 15:10:49.467] region-dm-3 o.s.beans.factory.support.DefaultListableBeanFactory Creating shared instance of singleton bean 'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0' [2011-05-16 15:10:49.467] region-dm-3 o.s.beans.factory.support.DefaultListableBeanFactory Creating instance of bean 'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0' [2011-05-16 15:10:49.471] region-dm-3 org.springframework.beans.factory.annotation.InjectionMetadata Found injected element on class [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]: AutowiredFieldElement for private javax.validation.Validator org.springframework.data.graph.neo4j.config.Neo4jConfiguration.validator [2011-05-16 15:10:49.471] region-dm-3 org.springframework.beans.factory.annotation.InjectionMetadata Found injected element on class [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]: AutowiredMethodElement for public void org.springframework.data.graph.neo4j.config.Neo4jConfiguration.setGraphDatabaseService(org.neo4j.graphdb.GraphDatabaseService) [2011-05-16 15:10:49.471] region-dm-3 org.springframework.beans.factory.annotation.InjectionMetadata Found injected element on class [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]: AutowiredMethodElement for public void org.springframework.data.graph.neo4j.config.Neo4jConfiguration.setEntityManagerFactory(javax.persistence.EntityManagerFactory) [2011-05-16 15:10:49.471] region-dm-3 o.s.beans.factory.support.DefaultListableBeanFactory Eagerly caching bean 'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0' to allow for resolving potential circular references [2011-05-16 15:10:49.471] region-dm-3 org.springframework.beans.CachedIntrospectionResults Getting BeanInfo for class [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a] [2011-05-16 15:10:49.472] region-dm-3 org.springframework.osgi.util.DebugUtils Could not find class [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70aBeanInfo] required by [neo4j.domain(com.example.neo4j.domain)] scanning available bundles [2011-05-16 15:10:49.472] region-dm-3 org.springframework.osgi.util.DebugUtils Class is correctly imported as version [1.0.0], checking providing bundles [2011-05-16 15:10:49.476] region-dm-3 org.springframework.osgi.util.DebugUtils Bundle [Spring Data Neo4J (org.springframework.data.neo4j)] exports [org.springframework.data.graph.neo4j.config] as version [1.1.0.BUILD-SNAPSHOT] but version [1.0.0] was required [2011-05-16 15:10:49.477] region-dm-3 org.springframework.osgi.util.DebugUtils Could not find class [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330BeanInfo] required by [neo4j.domain(com.example.neo4j.domain)] scanning available bundles [2011-05-16 15:10:49.477] region-dm-3 org.springframework.osgi.util.DebugUtils Class is correctly imported as version [1.0.0], checking providing bundles [2011-05-16 15:10:49.481] region-dm-3 org.springframework.osgi.util.DebugUtils Bundle [Spring Data Neo4J (org.springframework.data.neo4j)] exports [org.springframework.data.graph.neo4j.config] as version [1.1.0.BUILD-SNAPSHOT] but version [1.0.0] was required [2011-05-16 15:10:49.482] region-dm-3 org.springframework.osgi.util.DebugUtils Could not find class [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448BeanInfo] required by [neo4j.domain(com.example.neo4j.domain)] scanning available bundles [2011-05-16 15:10:49.482] region-dm-3 org.springframework.osgi.util.DebugUtils Class is correctly imported as version [1.0.0], checking providing bundles [2011-05-16 15:10:49.486] region-dm-3 org.springframework.osgi.util.DebugUtils Bundle [Spring Data Neo4J (org.springframework.data.neo4j)] exports [org.springframework.data.graph.neo4j.config] as version [1.1.0.BUILD-SNAPSHOT] but version [1.0.0] was required [2011-05-16 15:10:49.487] region-dm-3 org.springframework.osgi.util.DebugUtils Could not find class [org.springframework.data.graph.neo4j.config.Neo4jConfigurationBeanInfo] required by
Re: [Neo4j] Color suggestions for the Self-Relationship bike shed
+1 for option 1. -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Tobias Ivarsson Sent: Monday, May 16, 2011 8:12 AM To: Neo user discussions Subject: [Neo4j] Color suggestions for the Self-Relationship bike shed There has been a few discussions around supporting Loops, relationships with the same start node as end node, recently. Both here on the mailing list, and even more at the Neo Technology office. We have a working patch for handling loops in Neo4j, but one final piece is missing: what should the API look like for creating a loop? There are three suggestions for this, I'll list them with the pros and cons we've found for each. It would be great if you could provide some feedback on what you think on the matter, and which alternative you prefer. The alternatives: 1. let the existing createRelationshipTo(Node,RelationshipType) create loops if the same node is passed as argument. 2. add a new createLoop(RelationshipType) method for creating loops. 3. add a createRelationshipOrLoop(Node,RelationshipType) method that would work like createRelationshipTo, except it would permit creating loops. The pros and cons: PRO 1: does not add a new method to the API that developers have to learn. CON 1: changes the semantics of the createRelationshipTo method slightly from what it is today. CON 1: will not help you catch programming errors where you've mistakenly written code that creates a relationship to the same node (most of the cases where code creates relationships to the wrong node it is to the same node). PRO 2: will let you be explicit of when creating a loop. PRO 2: will let createRelationshipTo preserve the semantics it has today. Which will help catching many create relationships to the wrong node cases. CON 2: will force you to be explicit about loops, most applications that wan't loops will just treat them as any relationship where the start node and end node will just happen to be the same. PRO 3: adds loops as a generic construct (start and end just happens to be the same) without changing the current semantics of createRelationshipTo CON 3: Introduces a new method that creates relationships between any two nodes. It would of course be possible to go with both 2 and 3, and I think option 3 makes more sense as an addition to option 2, rather than as an alternative to it. What do you think? -- Tobias Ivarsson tobias.ivars...@neotechnology.com Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 ___ 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
Re: [Neo4j] Color suggestions for the Self-Relationship bike shed
+1 for 1 too Am 16.05.2011 14:11, schrieb Tobias Ivarsson: What do you think? ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Color suggestions for the Self-Relationship bike shed
+1 for 1 Sent from my iPhone On 16 May 2011, at 14:32, Rick Bullotta rick.bullo...@thingworx.com wrote: +1 for option 1. -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Tobias Ivarsson Sent: Monday, May 16, 2011 8:12 AM To: Neo user discussions Subject: [Neo4j] Color suggestions for the Self-Relationship bike shed There has been a few discussions around supporting Loops, relationships with the same start node as end node, recently. Both here on the mailing list, and even more at the Neo Technology office. We have a working patch for handling loops in Neo4j, but one final piece is missing: what should the API look like for creating a loop? There are three suggestions for this, I'll list them with the pros and cons we've found for each. It would be great if you could provide some feedback on what you think on the matter, and which alternative you prefer. The alternatives: 1. let the existing createRelationshipTo(Node,RelationshipType) create loops if the same node is passed as argument. 2. add a new createLoop(RelationshipType) method for creating loops. 3. add a createRelationshipOrLoop(Node,RelationshipType) method that would work like createRelationshipTo, except it would permit creating loops. The pros and cons: PRO 1: does not add a new method to the API that developers have to learn. CON 1: changes the semantics of the createRelationshipTo method slightly from what it is today. CON 1: will not help you catch programming errors where you've mistakenly written code that creates a relationship to the same node (most of the cases where code creates relationships to the wrong node it is to the same node). PRO 2: will let you be explicit of when creating a loop. PRO 2: will let createRelationshipTo preserve the semantics it has today. Which will help catching many create relationships to the wrong node cases. CON 2: will force you to be explicit about loops, most applications that wan't loops will just treat them as any relationship where the start node and end node will just happen to be the same. PRO 3: adds loops as a generic construct (start and end just happens to be the same) without changing the current semantics of createRelationshipTo CON 3: Introduces a new method that creates relationships between any two nodes. It would of course be possible to go with both 2 and 3, and I think option 3 makes more sense as an addition to option 2, rather than as an alternative to it. What do you think? -- Tobias Ivarsson tobias.ivars...@neotechnology.com Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 ___ 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
Re: [Neo4j] Color suggestions for the Self-Relationship bike shed
Does anyone NOT planning to use loops have an opinion in the matter? That would be very valuable input. Cheers, -- Tobias Ivarsson tobias.ivars...@neotechnology.com Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] finding nodes between two nodes
Please direct your questions (other than those with attachments) to the list so that more people can chime in! 2011/5/13 Noppanit Charassinvichai noppani...@gmail.com Hi Mattias, Thanks again for the reply and I'm trying to do the first suggestion. This is the code that I'm playing with curl -H Accept:application/json -H Content-Type:application/json -X POST -d '{order:breadth first, relationships:[{type:answered},{type:excludes}], max depth: 10}' http://localhost:7474/db/data/node/16/traverse/node And I would get all the nodes with relationship answered or excludes So, some of the stuff that is not related to such as vegan and veggie are returned as well. How do I only return only the nodes from Mary with relationships answered and excludes Thanks a lot for your patient. On 13 May 2011, at 13:10, Mattias Persson wrote: Yeah I know, sending files to the list isn't possible. You might have to do that in two steps: 1) Get the dishes that Mary cannot eat 2) Get requested dishes Then filter out the dishes Mary cannot eat. Or you could create an evaluator including the results from step 1 to pass into a traversal of step 2. 2011/5/13 Noppanit Charassinvichai noppani...@gmail.com Hi Mattias, Sorry for this email, but I couldn't figure out how to include this image in the mailing list. To follow up my question, this is what I'm trying to do. There is a customer named Mary and she is allergic to nut, wheat and fish. So, I would like to get all the dishes that she is not allergic to. In this case it would be pasta salad. Could I do that in REST API? Our approach is to find all the dishes from the Menu node, we can do that in the REST API (no problem), but we couldn't figure out how to find all dishes that are excluded for Mary. So, we wanted to start from Mary and find all nodes that are connected by answered followed by excludes. Best Regards, Noppanit Charassinvichai -- Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology www.neotechnology.com -- Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology www.neotechnology.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Neo4J-Spatial Delete Note Exception
Deniz, just pushed a change and test that should fix this, https://github.com/neo4j/neo4j-spatial/commit/b44f55b5bd94dc2c6b9f1f5db9d3c13575ae9dc4 Could you try it out? 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 - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Sun, May 15, 2011 at 12:22 AM, Deniz Demir demi...@gmail.com wrote: I am trying to use neo4j-spatial, and wrote a simple test code just to add one node and then delete; however, delete operation causes an exception. IndexHitsNode hits = names.get(name, Deniz); Node n = hits.getSingle(); System.out.println(node hit: + n.getProperty(name)); Transaction tx = graph.beginTx(); try { layer.delete(n.getId()); tx.success(); } finally { tx.finish(); } It throws this exception: node hit: Deniz Exception in thread main java.lang.NullPointerException at org.neo4j.gis.spatial.RTreeIndex.adjustParentBoundingBox( RTreeIndex.java:613) at org.neo4j.gis.spatial.RTreeIndex.remove(RTreeIndex.java:131) at org.neo4j.gis.spatial.EditableLayerImpl.delete(EditableLayerImpl.java:74) at SimpleNeo4JExample.main(SimpleNeo4JExample.java:55) Looks like RTreeIndex.adjustParentBoundingBox() method expects parent node in any case but in my example there is parent because it is the only node in the layer: /** * Fix an IndexNode bounding box after a child has been removed * @param indexNode */ private void adjustParentBoundingBox(Node indexNode, RelationshipType relationshipType) { Envelope bbox = null; IteratorRelationship iterator = indexNode.getRelationships(relationshipType, Direction.OUTGOING).iterator(); while (iterator.hasNext()) { Node childNode = iterator.next().getEndNode(); if (bbox == null) bbox = getLeafNodeEnvelope(childNode); else bbox.expandToInclude(getLeafNodeEnvelope(childNode)); } indexNode.setProperty(PROP_BBOX, new double[] { bbox.getMinX(), bbox.getMinY(), bbox.getMaxX(), bbox.getMaxY() }); } Any comments? Thanks, Deniz ___ 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
Re: [Neo4j] Neo4J-Spatial Delete Note Exception
Hi Peter, I had fixed it by removing the bounding box property if there were no chid nodes but your fix works too. Thank you for help. Deniz On Mon, May 16, 2011 at 7:39 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Deniz, just pushed a change and test that should fix this, https://github.com/neo4j/neo4j-spatial/commit/b44f55b5bd94dc2c6b9f1f5db9d3c13575ae9dc4 Could you try it out? 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 - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Sun, May 15, 2011 at 12:22 AM, Deniz Demir demi...@gmail.com wrote: I am trying to use neo4j-spatial, and wrote a simple test code just to add one node and then delete; however, delete operation causes an exception. IndexHitsNode hits = names.get(name, Deniz); Node n = hits.getSingle(); System.out.println(node hit: + n.getProperty(name)); Transaction tx = graph.beginTx(); try { layer.delete(n.getId()); tx.success(); } finally { tx.finish(); } It throws this exception: node hit: Deniz Exception in thread main java.lang.NullPointerException at org.neo4j.gis.spatial.RTreeIndex.adjustParentBoundingBox( RTreeIndex.java:613) at org.neo4j.gis.spatial.RTreeIndex.remove(RTreeIndex.java:131) at org.neo4j.gis.spatial.EditableLayerImpl.delete(EditableLayerImpl.java:74) at SimpleNeo4JExample.main(SimpleNeo4JExample.java:55) Looks like RTreeIndex.adjustParentBoundingBox() method expects parent node in any case but in my example there is parent because it is the only node in the layer: /** * Fix an IndexNode bounding box after a child has been removed * @param indexNode */ private void adjustParentBoundingBox(Node indexNode, RelationshipType relationshipType) { Envelope bbox = null; IteratorRelationship iterator = indexNode.getRelationships(relationshipType, Direction.OUTGOING).iterator(); while (iterator.hasNext()) { Node childNode = iterator.next().getEndNode(); if (bbox == null) bbox = getLeafNodeEnvelope(childNode); else bbox.expandToInclude(getLeafNodeEnvelope(childNode)); } indexNode.setProperty(PROP_BBOX, new double[] { bbox.getMinX(), bbox.getMinY(), bbox.getMaxX(), bbox.getMaxY() }); } Any comments? Thanks, Deniz ___ 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