Commit 56675e9e authored by Ivan Tyagov's avatar Ivan Tyagov

Clean up iterate script implementation. No need of own array property type...

Clean up iterate script implementation. No need of own array property type when we can use more generic object.
parent d1ab322d
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/array</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>array</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value> <string>Array</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>array</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -27,7 +27,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/data</string>
<string>elementary_type/object</string>
</tuple>
</value>
</item>
......
......@@ -55,7 +55,7 @@
"""\n
Simply a wrapper to real method.\n
"""\n
data_stream = context.restrictedTraverse(data_stream_relative_url)\n
data_stream = context\n
total_stream_length = data_stream.getSize()\n
\n
if start > total_stream_length:\n
......@@ -88,7 +88,6 @@ if end > total_stream_length:\n
\n
# some bytes left ...\n
data_stream.activate().DataStream_readChunkListAndTransform( \\\n
data_stream.getRelativeUrl(), \\\n
start, \\\n
end, \\\n
chunk_length, \\\n
......@@ -100,7 +99,7 @@ data_stream.activate().DataStream_readChunkListAndTransform( \\\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>data_stream_relative_url, start, end, chunk_length, transform_script_id=None, data_array_reference=None</string> </value>
<value> <string>start, end, chunk_length, transform_script_id=None, data_array_reference=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -62,7 +62,6 @@ data_length = context.getSize()\n
start = 0\n
end = chunk_length\n
context.activate().DataStream_readChunkListAndTransform( \\\n
context.getRelativeUrl(), \\\n
start, \\\n
end, \\\n
chunk_length, \\\n
......
......@@ -81,7 +81,7 @@ if data_chunk is not None and reference is not None:\n
\n
#context.log(data_supply)\n
# we can have multiple lines for each sensor and we filter out by reference\n
# XXX: in future we will use Predicates to find already generate \n
# XXX: in future we will use Predicates to find already generated\n
# Data Ingestion (Movements)\n
if data_supply is not None:\n
for data_supply_line in data_supply.objectValues():\n
......@@ -112,8 +112,8 @@ if data_chunk is not None and reference is not None:\n
# each chunk of data by default should be added with a new line character\n
data = \'\\n%s\' %data\n
data_stream.appendData(data)\n
context.log("Appended %s bytes to %s (%s, %s, %s)" \n
%(len(data), reference, data_supply, sensor, data_stream))\n
#context.log("Appended %s bytes to %s (%s, %s, %s)" \n
# %(len(data), reference, data_supply, sensor, data_stream))\n
# XXX: open question -> we do not store the act of ingestion.\n
# one way is to have a business process for who\'s "ingestion" \n
# trade_phase / state we generate simulation movements and respective \n
......
portal_categories/elementary_type/array
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment