Return-Path: X-Original-To: apmail-incubator-clerezza-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-clerezza-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 958436A5C for ; Wed, 22 Jun 2011 15:29:52 +0000 (UTC) Received: (qmail 65123 invoked by uid 500); 22 Jun 2011 15:29:52 -0000 Delivered-To: apmail-incubator-clerezza-dev-archive@incubator.apache.org Received: (qmail 65099 invoked by uid 500); 22 Jun 2011 15:29:52 -0000 Mailing-List: contact clerezza-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: clerezza-dev@incubator.apache.org Delivered-To: mailing list clerezza-dev@incubator.apache.org Received: (qmail 65091 invoked by uid 99); 22 Jun 2011 15:29:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2011 15:29:52 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.214.175] (HELO mail-iw0-f175.google.com) (209.85.214.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2011 15:29:46 +0000 Received: by iwn19 with SMTP id 19so824305iwn.6 for ; Wed, 22 Jun 2011 08:29:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.132.129 with SMTP id d1mr753570ict.526.1308756564664; Wed, 22 Jun 2011 08:29:24 -0700 (PDT) Sender: reto@trialox.org Received: by 10.231.10.66 with HTTP; Wed, 22 Jun 2011 08:29:24 -0700 (PDT) X-Originating-IP: [194.230.155.30] In-Reply-To: References: <48FC2998-ABC0-4A1A-A9EB-17F05A27A86B@bblfish.net> <2D390009-1D29-40C1-A636-CD8FB0D1B57B@bblfish.net> <4DC07487-F3D8-4FA4-8D90-8B9AF3BECE41@bblfish.net> Date: Wed, 22 Jun 2011 17:29:24 +0200 X-Google-Sender-Auth: ywO1R2N3O0ws8lR0ESLyW4cDmcY Message-ID: Subject: Fwd: apply-method for language From: Reto Bachmann-Gmuer To: clerezza-dev@incubator.apache.org, Story Henry Content-Type: multipart/alternative; boundary=90e6ba3fcec5225ff704a64ea239 --90e6ba3fcec5225ff704a64ea239 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Accidentaly changed my "reply"/"reply all" settings, so reposting to keep the discussion on the list A few remarks while reviewing and trying to get to run your code: - The syntax of the junit AssertEquals is that the first argument is what you expect and the second what you got - A Graph cannot possibly be equals to an MGraph - You may not directly extend Literal, as this interface is defined to have exactly 2 direct subinterfaces Plain- and TypedLiteral every Literal must b= e one of these You wrote: > [[ > The associativity of an operator is determined by the operator=E2=80=99s = last > character. Operators > ending in a colon =E2=80=98:=E2=80=99 are right-associative. All other op= erators are > leftassociative. > ]] > That I thought was the reason for introducing the Scala Lang-class. It's no more a Builder than your TypedLiteralImpl is a builder. All > constructors are builders if you want to look at it that way, but we don'= t > add ...Builder to every class. Indeed EzLiteral is just a plain literal. > > case class EzLiteral(lexicalForm: String) extends Literal > I think your comaprison doesn't hold, as EzLiteral is not yet a finished Literal but will just eventually result in one. It is very similar to ResponseBuilder in jax-rs. In fact with your change the TypeConversionTest no longer passes. Reto On Wed, Jun 22, 2011 at 3:51 PM, Reto Bachmann-Gmuer wrote= : > Questions: > > - Why do you introduce the class Lang which extends Language but doesn't > introduce any additional method? > > - What problem (related to the issue we want to close) does LangRegion > address? > > Reto > > > On Wed, Jun 22, 2011 at 3:28 PM, Reto Bachmann-Gmuer wro= te: > >> >> >> On Wed, Jun 22, 2011 at 3:11 PM, Henry Story wr= ote: >> >>> >>> On 22 Jun 2011, at 13:20, Reto Bachmann-Gmuer wrote: >>> >>> >>> >>> On Tue, Jun 21, 2011 at 3:01 PM, Henry Story w= rote: >>> >>>> >>>> On 21 Jun 2011, at 08:23, Reto Bachmann-Gmuer wrote: >>>> >>>> Do you think you have some time today to demonstrate how things work i= n >>>> the unit tests? Afaict the examples you wrote in the comments, e.g. th= e one >>>> with (FOAF.knows)(g.bnode(FOAF.name)("Danny Ayers"('en))) cannot work. >>>> >>>> >>>> I'll start doing that now. >>>> >>> >>> Let me know if you need some help. It would be great if we could close >>> that issue today or tomorrow. >>> >>> >>> I simplified the EasyGraph, added an initial LangId class just to get >>> going, and filled in the unit tests. They should >>> work but don't . I need to write a couple of things, so I checked it in= , >>> in case you can see what the problem may be. >>> >> I'll look at it. >> >> >>> >>> Some ideas: one could rename EasyGraph(Node) to EzGraph(Node). Then it >>> contains the z of Clerezza (and of Zorro too ;-) >>> I have removed the "Builder" in "LiteralBuilder" The Literal is not a >>> Builder. It's just that Scala makes it easy to map between literals. >>> >> It's an thing that returns a typedLiteral when adding a type, a plain >> literal when adding a language and which dynamically convert to xsd:stri= ng >> typedLiteral, don't see wha's wrong with "builder". >> >> >>> >>> "an english string" :en "an english string"@en >>> >> >> The new syntax is with a ":"-method on the new Language class? >> >> >>> >>> is both correct in rdf semantics and available in n3. In any case it is= a >>> good way to think of the meaning of @ or ^^ >>> They are maps from strings to literals. That is indeed how they are >>> defined in the RDF Semantics spec. >>> >> Right, that's why there is this dynamic conversion from String to >> LiteralBuilder. Because you can apply a language or a type to a String a= nd >> then it becomes a literal (or a UriRef for that mather, with the .uri >> method). >> >> Cheers, >> Reto >> >> >>> >>> Henry >>> >>> >>> Henry >>> >>> >>> >>> Cheers, >>> Reto >>> >>>> >>>> Henry >>>> >>>> Social Web Architect >>>> http://bblfish.net/ >>>> >>>> >>> >>> Social Web Architect >>> http://bblfish.net/ >>> >>> >> > --90e6ba3fcec5225ff704a64ea239--