List Info

Thread: (no subject)




(no subject)
country flaguser name
Brazil
2008-04-10 12:33:21
Hi all, the solution for my last post is attached.

The problems is in the file Literal.rb
The original code only treat integer as XSD::integer.

I completed the code to treat other values:
XSD::positiveInteger,XSD::nonNegativeInteger,XSD::decimal.

  def self.typed(value, type)

    case type
      when XSD::string
      String.new(value)
      when XSD::date
      DateTime.parse(value)
      when XSD::boolean
      value == 'true' or value == 1
      when XSD::integer
      value.to_i
      when XSD::positiveInteger
      value.to_i
      when XSD::nonNegativeInteger
      value.to_i
      when XSD::decimal
      value.to_f
    end
  end

Thanks
Samur
_______________________________________________
ActiveRDF mailing list
ActiveRDFlists.deri.org
http
://lists.deri.org/mailman/listinfo/activerdf

  
Re: (no subject)
country flaguser name
Netherlands
2008-04-11 08:30:48
On 04/10/08/04/08 14:33 -0300, saraujoinf.puc-rio.br wrote:
>The problems is in the file Literal.rb. The original
code only treat 
>integer as XSD::integer. I completed the code to treat
other values:
>XSD::positiveInteger, XSD::nonNegativeInteger,
XSD::decimal.
Thanks Samur,

I realised what was happening but didn't have time to reply
yet.  I'll 
include your patch in the ActiveRDF source.

  -eyal
_______________________________________________
ActiveRDF mailing list
ActiveRDFlists.deri.org
http
://lists.deri.org/mailman/listinfo/activerdf

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )