Re: [Neo] Instances of meta model

2010-03-12 Thread Mattias Persson
I just committed a fix for this.

Wow, that was quick, if you don't mind my saying so ;)

If you're using maven a new version of the meta-model component
(version 0.8-SNAPSHOT) will be available within an hour from now.
Please come back with feedback if something isn't working as you'd
expect or if you have more feature requests.

FYI: the method MetaModelClass#getInstances() is split into
#getDirectInstances() and #getAllInstances() so that it adds this
functionality and also adheres to the convention found in the meta
model.

/ Mattias

2010/3/12 Mattias Persson matt...@neotechnology.com:
 Hi Niels,

 You're absolutely right. I'll see if I can whip up a nice method for that!

 2010/3/10 Niels Hoogeveen pd_aficion...@hotmail.com:

 I just started working with Neo4J and created a meta model for the nodes and 
 relationships I am adding.

 When retrieving the instances of a Class, I only get those nodes I have 
 explicitly added to the collection of class instances, but not the ones that 
 are only added to the collection of a sub-class.

 Example:

 MetaModelClass thing = namespace.getMetaClass( thing, true );
 MetaModelClass person = namespace.getMetaClass( person, true );
 thing.getDirectSubs().add( person )

 Node pers = db.createNode()
 person.getInstances.add(pers)


 When asking for the instances of person the node pers is found within 
 the collection, when asking for instances of thing this node is not found. 
 It would be nice if the instances of thing would contain the nodes added 
 to the person collection, greatly reducing the number of redundant 
 relationships, and allowing for a more flexible evolution of the meta schema.

 Niels Hoogeveen

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Delete nodes

2010-03-12 Thread Peter Neubauer
Hi Miguel,
contacted you off-list -  I think we should Skype and guide guide you
through configuration etc. and see how the docs can be improved to
clarify some of the issues. Probably saves a lot of mails and we will
publish the results to the wiki/list for others to share.

Cheers,

/peter neubauer

COO and Sales, Neo Technology

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://www.tinkerpop.com  - Processing for Internet-scale graphs.
http://www.thoughtmade.com - Scandinavias coolest Bring-a-Thing party.



2010/3/12 Miguel Ángel Águila magu...@ac.upc.edu:
 Hello,

 I'm doing an operation for deleting nodes, the database has 56.876.085
 nodes and 321.393.972 edges. I'm deleting 4.495.136 nodes and 39.894.943
 edges, and I'm a little worry about the time that the operation spends.
 After one day executing the operation it only has delete 200.000 nodes,
 I don't know if I'm doing something wrong. Using 40 GB RAM I need to
 finish the transaccion every 10.000 nodes delete because in other case I
 have the following error:

  Exception in thread main java.lang.OutOfMemoryError: Java heap space
        at java.util.HashMap.resize(HashMap.java:462)
        at java.util.HashMap.addEntry(HashMap.java:755)
        at java.util.HashMap.put(HashMap.java:385)
        at
 org.neo4j.kernel.impl.transaction.LockManager.getWriteLock(LockManager.java:118)
        at
 org.neo4j.kernel.impl.nioneo.xa.NeoTransaction.getWriteLock(NeoTransaction.java:785)
        at
 org.neo4j.kernel.impl.nioneo.xa.NeoTransaction.disconnectRelationship(NeoTransaction.java:758)
        at
 org.neo4j.kernel.impl.nioneo.xa.NeoTransaction.relDelete(NeoTransaction.java:662)
        at org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaConnection
 $RelationshipEventConsumerImpl.deleteRelationship(NeoStoreXaConnection.java:249)
        at org.neo4j.kernel.impl.nioneo.xa.NioNeoDbPersistenceSource
 $NioNeoDbResourceConnection.relDelete(NioNeoDbPersistenceSource.java:350)
        at
 org.neo4j.kernel.impl.persistence.PersistenceManager.relDelete(PersistenceManager.java:149)
        at
 org.neo4j.kernel.impl.core.NodeManager.deleteRelationship(NodeManager.java:816)
        at
 org.neo4j.kernel.impl.core.RelationshipImpl.delete(RelationshipImpl.java:162)
        at
 org.neo4j.kernel.impl.core.RelationshipProxy.delete(RelationshipProxy.java:44)
        at edu.upc.dama.dex.loader.Queries.delTitles(Queries.java:780)
        at edu.upc.dama.dex.loader.TestBenchmark.main(TestBenchmark.java:70)


 May be the problem is the transaction take a lot of time.
 I let here the code for somebody can help me.

 public static void delTitles(final EmbeddedGraphDatabase neo, final
 IndexService indexService) {


        Node idNode;
        Node first;
        Node second;
        IndexHitsNode nodes;
        IteratorNode it;
        Transaction tx = neo.beginTx();
        try
        {
            nodes = indexService.getNodes(#images, 0);
            it = nodes.iterator();
            int counter=0;
            IteratorRelationship relIterator;
            Relationship rel;
            while ((it.hasNext())) {
                idNode=it.next();
                relIterator = idNode.getRelationships().iterator();
                while (relIterator.hasNext()) {
                    rel = relIterator.next();
                    rel.delete();
                }
                if ( ++counter % 1 == 0 ) {
                 tx.success();
                 tx.finish();
                 tx = neo.beginTx();
                 System.out.println(Porta+counter);
                }


 indexService.removeIndex(idNode,ID_TITLE,idNode.getProperty(ID_TITLE));

 indexService.removeIndex(idNode,NLC,idNode.getProperty(NLC));
                indexService.removeIndex(idNode,TYPE,1);
                indexService.removeIndex(idNode,#images,0);

                idNode.delete();



            }

            tx.success();
            tx.finish();
            tx = neo.beginTx();

             System.out.println(Nodes del +counter);

            tx.success();
        }
        finally
        {
            tx.finish();
        }
 }

 Thank you very much.

 Mike



 ___
 Neo mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo] How to cite Neo4j?

2010-03-12 Thread Amir Hossein Jadidinejad
Hi,
I'm using Neo4j in my research thesis as a great data store. How can I cite 
it?, I can't find any research paper that represent Neo4j. If one available, 
let me know.
Kind regards,
Amir



  
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo] Connecting to Neo4j DB from ActionScript

2010-03-12 Thread Amir Hossein Jadidinejad
Hi,
Is it possible to connect a Neo4j instance using ActionScript and Adobe Flex?!
Thanks. 



  
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Connecting to Neo4j DB from ActionScript

2010-03-12 Thread Todd Stavish
Hi Amir,

I used GSON (google's json package) on the Neo side and Flex's json
AS3 classes to make the connection.

-Todd



On Fri, Mar 12, 2010 at 4:31 PM, Amir Hossein Jadidinejad
amir.jad...@yahoo.com wrote:
 Hi,
 Is it possible to connect a Neo4j instance using ActionScript and Adobe Flex?!
 Thanks.




 ___
 Neo mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Connecting to Neo4j DB from ActionScript

2010-03-12 Thread Amir Hossein Jadidinejad
Dear Todd,
I'm not familiar with them. Would you please provide me a simple how-to or some 
source code example?
In fact, I'm going to visualise the Neo4j DB using FlexViz. It's really 
beautiful and flexible.
Thanks.
Amir

--- On Fri, 3/12/10, Todd Stavish toddstav...@gmail.com wrote:

From: Todd Stavish toddstav...@gmail.com
Subject: Re: [Neo] Connecting to Neo4j DB from ActionScript
To: Neo user discussions user@lists.neo4j.org
Date: Friday, March 12, 2010, 4:43 PM

Hi Amir,

I used GSON (google's json package) on the Neo side and Flex's json
AS3 classes to make the connection.

-Todd



On Fri, Mar 12, 2010 at 4:31 PM, Amir Hossein Jadidinejad
amir.jad...@yahoo.com wrote:
 Hi,
 Is it possible to connect a Neo4j instance using ActionScript and Adobe Flex?!
 Thanks.




 ___
 Neo mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user



  
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Connecting to Neo4j DB from ActionScript

2010-03-12 Thread Rick Bullotta
Amir, I'm doing something similar (also with Flexviz).  I looked at a number
of other Flex graph visualization libraries (Kapit, SpringGraph, YFiles,
Raviz/Birdeye, Flare) and definitely preferred Flexviz to the others. It
seems quite extensible/customizable as well.

I'm using Flex/Flash remoting between the server and the client, and on the
server side, I'm using WebORB Java.

Rick

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On
Behalf Of Amir Hossein Jadidinejad
Sent: Friday, March 12, 2010 5:10 PM
To: Neo user discussions
Subject: Re: [Neo] Connecting to Neo4j DB from ActionScript

Dear Todd,
I'm not familiar with them. Would you please provide me a simple how-to or
some source code example?
In fact, I'm going to visualise the Neo4j DB using FlexViz. It's really
beautiful and flexible.
Thanks.
Amir

--- On Fri, 3/12/10, Todd Stavish toddstav...@gmail.com wrote:

From: Todd Stavish toddstav...@gmail.com
Subject: Re: [Neo] Connecting to Neo4j DB from ActionScript
To: Neo user discussions user@lists.neo4j.org
Date: Friday, March 12, 2010, 4:43 PM

Hi Amir,

I used GSON (google's json package) on the Neo side and Flex's json
AS3 classes to make the connection.

-Todd



On Fri, Mar 12, 2010 at 4:31 PM, Amir Hossein Jadidinejad
amir.jad...@yahoo.com wrote:
 Hi,
 Is it possible to connect a Neo4j instance using ActionScript and Adobe
Flex?!
 Thanks.




 ___
 Neo mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user



  
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Connecting to Neo4j DB from ActionScript

2010-03-12 Thread Amir Hossein Jadidinejad
Dear Rick,
It's really interesting. Would you please share your experiments with us?, Some 
example, source code,...
Greatly appreciate your help.
Kind regards,
Amir

--- On Fri, 3/12/10, Rick Bullotta rick.bullo...@burningskysoftware.com wrote:

From: Rick Bullotta rick.bullo...@burningskysoftware.com
Subject: Re: [Neo] Connecting to Neo4j DB from ActionScript
To: 'Neo user discussions' user@lists.neo4j.org
Date: Friday, March 12, 2010, 6:27 PM

Amir, I'm doing something similar (also with Flexviz).  I looked at a number
of other Flex graph visualization libraries (Kapit, SpringGraph, YFiles,
Raviz/Birdeye, Flare) and definitely preferred Flexviz to the others. It
seems quite extensible/customizable as well.

I'm using Flex/Flash remoting between the server and the client, and on the
server side, I'm using WebORB Java.

Rick

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On
Behalf Of Amir Hossein Jadidinejad
Sent: Friday, March 12, 2010 5:10 PM
To: Neo user discussions
Subject: Re: [Neo] Connecting to Neo4j DB from ActionScript

Dear Todd,
I'm not familiar with them. Would you please provide me a simple how-to or
some source code example?
In fact, I'm going to visualise the Neo4j DB using FlexViz. It's really
beautiful and flexible.
Thanks.
Amir

--- On Fri, 3/12/10, Todd Stavish toddstav...@gmail.com wrote:

From: Todd Stavish toddstav...@gmail.com
Subject: Re: [Neo] Connecting to Neo4j DB from ActionScript
To: Neo user discussions user@lists.neo4j.org
Date: Friday, March 12, 2010, 4:43 PM

Hi Amir,

I used GSON (google's json package) on the Neo side and Flex's json
AS3 classes to make the connection.

-Todd



On Fri, Mar 12, 2010 at 4:31 PM, Amir Hossein Jadidinejad
amir.jad...@yahoo.com wrote:
 Hi,
 Is it possible to connect a Neo4j instance using ActionScript and Adobe
Flex?!
 Thanks.




 ___
 Neo mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user



      
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user



  
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo] Javascript/JSON binding?

2010-03-12 Thread Chris Dew
Hi, I'm new to this mailling list.  I just wondered if there was a
Javascript/JSON binding for Neo4j which made the database available to
NodeJS.

This could done as:
1. a C++ NodeJS plugin
2. JSON objects over TCP
3. JSON objects over HTTP (less efficient, could be extended for
browser-side with auth, transaction/session issues)
4. JSON objects over HTML5 websockets (though I don't think NodeJS has a
websockets CLIENT yet)

Any thoughts?

Chris.

-- 

http://www.finalcog.com/
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user