Re: [Mediann] Ad. "Return Type / String vs Uri" - Issue

Felix Sasaki a écrit :
> 
> Hi Tobias,
> 
> I think this is a very good example on how to make a distinction between
> "only string value" and "URI value" on the metadata level, and it would
> be great to have it in a wiki page. However, IMO we are going to provide
> an API which should provide access on a metamodel metadata level. Or to
> put this into a question: If we have a method getSubject, should it return
> 1) the complete DC-TEXT presentation
> 2) the completet RDF/XML representation
> 3) If the input is example 1: the URI. If yes, how does the API "know"
> that it needs to do that?
> 4) If the input is example 2: the string value. If yes, how does the API
> "know" that it needs to do that?
> 
> I think you are aiming for 3) and 4), but I'm not sure.

a 5th option would be, as suggested at the last telecon, to return a
JSON object with two attributes "uri" and "text". The burden on the
developer would be low (append ".uri" or ".text" after the returned
value), and the API would not have to "know" what is required.

  pa

Received on Friday, 19 December 2008 12:45:36 UTC