[
https://issues.apache.org/jira/browse/CLEREZZA-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068401#comment-13068401
]
Henry Story commented on CLEREZZA-615:
--------------------------------------
The patch to do this is here:
https://github.com/bblfish/clerezza/commit/51be3b14a5488838d87094e81455ca806507b72b
The cost one has to pay is that one needs a few methods for EzMGraph,
I also removed the code that could tempt one to import these contextual
implicits.
> Enable Ez wiring of chained statements without requiring imports of ez._
> ------------------------------------------------------------------------
>
> Key: CLEREZZA-615
> URL: https://issues.apache.org/jira/browse/CLEREZZA-615
> Project: Clerezza
> Issue Type: Improvement
> Reporter: Henry Story
>
> Following up on CLEREZZA-603 it should be possible to add statements to
> multiple graphs in a chained manner without needing to
> have imports of implicit objects whenever changing from one graph to another.
> As Reto pointed out on the Scala-dev mailing list
> https://groups.google.com/d/msg/scala-user/IsJ1yXjd2lw/KXwKk1wXtSIJ
> the following though would be ugly:
> new RichGraphNode(uriA, graphA) -- FOAF.knows --> uriB
> new RichGraphNode(uriB, graphA) -- FOAF.name -->"Dan Brickley"
> new RichGraphNode(uriA, graphB) -- FOAF.knows --> uriC
> new RichGraphNode(uriC, graphB) -- FOAF.knows --> uriD
> One would like to write this:
> graphA.node(uriA) -- FOAF.knows --> ( uriB -- FOAF.name --> "Dan
> Brickley" )
> graphB.node(uriA) -- FOAF.knows --> ( uriC -- FOAF.knows --> uriD )
> And even perhaps
> val graphA3 = new EzMGraph() { node(uriA) -- FOAF.knows --> ( uriB --
> FOAF.name --> "Dan Brickley" ) }
> val graphB3 = new EzMGraph() { node(uriA) -- FOAF.knows --> ( uriC --
> FOAF.knows --> uriD ) }
> but all of this without having to add an
> import graphA._
> ...
> import graphB._
> ...
> between each operation on a graph.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira