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 7EB346F82 for ; Wed, 22 Jun 2011 14:03:44 +0000 (UTC) Received: (qmail 58729 invoked by uid 500); 22 Jun 2011 14:03:44 -0000 Delivered-To: apmail-incubator-clerezza-dev-archive@incubator.apache.org Received: (qmail 58672 invoked by uid 500); 22 Jun 2011 14:03:44 -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 58663 invoked by uid 99); 22 Jun 2011 14:03:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2011 14:03:44 +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 (nike.apache.org: local policy) Received: from [74.125.82.43] (HELO mail-ww0-f43.google.com) (74.125.82.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2011 14:03:36 +0000 Received: by wwg12 with SMTP id 12so829369wwg.0 for ; Wed, 22 Jun 2011 07:03:16 -0700 (PDT) Received: by 10.216.235.2 with SMTP id t2mr2116742weq.93.1308751395913; Wed, 22 Jun 2011 07:03:15 -0700 (PDT) Received: from bblfish.home (AAubervilliers-651-1-56-13.w81-249.abo.wanadoo.fr [81.249.235.13]) by mx.google.com with ESMTPS id z66sm326103weq.24.2011.06.22.07.03.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Jun 2011 07:03:15 -0700 (PDT) Subject: Re: apply-method for language Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/alternative; boundary=Apple-Mail-41--268289740 From: Henry Story In-Reply-To: Date: Wed, 22 Jun 2011 16:03:11 +0200 Cc: clerezza-dev@incubator.apache.org Message-Id: <3BFAE3F9-AE70-4392-BC8B-B7F9539A32D6@bblfish.net> References: <48FC2998-ABC0-4A1A-A9EB-17F05A27A86B@bblfish.net> <2D390009-1D29-40C1-A636-CD8FB0D1B57B@bblfish.net> <4DC07487-F3D8-4FA4-8D90-8B9AF3BECE41@bblfish.net> To: Reto Bachmann-Gmuer X-Mailer: Apple Mail (2.1084) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-41--268289740 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On 22 Jun 2011, at 15:28, Reto Bachmann-Gmuer wrote: > On Wed, Jun 22, 2011 at 3:11 PM, Henry Story = wrote: >=20 > On 22 Jun 2011, at 13:20, Reto Bachmann-Gmuer wrote: >=20 >>=20 >>=20 >> On Tue, Jun 21, 2011 at 3:01 PM, Henry Story = wrote: >>=20 >> On 21 Jun 2011, at 08:23, Reto Bachmann-Gmuer wrote: >>> Do you think you have some time today to demonstrate how things work = in the unit tests? Afaict the examples you wrote in the comments, e.g. = the one with (FOAF.knows)(g.bnode(FOAF.name)("Danny Ayers"('en))) cannot = work. >>=20 >> I'll start doing that now. >>=20 >> Let me know if you need some help. It would be great if we could = close that issue today or tomorrow. >=20 > 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. > =20 >=20 > Some ideas: one could rename EasyGraph(Node) to EzGraph(Node). Then it = contains the z of Clerezza (and of Zorro too ;-)=20 > 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:string typedLiteral, don't see wha's wrong with "builder". 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.=20 case class EzLiteral(lexicalForm: String) extends Literal You can map a plain literal to a typed literal of course. Numbers can be = mapped to other numbers that does not make them builders. Thinking in = terms of builders is still very procedural.=20 >=20 >=20 > "an english string" :en "an english string"@en=20 >=20 > The new syntax is with a ":"-method on the new Language class? No, that was valid n3 above. Though I was thinking of changing the + method in your NameSpace to : The problem with : is that=20 [[ The associativity of an operator is determined by the operator=92s last = character. Operators ending in a colon =91:=92 are right-associative. All other operators are = leftassociative. ]] So one should try out what that means in practice. > =20 >=20 > 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 = and then it becomes a literal (or a UriRef for that mather, with the = .uri method). yes, there are dynamic conversions from String because we can't change = java. But really=20 java:java.lang.String owl:sameAs rdf:PlainLiteral (or whatever the name = for rdf plain literals are) If you look at the end of section 7.4 of "RDF Semantics" http://www.w3.org/TR/rdf-mt/ you will find the following transformation rules xsd 1a uuu aaa "sss". uuu aaa "sss"^^xsd:string . xsd 1b uuu aaa "sss"^^xsd:string . uuu aaa "sss". ie: xsd:string is the identity relations for strings, like the +0 or *1 = functions for numbers. Social Web Architect http://bblfish.net/ --Apple-Mail-41--268289740--