Re: [Neo] Does RelationshipType enum need to be unique?

2008-05-08 Thread Philip Jägenstedt
I've used this DynamicRelationType in my project, but there is something strange going on. Look at what I see in the neo shell: $ ls (me) --[INDEX_SERVICE]-- (1) (me) --[MUSICBRAINZ]-- (4) neo-sh (0)$ cd 4 neo-sh (4)$ ls (me) --[ARTISTS]-- (5) (me) --[MUSICBRAINZ]-- (0) neo-sh (4)$ cd 5 neo-sh

Re: [Neo] Does RelationshipType enum need to be unique?

2008-05-08 Thread Mattias Persson
I fixed that bug... there will be a new SNAPSHOT of neo in an hour or two! 2008/5/8 Philip Jägenstedt [EMAIL PROTECTED]: I've used this DynamicRelationType in my project, but there is something strange going on. Look at what I see in the neo shell: $ ls (me) --[INDEX_SERVICE]-- (1) (me)

Re: [Neo] Does RelationshipType enum need to be unique?

2008-05-08 Thread Philip Jägenstedt
Thanks! On 5/8/08, Mattias Persson [EMAIL PROTECTED] wrote: I fixed that bug... there will be a new SNAPSHOT of neo in an hour or two! 2008/5/8 Philip Jägenstedt [EMAIL PROTECTED]: I've used this DynamicRelationType in my project, but there is something strange going on. Look at what I

RE: [Neo] Does RelationshipType enum need to be unique?

2008-05-06 Thread Peter Haensgen
2008 19:23 To: Neo user discussions Subject: Re: [Neo] Does RelationshipType enum need to be unique? Hi! Why keep it in a final static map? why not just: public final class RelUtil { public final static RelationshipType createRelType(final String name) { return new

RE: [Neo] Does RelationshipType enum need to be unique?

2008-05-05 Thread Peter Haensgen
Hi, the enum approach has the disadvantage that the available relationship types are static, e.g. they must be known at compile time. In some cases, this may not be sufficient. Therefore I have built a DynamicRelationType, which simply looks like this: public class DynamicRelationshipType

Re: [Neo] Does RelationshipType enum need to be unique?

2008-05-05 Thread Peter Neubauer
Folks, that might be a good utility class IMHO, Peter. /peter On Mon, May 5, 2008 at 11:20 AM, Peter Haensgen [EMAIL PROTECTED] wrote: Hi, the enum approach has the disadvantage that the available relationship types are static, e.g. they must be known at compile time. In some cases, this

Re: [Neo] Does RelationshipType enum need to be unique?

2008-05-05 Thread Viktor Klang
Hi! Why keep it in a final static map? why not just: public final class RelUtil { public final static RelationshipType createRelType(final String name) { return new RelationshipType() { public String name() { return name;

Re: [Neo] Does RelationshipType enum need to be unique?

2008-05-03 Thread Emil Eifrem
Hi Philip, So from a Java perspective, your two Enums are definitely different types and there's no interoperability between them whatsoever. But Neo ignores that. For Neo, the *name* of a relationship type (as defined by the Stirng name() method in the RelationshipType interface) is the unique

Re: [Neo] Does RelationshipType enum need to be unique?

2008-05-03 Thread Philip Jägenstedt
Thanks for that explanation, I thought it wouldn't be as simple as it could be. Philip On 5/4/08, Emil Eifrem [EMAIL PROTECTED] wrote: Hi Philip, So from a Java perspective, your two Enums are definitely different types and there's no interoperability between them whatsoever. But Neo