You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by tw...@apache.org on 2015/11/25 16:49:51 UTC

incubator-tinkerpop git commit: TINKERPOP3-952 Adding example of a property with list cardinality.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/TINKERPOP3-952 [created] 326205ed1


TINKERPOP3-952 Adding example of a property with list cardinality.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/326205ed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/326205ed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/326205ed

Branch: refs/heads/TINKERPOP3-952
Commit: 326205ed1178212681b411815be35e6a63f76994
Parents: 0c20c6d
Author: Ted Wilmes <tw...@gmail.com>
Authored: Wed Nov 25 09:49:10 2015 -0600
Committer: Ted Wilmes <tw...@gmail.com>
Committed: Wed Nov 25 09:49:10 2015 -0600

----------------------------------------------------------------------
 docs/src/reference/the-graph.asciidoc | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/326205ed/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graph.asciidoc b/docs/src/reference/the-graph.asciidoc
index eceec21..312eb62 100644
--- a/docs/src/reference/the-graph.asciidoc
+++ b/docs/src/reference/the-graph.asciidoc
@@ -82,36 +82,38 @@ A running example using vertex properties is provided below to demonstrate and e
 graph = TinkerGraph.open()
 g = graph.traversal(standard())
 v = g.addV('name','marko','name','marko a. rodriguez').next()
-g.V(v).properties().count()
 g.V(v).properties('name').count() <1>
+v.property(list, 'name', 'm. a. rodriguez') <2>
+g.V(v).properties('name').count()
 g.V(v).properties()
 g.V(v).properties('name')
 g.V(v).properties('name').hasValue('marko')
-g.V(v).properties('name').hasValue('marko').property('acl','private') <2>
+g.V(v).properties('name').hasValue('marko').property('acl','private') <3>
 g.V(v).properties('name').hasValue('marko a. rodriguez')
 g.V(v).properties('name').hasValue('marko a. rodriguez').property('acl','public')
 g.V(v).properties('name').has('acl','public').value()
-g.V(v).properties('name').has('acl','public').drop() <3>
+g.V(v).properties('name').has('acl','public').drop() <4>
 g.V(v).properties('name').has('acl','public').value()
 g.V(v).properties('name').has('acl','private').value()
 g.V(v).properties()
-g.V(v).properties().properties() <4>
-g.V(v).properties().property('date',2014) <5>
+g.V(v).properties().properties() <5>
+g.V(v).properties().property('date',2014) <6>
 g.V(v).properties().property('creator','stephen')
 g.V(v).properties().properties()
 g.V(v).properties('name').valueMap()
-g.V(v).property('name','okram') <6>
+g.V(v).property('name','okram') <7>
 g.V(v).properties('name')
-g.V(v).values('name') <7>
+g.V(v).values('name') <8>
 ----
 
 <1> A vertex can have zero or more properties with the same key associated with it.
-<2> A vertex property can have standard key/value properties attached to it.
-<3> Vertex property removal is identical to property removal.
-<4> It is property to get the properties of a vertex property.
-<5> A vertex property can have any number of key/value properties attached to it.
-<6> `property(...)` will remove all existing key'd properties before adding the new single property (see `VertexProperty.Cardinality`).
-<7> If only the value of a property is needed, then `values()` can be used.
+<2> If a property is added with a cardinality of `list`, an additional property with the provided key will be added.
+<3> A vertex property can have standard key/value properties attached to it.
+<4> Vertex property removal is identical to property removal.
+<5> It is property to get the properties of a vertex property.
+<6> A vertex property can have any number of key/value properties attached to it.
+<7> `property(...)` will remove all existing key'd properties before adding the new single property (see `VertexProperty.Cardinality`).
+<8> If only the value of a property is needed, then `values()` can be used.
 
 If the concept of vertex properties is difficult to grasp, then it may be best to think of vertex properties in terms
 of "literal vertices." A vertex can have an edge to a "literal vertex" that has a single value key/value -- e.g.