comparison neo4j.py @ 5:7f262236d352 draft

planemo upload for repository https://github.com/SANBI-SA/tools-sanbi-uwc/tree/master/datatypes/neo4j_datatypes commit ebd884bad7609048e02d1ef04985cf812ab142a3
author sanbi-uwc
date Wed, 18 May 2016 06:38:16 -0400
parents 4b1d16644ec2
children 643e3ebaa907
comparison
equal deleted inserted replaced
4:4b1d16644ec2 5:7f262236d352
1 """ 1 """
2 Neo4j Composite Dataset 2 Neo4j Composite Dataset
3 """ 3 """
4 import logging 4 import logging
5 import os
6 import sys 5 import sys
7 6
8 from galaxy.datatypes.images import Html
9 from galaxy.datatypes.metadata import MetadataElement
10 from galaxy.datatypes.data import get_file_peek
11 from galaxy.datatypes.data import Data, Text 7 from galaxy.datatypes.data import Data, Text
12 8
13 gal_Log = logging.getLogger(__name__) 9 gal_Log = logging.getLogger(__name__)
14 verbose = True 10 verbose = True
11
15 12
16 class Neo4j(object): 13 class Neo4j(object):
17 """ 14 """
18 base class to use for neostore datatypes 15 base class to use for neostore datatypes
19 derived from html - composite datatype elements 16 derived from html - composite datatype elements
20 stored in extra files path 17 stored in extra files path
21 """ 18 """
19 file_ext = 'neo4j'
20
22 def get_mime(self): 21 def get_mime(self):
23 """Returns the mime type of the datatype""" 22 """Returns the mime type of the datatype"""
24 return 'text/html' 23 return 'text/html'
25 24
26 def set_peek(self, dataset, is_multi_byte=False): 25 def set_peek(self, dataset, is_multi_byte=False):
88 self.add_composite_file('neostore.propertystore.db', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True) 87 self.add_composite_file('neostore.propertystore.db', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True)
89 self.add_composite_file('neostore.propertystore.db.id', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True) 88 self.add_composite_file('neostore.propertystore.db.id', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True)
90 self.add_composite_file('neostore.propertystore.db.arrays', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True) 89 self.add_composite_file('neostore.propertystore.db.arrays', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True)
91 self.add_composite_file('neostore.propertystore.db.arrays.id', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True) 90 self.add_composite_file('neostore.propertystore.db.arrays.id', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True)
92 self.add_composite_file('neostore.propertystore.db.index', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True) 91 self.add_composite_file('neostore.propertystore.db.index', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True)
93 self.add_composite_file('neostore.propertystore.db.index.id',substitute_name_with_metadata='neostore_propertystore_file', is_binary=True) 92 self.add_composite_file('neostore.propertystore.db.index.id', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True)
94 self.add_composite_file('neostore.propertystore.db.index.keys', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True) 93 self.add_composite_file('neostore.propertystore.db.index.keys', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True)
95 self.add_composite_file('neostore.propertystore.db.index.keys.id', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True) 94 self.add_composite_file('neostore.propertystore.db.index.keys.id', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True)
96 self.add_composite_file('neostore.propertystore.db.strings', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True) 95 self.add_composite_file('neostore.propertystore.db.strings', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True)
97 self.add_composite_file('neostore.propertystore.db.strings.id', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True) 96 self.add_composite_file('neostore.propertystore.db.strings.id', substitute_name_with_metadata='neostore_propertystore_file', is_binary=True)
98 97
104 self.add_composite_file('neostore.relationshiptypestore.db.names.id', substitute_name_with_metadata='neostore_relationship_type_file', is_binary=True) 103 self.add_composite_file('neostore.relationshiptypestore.db.names.id', substitute_name_with_metadata='neostore_relationship_type_file', is_binary=True)
105 self.add_composite_file('neostore.schemastore.db', substitute_name_with_metadata='neostore_schema_store_file', is_binary=True) 104 self.add_composite_file('neostore.schemastore.db', substitute_name_with_metadata='neostore_schema_store_file', is_binary=True)
106 self.add_composite_file('neostore.schemastore.db.id', substitute_name_with_metadata='neostore_schema_store_file', is_binary=True) 105 self.add_composite_file('neostore.schemastore.db.id', substitute_name_with_metadata='neostore_schema_store_file', is_binary=True)
107 self.add_composite_file('neostore.transaction.db.0', substitute_name_with_metadata='neostore_count_file', is_binary=True) 106 self.add_composite_file('neostore.transaction.db.0', substitute_name_with_metadata='neostore_count_file', is_binary=True)
108 107
108
109 if __name__ == '__main__': 109 if __name__ == '__main__':
110 import doctest 110 import doctest
111
111 doctest.testmod(sys.modules[__name__]) 112 doctest.testmod(sys.modules[__name__])