Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Get a NULL object with getVertex(string) API

Received: by 10.50.40.165 with SMTP id y5mr778794igk.4.1348006016431;
        Tue, 18 Sep 2012 15:06:56 -0700 (PDT)
X-BeenThere: neo4j@googlegroups.com
Received: by 10.231.62.200 with SMTP id y8ls944594ibh.5.gmail; Tue, 18 Sep
 2012 15:06:54 -0700 (PDT)
Received: by 10.50.195.166 with SMTP id if6mr853243igc.2.1348006014929;
        Tue, 18 Sep 2012 15:06:54 -0700 (PDT)
Received: by 10.50.195.166 with SMTP id if6mr853241igc.2.1348006014905;
        Tue, 18 Sep 2012 15:06:54 -0700 (PDT)
Return-Path: <okramma...@gmail.com>
Received: from mail-iy0-f174.google.com (mail-iy0-f174.google.com [209.85.210.174])
        by gmr-mx.google.com with ESMTPS id rf8si419378igb.2.2012.09.18.15.06.54
        (version=TLSv1/SSLv3 cipher=OTHER);
        Tue, 18 Sep 2012 15:06:54 -0700 (PDT)
Received-SPF: pass (google.com: domain of okramma...@gmail.com designates 209.85.210.174 as permitted sender) client-ip=209.85.210.174;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of okramma...@gmail.com designates 209.85.210.174 as permitted sender) smtp.mail=okramma...@gmail.com; dkim=pass header...@gmail.com
Received: by iahk25 with SMTP id k25so299281iah.19
        for <neo4j@googlegroups.com>; Tue, 18 Sep 2012 15:06:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=from:mime-version:content-type:subject:date:in-reply-to:to
         :references:message-id:x-mailer;
        bh=AniceU9ZvqCRpxNmhg512uGXLuQl2jG6YLs8e0NPA2w=;
        b=W7H92cLz66fKPHUZ3nL7TQwZktO2Ruz4hRoT/dB4mXFIVxf5/22wAcSGXZrI/sc/W7
         O/qtV/pmDeD3DEL/EqI+jM3EEXi8HaMjXrls6vBXJoXfKFyDVTxGP6IEfJFstrTLMqxw
         b7Ujoyv7f90h2Jcacg5xV96Umt18NfZqcMVcLeZv1sjBoJK9Ysd4P8k1Sh4iDimzxPkE
         TrVKAsZOQ1wxzf5tArtSWC6fF6YqtQEfdkbY5PX77SRbDzr+CocvDLPymOGlP2+DLxmf
         03Ooc6kTeFkOmEZVm3qbz/OfLl+JLmmj2GLwL8+FsIiYezVhO23NA0yVBxHR3DVclyMQ
         NN+w==
Received: by 10.50.33.232 with SMTP id u8mr1244977igi.39.1348006014778;
        Tue, 18 Sep 2012 15:06:54 -0700 (PDT)
Return-Path: <okramma...@gmail.com>
Received: from [192.168.1.64] (108-69-133-253.lightspeed.sntcca.sbcglobal.net. [108.69.133.253])
        by mx.google.com with ESMTPS id ce10sm13826027igb.1.2012.09.18.15.06.53
        (version=TLSv1/SSLv3 cipher=OTHER);
        Tue, 18 Sep 2012 15:06:53 -0700 (PDT)
From: Marko Rodriguez <okramma...@gmail.com>
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: multipart/alternative; boundary=Apple-Mail-6-331624501
Subject: Re: [Neo4j] Get a NULL object with getVertex(string) API
Date: Tue, 18 Sep 2012 16:06:51 -0600
In-Reply-To: <48631b6e-8c1e-4199-a299-1d0275b0ffe8@googlegroups.com>
To: neo4j@googlegroups.com
References: <12b328c6-5071-48fb-b5ff-d4d253e26728@googlegroups.com> <4FAFB4EF-B252-427C-8EBF-E6A8EE2E6...@gmail.com> <31bdad64-04f2-424c-9765-079219603594@googlegroups.com> <AAB42FF5-E7C8-4317-8158-235E12A7C...@gmail.com> <48631b6e-8c1e-4199-a299-1d0275b0ffe8@googlegroups.com>
Message-Id: <085ED6E4-49E0-4A8B-9AA8-845E281F5...@gmail.com>
X-Mailer: Apple Mail (2.1084)


--Apple-Mail-6-331624501
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Hi,

It has to do with Blueprints. Some Blueprints graphs support ID =
specification, other do not. Neo4j does not.

Marko.

http://markorodriguez.com

On Sep 18, 2012, at 4:04 PM, Tigerfish wrote:

> Thanks for your speedy response. Appreciate it. I don't have any =
problems using "neo4jgraph.addVertex(null)." It is a bit strange that =
neo4j silently disregards an argument.=20
>=20
> On Tuesday, September 18, 2012 2:09:23 PM UTC-7, Marko Rodriguez =
wrote:
> Hi,
>=20
> Dunno.
>=20
> Do:
>=20
> 	System.out.println(neo4jgraph.toString())
> 	Vertex v =3D neo4jgraph.addVertex(null);
>=20
> The mystr1 won't do anything as Neo4j does not respect user-supplied =
IDs. It maintains its own long ID system. As you get more comfortable =
with Blueprints, you can use IdGraph wrapper to simulate your own ID =
system:
>=20
> 	https://github.com/tinkerpop/blueprints/wiki/Id-Implementation
>=20
> Good luck,
> Marko.
>=20
> http://markorodriguez.com
>=20
> On Sep 18, 2012, at 3:07 PM, Tigerfish wrote:
>=20
>> :) Sorry for the cut & paste error. There is indeed a "Vertex v0=3D =
neo4jgraph.addVertex(mystr1); " in the code.
>> The original problem stands.
>>=20
>> Thanks!
>>=20
>> On Tuesday, September 18, 2012 1:43:10 PM UTC-7, Marko Rodriguez =
wrote:
>> Hello,=20
>>=20
>> > Object mystr1 =3D new String("888");=20
>> > Vertex =3D neo4jgraph.addVertex(mystr1);=20
>>=20
>> You are not setting the variable to anything.=20
>>=20
>> Do:=20
>>=20
>>         Vertex v =3D neo4jgraph.addVertex(null);=20
>>=20
>> Marko.=20
>>=20
>> http://markorodriguez.com=20
>>=20
>> On Sep 18, 2012, at 2:16 PM, Tigerfish wrote:=20
>>=20
>> > I have a Neo4jGraph object "neo4jgraph" and I am doing the =
following API.=20
>> >=20
>> > Object mystr1 =3D new String("888");=20
>> > Vertex =3D neo4jgraph.addVertex(mystr1);=20
>> >=20
>> > Somehow, neo4jgraph.getVertex(mystr1) returns NULL after the above =
API call.=20
>> >=20
>> > Did I miss something obvious?=20
>> >=20
>> > Note: the version I am using is community 1.8 M05.=20
>> >=20
>> > --=20
>> >  =20
>> >  =20
>>=20
>>=20
>> --=20
>> =20
>> =20
>=20
>=20
> --=20
> =20
> =20


--Apple-Mail-6-331624501
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
">Hi,<div><br></div><div>It has to do with Blueprints. Some Blueprints =
graphs support ID specification, other do not. Neo4j does =
not.</div><div><br></div><div>Marko.</div><div><br><div>
<span class=3D"Apple-style-span" style=3D"border-collapse: separate; =
color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; =
font-variant: normal; font-weight: normal; letter-spacing: normal; =
line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; =
text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; =
-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0px; font-size: medium; "><a =
href=3D"http://markorodriguez.com">http://markorodriguez.com</a></span>
</div>
<br><div><div>On Sep 18, 2012, at 4:04 PM, Tigerfish wrote:</div><br =
class=3D"Apple-interchange-newline"><blockquote type=3D"cite">Thanks for =
your speedy response. Appreciate it. I don't have any problems using =
"neo4jgraph.addVertex(null)." It is a bit strange that neo4j silently =
disregards an argument. <br><br>On Tuesday, September 18, 2012 2:09:23 =
PM UTC-7, Marko Rodriguez wrote:<blockquote class=3D"gmail_quote" =
style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc =
solid;padding-left: 1ex;"><div =
style=3D"word-wrap:break-word">Hi,<div><br></div><div>Dunno.</div><div><br=
></div><div>Do:</div><div><br></div><div><span style=3D"white-space:pre">	=
</span>System.out.println(neo4jgraph.<wbr>toString())</div><div><span =
style=3D"white-space:pre">	</span>Vertex v =3D =
neo4jgraph.addVertex(null);</div><div><br></div><div>The mystr1 won't do =
anything as Neo4j does not respect user-supplied IDs. It maintains its =
own long ID system. As you get more comfortable with Blueprints, you can =
use IdGraph wrapper to simulate your own ID =
system:</div><div><br></div><div><span style=3D"white-space:pre">	=
</span><a =
href=3D"https://github.com/tinkerpop/blueprints/wiki/Id-Implementation" =
target=3D"_blank">https://github.com/tinkerpop/<wbr>blueprints/wiki/Id-<wb=
r>Implementation</a></div><div><br></div><div>Good =
luck,</div><div>Marko.</div><div><br><div>
<a href=3D"http://markorodriguez.com/" =
target=3D"_blank">http://markorodriguez.com</a>
</div>
<br><div><div>On Sep 18, 2012, at 3:07 PM, Tigerfish =
wrote:</div><br><blockquote type=3D"cite">:) Sorry for the cut &amp; =
paste error. There is indeed a "Vertex v0=3D =
neo4jgraph.addVertex(mystr1);
" in the code.<br>The original problem stands.<br><br>Thanks!<br><br>On =
Tuesday, September 18, 2012 1:43:10 PM UTC-7, Marko Rodriguez =
wrote:<blockquote class=3D"gmail_quote" =
style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc =
solid;padding-left:1ex">Hello,
<br>
<br>&gt; Object mystr1 =3D new String("888");
<br>&gt; Vertex =3D neo4jgraph.addVertex(mystr1);
<br>
<br>You are not setting the variable to anything.
<br>
<br>Do:
<br>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vertex v =3D =
neo4jgraph.addVertex(null);
<br>
<br>Marko.
<br>
<br><a href=3D"http://markorodriguez.com/" =
target=3D"_blank">http://markorodriguez.com</a>
<br>
<br>On Sep 18, 2012, at 2:16 PM, Tigerfish wrote:
<br>
<br>&gt; I have a Neo4jGraph object "neo4jgraph" and I am doing the =
following API.
<br>&gt;=20
<br>&gt; Object mystr1 =3D new String("888");
<br>&gt; Vertex =3D neo4jgraph.addVertex(mystr1);
<br>&gt;=20
<br>&gt; Somehow, neo4jgraph.getVertex(mystr1) returns NULL after the =
above API call.
<br>&gt;=20
<br>&gt; Did I miss something obvious?
<br>&gt;=20
<br>&gt; Note: the version I am using is community 1.8 M05.
<br>&gt;=20
<br>&gt; --=20
<br>&gt; &nbsp;
<br>&gt; &nbsp;
<br>
<br></blockquote><div><br></div>

-- <br>
&nbsp;<br>
&nbsp;<br>
</blockquote></div><br></div></div></blockquote><div><br =
class=3D"webkit-block-placeholder"></div>

-- <br>
&nbsp;<br>
&nbsp;<br>
</blockquote></div><br></div></body></html>=

--Apple-Mail-6-331624501--