diff options
Diffstat (limited to 'lib/serializer.rb')
-rw-r--r-- | lib/serializer.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/serializer.rb b/lib/serializer.rb index 9b3af39..495702a 100644 --- a/lib/serializer.rb +++ b/lib/serializer.rb @@ -40,11 +40,13 @@ module OpenTox DC.contributor => { RDF["type"] => [{ "type" => "uri", "value" => OWL.AnnotationProperty }] } , DC.creator => { RDF["type"] => [{ "type" => "uri", "value" => OWL.AnnotationProperty }] } , DC.description => { RDF["type"] => [{ "type" => "uri", "value" => OWL.AnnotationProperty }] } , + DC.date => { RDF["type"] => [{ "type" => "uri", "value" => OWL.AnnotationProperty }] } , OT.isA => { RDF["type"] => [{ "type" => "uri", "value" => OWL.AnnotationProperty }] } , OT.Warnings => { RDF["type"] => [{ "type" => "uri", "value" => OWL.AnnotationProperty }] } , XSD.anyURI => { RDF["type"] => [{ "type" => "uri", "value" => OWL.AnnotationProperty }] } , OT.hasStatus => { RDF["type"] => [{ "type" => "uri", "value" => OWL.AnnotationProperty }] } , OT.resultURI => { RDF["type"] => [{ "type" => "uri", "value" => OWL.AnnotationProperty }] } , + OT.percentageCompleted => { RDF["type"] => [{ "type" => "uri", "value" => OWL.AnnotationProperty }] } , OT.hasSource => { RDF["type"] => [{ "type" => "uri", "value" => OWL.DatatypeProperty }] } , OT.value => { RDF["type"] => [{ "type" => "uri", "value" => OWL.DatatypeProperty }] } , @@ -125,10 +127,7 @@ module OpenTox def add_metadata(uri,metadata) id = 0 metadata.each do |u,v| - if v.is_a? String - @object[uri] = {} unless @object[uri] - @object[uri][u] = [{"type" => type(v), "value" => v }] - elsif v.is_a? Array and u == OT.parameters + if v.is_a? Array and u == OT.parameters @object[uri][u] = [] unless @object[uri][u] v.each do |value| id+=1 @@ -139,6 +138,9 @@ module OpenTox @object[genid][name] = [{"type" => type(entry), "value" => entry }] end end + else # v.is_a? String + @object[uri] = {} unless @object[uri] + @object[uri][u] = [{"type" => type(v), "value" => v }] end end end |