# Class R.E.EnvelopeCustomDataflows:

Part of Reportek.EnvelopeCustomDataflows View In Hierarchy

Known subclasses: Reportek.Envelope.Envelope

This class which Envelope subclasses from contains functions specific to one or more dataflows.

Line # | Kind | Name | Docs
--- | --- | --- | ---
70 | Method | getReferencedFiles | Returns the Report Document objects which are referenced in an XML file
97 | Method | getBaseDocumentsCounts | returns the count of each type of document
123 | Method | testAssociatedESRI | Undocumented
138 | Method | getBaseDocuments | returns the 'p_type' documents batched and filtered by 'query'
196 | Method | validParams | Validate sort parameters
208 | Method | valideObjectProperty | Check if a string is a valid sortable property
213 | Method | envelope_zip_draft | Go through the envelope and find all the external documents
266 | Method | getDocumentsByType | Undocumented
282 | Method | generateFileName | Undocumented
293 | Method | getGmlFileAssocFactsheet | Undocumented
300 | Method | generateGmlFileTitle | Undocumented
315 | Method | testExistingFile | Undocumented
320 | Method | createEmptyGmlFile | Undocumented
340 | Method | create_empty_gml_file | Undocumented
356 | Method | uploadESRIFiles | Undocumented
370 | Method | upload_esri_files | Undocumented
395 | Method | uploadGMLFile | Undocumented
409 | Method | upload_gml_file | Undocumented
453 | Method | add_zip_file | Undocumented
462 | Method | getHabitatInfo | Undocumented
471 | Method | getSpeciesInfo | Undocumented
481 | Method | getMapTypes | Undocumented
486 | Method | test_valid_map_name | Undocumented
494 | Method | testValidMapName | Undocumented
540 | Method | processZipNamelist | Undocumented
626 | Method | processZipFile | Undocumented
803 | Method | add_art17_file | Undocumented
812 | Method | zip_to_xml_esri | Undocumented
851 | Method | test_filename_species | Undocumented
869 | Method | process_xml_file | Undocumented
911 | Method | add_xml_file | Undocumented
924 | Method | process_other_file | Undocumented
941 | Method | add_other_file | Undocumented
951 | Method | complete_task | Undocumented
962 | Method | convert_esri_to_xml | Undocumented
1038 | Method | convert_ESRI2XML | Undocumented
1063 | Method | convert_excel_rivers | Undocumented
1067 | Method | _extract_xml_schema | Undocumented
1086 | Method | _get_xml_files_by_schema | Undocumented
1091 | Method | convert_xml_rivers | Undocumented
1134 | Method | convert_data_rivers | Undocumented
1153 | Method | fetchXMLFileGW | Grabs one XML file from a fixed location and uploads it as Report Document
1185 | Method | uploadGISfiles | Undocumented
1217 | Method | uploadGISZIPfiles | Undocumented
1284 | Method | upload_MO_delivery | Takes a file as input and converts it using a conversion function
1388 | Method | convert_delivery2XML | Calls a conversion function from the conversion service via XML-RPC

def getReferencedFiles(self, p_document):
Returns the Report Document objects which are referenced in an XML file In the future, parse XML and get referenced file ids Now just check for id patterns

def getBaseDocumentsCounts(self):
returns the count of each type of document

def testAssociatedESRI(self, file_id):
Undocumented
def getBaseDocuments(self, p_type, start, skey, rkey, query, prefix=''):
returns the 'p_type' documents batched and filtered by 'query'

def validParams(self, sortby, how):
Validate sort parameters

def valideObjectProperty(self, param):
Check if a string is a valid sortable property

def envelope_zip_draft(self, REQUEST, RESPONSE):

Go through the envelope and find all the external documents then zip them and send the result to the user

fixme: It is not impossible that the client only wants part of the zipfile, as in index_html of Document.py due to the partial requests that can be made with HTTP

def getDocumentsByType(self, doc_type):
Undocumented
def generateFileName(self, category, filetype, identifier):
Undocumented
def getGmlFileAssocFactsheet(self, filename):
Undocumented
def generateGmlFileTitle(self, filename):
Undocumented
def testExistingFile(self, filename):
Undocumented
def createEmptyGmlFile(self, filetype='', identifier='', add_target='', add_type='', confirmed=0, REQUEST=None):
Undocumented
def create_empty_gml_file(self, file_id, REQUEST=None):
Undocumented
def uploadESRIFiles(self, filetype='', identifier='', add_target='', add_type='', confirmed=0, REQUEST=None):
Undocumented
def upload_esri_files(self, file_id, shx_file, shp_file, dbf_file, meta_file, prj_file, REQUEST=None):
Undocumented
def uploadGMLFile(self, filetype='', identifier='', add_target='', add_type='', confirmed=0, REQUEST=None):
Undocumented
def upload_gml_file(self, file_id, file, REQUEST=None):
Undocumented
def add_zip_file(self, REQUEST=None):
Undocumented
def getHabitatInfo(self):
Undocumented
def getSpeciesInfo(self):
Undocumented
def getMapTypes(self):
Undocumented
def test_valid_map_name(self, name, namelist, zip_search):
Undocumented
def testValidMapName(self, filename, namelist, zip_search=1):
Undocumented
def processZipNamelist(self, namelist):
Undocumented
def processZipFile(self, file, overwrite):
Undocumented
def add_art17_file(self, file_id, file_title, file_content):
Undocumented
def zip_to_xml_esri(self, base_name, shx_file, shp_file, dbf_file, xml_file, prj_file):
Undocumented
def test_filename_species(self, filename):
Undocumented
def process_xml_file(self, file_name, file_content, overwrite):
Undocumented
def add_xml_file(self, file, overwrite='', REQUEST=None):
Undocumented
def process_other_file(self, id='', title='', file='', restricted=''):
Undocumented
def add_other_file(self, id='', title='', file='', restricted='', REQUEST=None):
Undocumented
def complete_task(self, workitem_id, REQUEST=None):
Undocumented
def convert_esri_to_xml(self, file_id, shx_file, shp_file, dbf_file, xml_file, prj_file):
Undocumented
def convert_ESRI2XML(self, file_id, shx_file, shp_file, dbf_file, meta_file, prj_file, REQUEST=None):
Undocumented
def convert_excel_rivers(self, file=None, restricted='', REQUEST=None):
Undocumented
def _extract_xml_schema(self, p_content):
Undocumented
def _get_xml_files_by_schema(self, schema):
Undocumented
def convert_xml_rivers(self, file=None, restricted='', REQUEST=None):
Undocumented
def convert_data_rivers(self, file=None, restricted='', REQUEST=None):
Undocumented
def fetchXMLFileGW(self, REQUEST=None):
Grabs one XML file from a fixed location and uploads it as Report Document

def uploadGISfiles(self, file_shp=None, file_shx=None, file_prj=None, file_dbf=None, file_metainfo=None, REQUEST=None):
Undocumented
def uploadGISZIPfiles(self, file_gis_zip=None, REQUEST=None):
Undocumented
def upload_MO_delivery(self, file, restricted='', REQUEST=None):

Takes a file as input and converts it using a conversion function called via XML/RPC if the file is .XLS or .ODT. Uploads both the converted XML file and original file in the envelope If the file has a wrong format or is not .XLS or .ODT, just upload it in the envelope

If no REQUEST is given, returns 1 if the conversion succeeded 0 if the conversion did not succeed and the original file was uploaded -1 if no upload has been done

def convert_delivery2XML(self, file, sheet_name='', restricted='', original_format='xls', where_to='', REQUEST=None):

Calls a conversion function from the conversion service via XML-RPC It converts an Excel or Access file into a number of XML files and uploads both the original file and the converted XMLs in the envelope

If the where_to parameter is given, redirects to it