@Incidence doesn't behave like Frames

12 views
Skip to first unread message

Mohamed T. AlRefaie

unread,
Jun 13, 2015, 1:24:20 PM6/13/15
to ferma...@syncleus.com
Hello all:

Thanks for making this amazing project and for being responsive.

I was working on a migration from Frames to Ferma and I got stuck at this line of code
 
class Person{
 
...
 
@Incidence(label = "created")

 
public abstract Created addCreated(final Project project);
 
...
}

This basically create an edge of class `Created` then connects current person vertex with the passed `Project` vertex. 

Person 1 ---created---> Project 1

I tried to use this with Ferma but it throws a runtime exception saying 
java.lang.IllegalStateException: addCreated was annotated with @Incidence but did not begin with: get, remove
at com.syncleus.ferma.framefactories.annotation.IncidenceMethodHandler.processMethod(IncidenceMethodHandler.java:79)
at com.syncleus.ferma.framefactories.annotation.AnnotationFrameFactory.constructClass(AnnotationFrameFactory.java:127)
at com.syncleus.ferma.framefactories.annotation.AnnotationFrameFactory.create(AnnotationFrameFactory.java:76)
at com.syncleus.ferma.DelegatingFramedGraph.frameElement(DelegatingFramedGraph.java:235)
....


What is the easiest way to solve this issue?

I guess converting to @Adjacency but that means I have to return class of type Project not Created.
 

Jeffrey Freeman

unread,
Jun 13, 2015, 1:29:21 PM6/13/15
to ferma...@syncleus.com
I could add this functionality for you. for the moment your best bet is to either convert to @Adjacency or to simply implement the method and use the gremlin pipeline. If you'd like to submit a pull request adding the add* functionality to incident annotations I would be happy to merge it. Otherwise I can look into adding this feature in the next few weeks for you.

--
You received this message because you are subscribed to the Google Groups "Ferma List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ferma-list+...@syncleus.com.
To post to this group, send email to ferma...@syncleus.com.
To view this discussion on the web visit https://groups.google.com/a/syncleus.com/d/msgid/ferma-list/266be4e8-aa27-4094-ac05-39a3bb195214%40syncleus.com.

Mohamed T. AlRefaie

unread,
Jun 13, 2015, 7:00:58 PM6/13/15
to ferma...@syncleus.com
Hello Jeffrey:

I have done it to contribute to this awesome library. I will send you a pull request in few minutes. 

Thank you again,
Mohamed.

Jeffrey Freeman

unread,
Jun 13, 2015, 7:10:41 PM6/13/15
to Mohamed T. AlRefaie, ferma...@syncleus.com
Excellent! Thanks so much for the contribution. I will review it today!

Jeffrey Freeman

unread,
Jun 14, 2015, 3:21:46 PM6/14/15
to Mohamed T. AlRefaie, ferma...@syncleus.com
I've modified you're pull request to make it more in-line with the rest of the library. It has now been merged with master. Expect it in the next major release! Thanks again.

Jeffrey Phillips Freeman

unread,
Jun 15, 2015, 1:36:12 PM6/15/15
to ferma...@syncleus.com
By the way, just added some documentation you might find useful. Ferma implements all the frames standard annotations. However it supports a few method signatures frames doesnt support. Here check out this reference I just wrote for more info.

http://wiki.syncleus.com/index.php/Ferma:Annotation_Reference

Mohamed Taher AlRefaie

unread,
Jun 15, 2015, 6:47:14 PM6/15/15
to Jeffrey Phillips Freeman, ferma...@syncleus.com

That's such a good piece of work. I have noticed few typos. Do you expect some corrections? BTW, does the github repo have a link to this page?


--
You received this message because you are subscribed to the Google Groups "Ferma List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ferma-list+...@syncleus.com.
To post to this group, send email to ferma...@syncleus.com.

Jeffrey Freeman

unread,
Jun 15, 2015, 6:48:46 PM6/15/15
to Mohamed Taher AlRefaie, ferma...@syncleus.com
Yes I added a link int he README to the wiki.

As for corrections, If you'd like to contribute register for an account on the wiki and let me know what it is, I will give you editor permission. You will then be welcome to contribute any edits you think might be helpful.

On Mon, Jun 15, 2015 at 6:46 PM, Mohamed Taher AlRefaie <m.t...@msn.com> wrote:

That's such a good piece of work. I have noticed few typos. Do you expect some corrections? BTW, does the github repo have a link to this page?


On Mon, Jun 15, 2015, 6:36 PM Jeffrey Phillips Freeman <fre...@gmail.com> wrote:
--
Reply all
Reply to author
Forward
0 new messages