incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reto Bachmann-Gmuer <r...@apache.org>
Subject Re: EzGraph was: apply-method for language
Date Wed, 22 Jun 2011 15:46:23 GMT
On Wed, Jun 22, 2011 at 5:38 PM, Henry Story <henry.story@bblfish.net>wrote:

>
> On 22 Jun 2011, at 17:23, Reto Bachmann-Gmuer wrote:
>
> To make debugging easier it woul be good to have tests of smaller sizes
> pass. So I recommend that before writing a test for an 18 triple-graph write
> a couple of test with only between  1 and 3 triples.
>
>
> yes, that's just what I was doing now, and am having trouble there.
>
> But at least we can see that the notation looks good.
>

I though I try with what I thought to be the easiest possible case:

    private val miniGraph: Graph = {
        val henry = new UriRef("http://bblfish.net/#hjs")
        val reto = new UriRef("https://farewellutopia.com/user/me#me")
        val gr = new SimpleMGraph
        gr.add(new TripleImpl(reto,FOAF.knows, henry))
        gr.getGraph
    }

    @Test
    def miniUsingAsciiArrows {
        import org.apache.clerezza.rdf.scala.utils.EasyGraph._
        val ez = new EasyGraph()
        // example using arrows
        (
            "https://farewellutopia.com/user/me#me".uri -- FOAF.knows --> "
http://bblfish.net/#hjs".uri
        )
        Assert.assertEquals("Both graphs should have the same
size",largerGraph.size, ez.size)
        Assert.assertEquals("Both graphs should contain exactly the same
triples",miniGraph, ez.getGraph)
    }

But this doesn't even compile, how is one supposed to write this
single-triple graph with ez-graph?

Cheers,
Reto



>
> Henry
>
>
> Social Web Architect
> http://bblfish.net/
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message