-
Notifications
You must be signed in to change notification settings - Fork 862
Add The Zoo graph to demo Multi-Label #3509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Cole-Greer
wants to merge
8
commits into
multi-label-experiment
Choose a base branch
from
multi-label-toy-graph
base: multi-label-experiment
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5b9255f
Add an example zoo graph
xiazcy 9268f23
Wire up the zoo graph and convert read-only multi-label scenarios
Cole-Greer b2a2f43
Convert read-only multi-label doc examples to use the zoo graph
Cole-Greer 1df9ea8
Fix order-sensitive set comparison in .NET Gherkin DeepEqual
Cole-Greer 255e961
Document the zoo toy graph with a diagram
Cole-Greer bad1b79
Disable ZOO location()/featuresRequired() wiring
Cole-Greer bb9b31d
Wire up the zoo graph for Hadoop via multi-label GraphSON V4
Cole-Greer ba4de85
Support multi-label vertices in Gryo; wire up zoo graph for Hadoop an…
Cole-Greer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -206,6 +206,34 @@ link:https://tinkerpop.apache.org/docs/x.y.z/dev/provider/#_label_cardinality[pr | |
| details and the <<label-step,label()>>, <<labels-step,labels()>>, <<addlabel-step,addLabel()>>, and | ||
| <<droplabel-step,dropLabel()>> steps for traversal access. | ||
|
|
||
| [[the-zoo-toy-graph]] | ||
| TIP: A toy graph demonstrating multi-label vertices alongside a variety of property types is available at | ||
| `TinkerFactory.createTheZoo()` and `data/tinkerpop-zoo*`. Unlike "The Crew" above, which requires a graph configured | ||
| for vertex multi-properties and meta-properties, "The Zoo" requires a `LabelCardinality` of `ONE_OR_MORE` or | ||
| `ZERO_OR_MORE`. | ||
|
|
||
| .The Zoo | ||
| image::the-zoo-graph.png[width=685] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't help wondering if this graph carries too much to display nicely for folks to follow as an image. I won't let it block the PR but maybe we just need do showcase the multilabels for the graph visually or a core subgraph... |
||
|
|
||
| "The Zoo" models animals, their habitats, and the people who care for them. Animals carry the "animal" label plus | ||
| any number of descriptive labels - such as "aquatic", "nocturnal", or "endangered" - reflecting the traits that | ||
| apply to them, which is where the graph's multi-label vertices come into play: | ||
|
|
||
| [gremlin-groovy,theZoo] | ||
| ---- | ||
| g.V().hasLabel('animal').valueMap('name','species') | ||
| g.V().has('name','tux').labels() <1> | ||
| g.V().hasLabel('endangered').values('name') <2> | ||
| g.V().has('name','tux').out('livesIn').values('name','biome') <3> | ||
| ---- | ||
|
|
||
| <1> `tux` carries several labels at once - "animal", "bird", "aquatic", and "endangered" - since vertex labels are | ||
| not limited to exactly one for this graph. | ||
| <2> Filtering by a single label, such as "endangered", surfaces every animal that carries it, regardless of what | ||
| other labels are also present. | ||
| <3> Habitats, like "lagoon" and "canopy", are modeled as ordinary single-labeled vertices connected to their | ||
| resident animals with a "livesIn" edge. | ||
|
|
||
| [[nullable-property-values]] | ||
| === Nullable Property Values | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't this sentence read strangely?
We don't "configure" graphs for multi/meta-properties. A graph "supports" those things. You might say that you "configure" label cardinality for "TinkerGraph" but not every graph will have a "configuration" for that (i.e. some graphs will just support it or not) so you'd have to be specific.