[Neo4j] cypher packages

2011-07-28 Thread Jean-Sébastien Stoffen
Hi,

Sorry for the newbie questions who happens very frequently at the begining.

I'm trying to submit some request to my graph using the cypher query 
language

I get those messages :
unable to resolve class CypherParser
unable to resolve class ExecutionResult
...

when I try the example showed here :
http://docs.neo4j.org/chunked/1.4.M04/query-lang.html

After some research, I've not found where I can download those packages
I've searched for org.neo4j.cypher.javacompat but without succes.

Could you tell me where to find it?

Regards,
Jean-Sébastien Stoffen.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] strange problem while getting a node property

2011-07-28 Thread Jean-Sébastien Stoffen
Hi,

thank you very much!
In deed, node 0 doesn't have any properties.
I did not think about this.

Now it's working perfectly.

Regards,
Jean-Sébastien Stoffen

Le 28/07/11 13:26, Niels Hoogeveen a écrit :
> When iterating over all nodes, you also pull the reference node (with id = 
> 0), which probably doesn't have the requested property.
> If you want to list all properties of a node, it's better to use a construct 
> like:
> for(String key: node.getPropertyKeys()){   
> System.out.println(node.getProperty(key));}
>
>> Date: Thu, 28 Jul 2011 13:18:50 +0200
>> From: c-...@jsnet.be
>> To: user@lists.neo4j.org
>> Subject: [Neo4j] strange problem while getting a node property
>>
>> Hi,
>> I've this strange problem when I try to collect data from the graph with
>> the Java API in Groovy :
>>
>> db.allNodes.each {node ->
>>   cpt=0
>>   node.getRelationships().each {rel ->
>>   cpt++
>>   }
>>   println ("${node} ${cpt}")
>>   println node.getPropertyKeys()
>> }
>>
>> The iteration on each node is right working.
>> The iteration to count the relationships on each node is working too.
>>
>> The call node.getPropertyKeys() gives me the list of the properties like
>> this :
>> [nbrel, version, maintainer, section, architecture, package, priority,
>> dataset, installedSize]
>>
>> But,
>>
>> If a call node.getProperty("package")
>> I receive this error :
>> Caught: org.neo4j.graphdb.NotFoundException: package property not found
>> for NodeImpl#0
>>
>> And, If I set the value just before, for test like this :
>> node.setProperty("package", "test")
>> println node.getProperty("package")
>>
>> I get the value.
>>
>> So I can't get property which was not set by the node.setProperty method.
>> The initial data are copied into the graph with a perl script using the
>> Neo4j REST interface.
>>
>> Maybe I do something wrong,
>> I'm a newbie in both Neo4j and Groovy
>>
>> Regards,
>> Jean-Sébastien Stoffen
>> ___
>> 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] strange problem while getting a node property

2011-07-28 Thread Jean-Sébastien Stoffen
Hi,
I've this strange problem when I try to collect data from the graph with 
the Java API in Groovy :

db.allNodes.each {node ->
 cpt=0
 node.getRelationships().each {rel ->
 cpt++
 }
 println ("${node} ${cpt}")
 println node.getPropertyKeys()
}

The iteration on each node is right working.
The iteration to count the relationships on each node is working too.

The call node.getPropertyKeys() gives me the list of the properties like 
this :
[nbrel, version, maintainer, section, architecture, package, priority, 
dataset, installedSize]

But,

If a call node.getProperty("package")
I receive this error :
Caught: org.neo4j.graphdb.NotFoundException: package property not found 
for NodeImpl#0

And, If I set the value just before, for test like this :
node.setProperty("package", "test")
println node.getProperty("package")

I get the value.

So I can't get property which was not set by the node.setProperty method.
The initial data are copied into the graph with a perl script using the 
Neo4j REST interface.

Maybe I do something wrong,
I'm a newbie in both Neo4j and Groovy

Regards,
Jean-Sébastien Stoffen
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user