$ rm -rf ./db/ && ./bin/gremlin.sh
gremlin> graph = TitanFactory.open('./conf/attr-titan-berkeleyje.properties')
==>standardtitangraph[berkeleyje:/Users/pluradj/src/github/laxatives/titan-1.0.0-hadoop1/./conf/../db/berkeley]
gremlin> v = graph.addVertex()
==>v[4200]
gremlin> v.property('hello', new StringBuffer('world'))
==>vp[hello->world]
gremlin> m = [] as HashMap
gremlin> m.name = 'rdu'; m.lat = 35.880; m.lon = -78.788
==>-78.788
gremlin> v.property('poi', m)
==>vp[poi->{name=rdu, lon=-78.7]
gremlin> l = [] as ArrayList
gremlin> l.add('one'); l.add(2); l.add(3.0d);
==>true
gremlin> v.property('nums', l)
==>vp[nums->[one, 2, 3.0]]
gremlin> graph.tx().commit()
==>null
gremlin> f = new FileOutputStream('/tmp/ser.json')
==>java.io.FileOutputStream@ccf91df
gremlin> mapper = graph.io(graphson()).mapper().embedTypes(true).create()
==>org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper@2100d047
gremlin> graph.io(graphson()).writer().mapper(mapper).create().writeGraph(f, graph)
==>null
gremlin> :q
$ rm -rf ./db/ && ./bin/gremlin.sh
gremlin> graph = TitanFactory.open('./conf/attr-titan-berkeleyje.properties')
==>standardtitangraph[berkeleyje:/Users/pluradj/src/github/laxatives/titan-1.0.0-hadoop1/./conf/../db/berkeley]
gremlin> f = new FileInputStream('/tmp/ser.json')
==>java.io.FileInputStream@608bc8f8
gremlin> mapper = graph.io(graphson()).mapper().embedTypes(true).create()
==>org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper@496a31da
gremlin> graph.io(graphson()).reader().mapper(mapper).create().readGraph(f, graph)
==>null
gremlin> v = graph.traversal().V().next()
14:42:30 WARN com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx - Query requires iterating over all vertices [()]. For better performance, use indexes
==>v[4152]
gremlin> v.values('hello').next().getClass()
==>class java.lang.StringBuffer
gremlin> v.values('poi').next().getClass()
==>class java.util.HashMap
gremlin> v.values('nums').next().getClass()
==>class java.util.ArrayList
--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/af9618d6-670e-4970-ac1c-7a23dc7fb316%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
attributes.custom.attribute1.attribute-class=java.lang.StringBufferattributes.custom.attribute1.serializer-class=pluradj.titan.graphdb.database.serialize.attribute.StringBufferSerializerattributes.custom.attribute2.attribute-class=java.util.HashMapattributes.custom.attribute2.serializer-class=pluradj.titan.graphdb.database.serialize.attribute.HashMapSerializer