Skip to content
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

Ability to add labels on Vertex #57

Open
killje opened this issue May 5, 2019 · 4 comments
Open

Ability to add labels on Vertex #57

killje opened this issue May 5, 2019 · 4 comments

Comments

@killje
Copy link
Contributor

killje commented May 5, 2019

Labels are a integral part of tinkerpop graphs, with the option to add vertexes with g.addV(label).

With this issue I am asking on input on ways to make it a more integral part in this project. In the text below I go over why it is that I would like to see it added. The current way of doing it and some possible solutions to implement it.

Labels are used to distinguish between vertexes. While it is not needed for Ferma as you can use the class structure to distinguish between vertexes, it would be nice to have a easy way to set them so that programs that rely on the graph output can use these.

Currently you have to do it with framedGraph.addFramedVertex(new DefaultClassInitializer<>(className), T.label, labelName); and the recetlly added (#56) framedGraph.addFramedVertex(className, T.label, labelName);

I have made an attempt to have a better way to add these with annotations on the vertex class as labels are generally used to distinguish between types of nodes. This one is visible in a pull request on my own repo. But I am not yet convinced that this is the way to go. (this implementation is just a proof of concept and still needs a bit of work. Like checking if no label is given as argument when adding the vertex)

Some other ways that i have thought of was to add the function framedGraph.addV(className, labelName); To more closely mirror the Tinkerpop implementation.

The last options would be a breaking change that would split the current @GraphElement into two separate annotations, one being @GraphVertex and the other @GraphEdge, where GraphVertex has a optional label.

I would love to hear thoughts on this subject as I have to use labels in a project that I am currently working on. I therefore also have some time to spare to implement this into this library.

@freemo
Copy link
Member

freemo commented May 11, 2019

I'm not ignoring this. Just been getting surgery from which im recovering now. I will get to this soon I promise.

@killje
Copy link
Contributor Author

killje commented May 11, 2019

No problem. Get well soon.

@darius-sas
Copy link

Hi, are there any updates on this? I am also interested in this :)

@freemo
Copy link
Member

freemo commented Sep 30, 2019

Hi, are there any updates on this? I am also interested in this :)

Sorry this went by the wayside. Let me review. I'd be willing to consider PR suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants