summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2013-05-29 15:10:46 +0200
committerChristoph Helma <helma@in-silico.ch>2013-05-29 15:10:46 +0200
commit0f770837cbfe17fe17fc86aa0d360c55e281c7f7 (patch)
treed71006cdc12cd30c86d3aae2f5426021c5d05b53
parent5430c1f53f544d61a24236ed5c78c5972f102405 (diff)
modification date inserted at client to improve performance
-rw-r--r--lib/compound.rb2
-rw-r--r--lib/opentox.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/compound.rb b/lib/compound.rb
index 5d77dec..2bef69e 100644
--- a/lib/compound.rb
+++ b/lib/compound.rb
@@ -183,7 +183,6 @@ module OpenTox
obconversion.write_string(obmol)
end
end
-=end
@@ -221,6 +220,7 @@ module OpenTox
def match(smarts_array)
match_hits(smarts_array,false)
end
+=end
end
end
diff --git a/lib/opentox.rb b/lib/opentox.rb
index 78a6923..04edd0c 100644
--- a/lib/opentox.rb
+++ b/lib/opentox.rb
@@ -108,6 +108,8 @@ module OpenTox
# Save object at webservice (replace or create object)
def put wait=true, mime_type="text/plain"
bad_request_error "Mime type #{mime_type} is not supported. Please use 'text/plain' (default) or 'application/rdf+xml'." unless mime_type == "text/plain" or mime_type == "application/rdf+xml"
+ @metadata[RDF::OT.created_at] = DateTime.now unless URI.accessible? @uri, @subjectid
+ @metadata[RDF::DC.modified] = DateTime.now
case mime_type
when 'text/plain'
body = self.to_ntriples