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 Fwd: apply-method for language
Date Wed, 22 Jun 2011 15:29:24 GMT
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 be
one of these


You wrote:

> [[
> The associativity of an operator is determined by the operator’s last
> character. Operators
> ending in a colon ‘:’ are right-associative. All other operators 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 <reto@apache.org>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 <reto@apache.org>wrote:
>
>>
>>
>> On Wed, Jun 22, 2011 at 3:11 PM, Henry Story <henry.story@bblfish.net>wrote:
>>
>>>
>>> On 22 Jun 2011, at 13:20, Reto Bachmann-Gmuer wrote:
>>>
>>>
>>>
>>> On Tue, Jun 21, 2011 at 3:01 PM, Henry Story <henry.story@bblfish.net>wrote:
>>>
>>>>
>>>> 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.
>>>>
>>>>
>>>> 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:string
>> 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 and
>> 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/
>>>
>>>
>>
>

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