Exemplo n.º 1
0
 def __init__(self):
     """ vtkBaseModule() -> vtkBaseModule
     Instantiate an emptt VTK Module with real VTK instance
     
     """
     Module.__init__(self)
     self.vtkInstance = None
 def __init__(self):
     """ SheetReference() -> SheetReference
     Instantiate an empty SheetReference
     
     """
     Module.__init__(self)
     self.sheetReference = None
Exemplo n.º 3
0
 def __init__(self):
     Module.__init__(self)
     self.array = None
     self.names = {}
     self.general_name = None
     self.domain = ''
     self.range = ''
Exemplo n.º 4
0
 def __init__(self):
     """ vtkBaseModule() -> vtkBaseModule
     Instantiate an emptt VTK Module with real VTK instance
     
     """
     Module.__init__(self)
     self.vtkInstance = None
Exemplo n.º 5
0
 def __init__(self):
     """ SpreadsheetCell() -> SpreadsheetCell
     Initialize attributes
     
     """
     Module.__init__(self)
     self.location = None
Exemplo n.º 6
0
 def __init__(self):
     """ MplFigureManager() -> MplFigureManager
     Init the class as a storage structure
     
     """
     Module.__init__(self)
     self.figManager = None
Exemplo n.º 7
0
 def __init__(self):
     """ SheetReference() -> SheetReference
     Instantiate an empty SheetReference
     
     """
     Module.__init__(self)
     self.sheetReference = None
Exemplo n.º 8
0
 def __init__(self):
     Module.__init__(self)
     self.array = None
     self.names = {}
     self.general_name = None
     self.domain = ''
     self.range = ''
 def __init__(self):
     """ SpreadsheetCell() -> SpreadsheetCell
     Initialize attributes
     
     """
     Module.__init__(self)
     self.location = None
Exemplo n.º 10
0
 def __init__(self):
     """ MplFigureManager() -> MplFigureManager
     Init the class as a storage structure
     
     """
     Module.__init__(self)
     self.figManager = None
Exemplo n.º 11
0
    def updateUpstream(self, is_input=None, path_type=None):
        global local_db, db_access

        if is_input is None:
            if not self.hasInputFromPort('value'):
                is_input = True
            else:
                # FIXME: check if the signature is the signature of
                # the value if so we know that it's an input...
                is_input = False

        self.persistent_ref = None
        self.persistent_path = None
        if not is_input:
            # can check updateUpstream
            if not hasattr(self, 'signature'):
                raise ModuleError(self, 'Module has no signature')
            if not self.hasInputFromPort('ref'):
                # create new reference with no name or tags
                ref = PersistentRef()
                ref.signature = self.signature
                debug_print('searching for signature', self.signature)
                sig_ref = db_access.search_by_signature(self.signature)
                debug_print('sig_ref:', sig_ref)
                if sig_ref:
                    debug_print('setting persistent_ref')
                    ref.id, ref.version, ref.name = sig_ref
                    self.persistent_ref = ref
                    #             else:
                    #                 ref.id = uuid.uuid1()
            else:
                # update single port
                self.updateUpstreamPort('ref')
                ref = self.getInputFromPort('ref')
                if db_access.ref_exists(ref.id, ref.version):
                    if ref.version is None:
                        ref.version = self.git_get_latest_version(ref.id)
                    signature = db_access.get_signature(ref.id, ref.version)
                    if signature == self.signature:
                        # don't need to create a new version
                        self.persistent_ref = ref

                # copy as normal
                # don't copy if equal

            # FIXME also need to check that the file actually exists here!
            if self.persistent_ref is not None:
                _, suffix = os.path.splitext(self.persistent_ref.name)
                self.persistent_path = \
                    self.git_get_path(self.persistent_ref.id,
                                      self.persistent_ref.version,
                                      out_suffix=suffix)
                debug_print("FOUND persistent path")
                debug_print(self.persistent_path)
                debug_print(self.persistent_ref.local_path)

        if self.persistent_ref is None or self.persistent_path is None:
            debug_print("NOT FOUND persistent path")
            Module.updateUpstream(self)
Exemplo n.º 12
0
    def updateUpstream(self, is_input=None, path_type=None):
        global local_db, db_access

        if is_input is None:
            if not self.hasInputFromPort('value'):
                is_input = True
            else:
                # FIXME: check if the signature is the signature of
                # the value if so we know that it's an input...
                is_input = False

        self.persistent_ref = None
        self.persistent_path = None
        if not is_input:
            # can check updateUpstream
            if not hasattr(self, 'signature'):
                raise ModuleError(self, 'Module has no signature')
            if not self.hasInputFromPort('ref'):
                # create new reference with no name or tags
                ref = PersistentRef()
                ref.signature = self.signature
                debug_print('searching for signature', self.signature)
                sig_ref = db_access.search_by_signature(self.signature)
                debug_print('sig_ref:', sig_ref)
                if sig_ref:
                    debug_print('setting persistent_ref')
                    ref.id, ref.version, ref.name = sig_ref
                    self.persistent_ref = ref
                    #             else:
                    #                 ref.id = uuid.uuid1()
            else:
                # update single port
                self.updateUpstreamPort('ref')
                ref = self.getInputFromPort('ref')
                if db_access.ref_exists(ref.id, ref.version):
                    if ref.version is None:
                        ref.version = self.git_get_latest_version(ref.id)
                    signature = db_access.get_signature(ref.id, ref.version)
                    if signature == self.signature:
                        # don't need to create a new version
                        self.persistent_ref = ref

                # copy as normal
                # don't copy if equal

            # FIXME also need to check that the file actually exists here!
            if self.persistent_ref is not None:
                _, suffix = os.path.splitext(self.persistent_ref.name)
                self.persistent_path = \
                    self.git_get_path(self.persistent_ref.id, 
                                      self.persistent_ref.version,
                                      out_suffix=suffix)
                debug_print("FOUND persistent path")
                debug_print(self.persistent_path)
                debug_print(self.persistent_ref.local_path)

        if self.persistent_ref is None or self.persistent_path is None:
            debug_print("NOT FOUND persistent path")
            Module.updateUpstream(self)
Exemplo n.º 13
0
 def update(self):
     """ update() -> None        
     Interfere into the update process to set the appropriate
     figure command before going upstream to the MplPlot
     
     """
     pylab.figure()
     Module.update(self)
Exemplo n.º 14
0
 def update(self):
     """ update() -> None        
     Interfere into the update process to set the appropriate
     figure command before going upstream to the MplPlot
     
     """
     pylab.figure()
     Module.update(self)
Exemplo n.º 15
0
 def __init__(self):
     """ SubModule() -> SubModule
     Create an inspector for pipeline
     
     """
     NotCacheable.__init__(self)
     Module.__init__(self)
     self.inspector = PipelineInspector()
Exemplo n.º 16
0
 def __init__(self):
     Module.__init__(self)
     self.locator = None
     self.version = -1
     self.pipeline = None
     self.execute = False
     self.embedWorkflow = False
     self.showSpreadsheetOnly = False
     self.forceDB = False
Exemplo n.º 17
0
 def __init__(self):
     Module.__init__(self)
     self.locator = None
     self.version = -1
     self.pipeline = None
     self.execute = False
     self.embedWorkflow = False
     self.showSpreadsheetOnly = False
     self.forceDB = False
Exemplo n.º 18
0
 def __init__(self, filename=None, url=None, source=None, name=None, 
              load=False):
     Module.__init__(self)
     self.filename = filename
     self.url = url
     self.source = source
     self.name = name
     self.load = load
     self.file = self.filename
     self.relativizePaths()
Exemplo n.º 19
0
 def clear(self):
     """ clear() -> None
     Remove event handler so the object can be freed correctly
     
     """
     # Remove all observers
     if self.observer:
         for e in vtkInteractionHandler.vtkEvents:
             self.observer.vtkInstance.RemoveObservers(e)
     Module.clear(self)
Exemplo n.º 20
0
 def clear(self):
     """ clear() -> None
     Remove event handler so the object can be freed correctly
     
     """
     # Remove all observers
     if self.observer:
         for e in vtkInteractionHandler.vtkEvents:
             self.observer.vtkInstance.RemoveObservers(e)
     Module.clear(self)
 def __init__(self):
     """ CellLocation() -> CellLocation
     Instantiate an empty cell location, i.e. any available cell
     
     """
     Module.__init__(self)
     self.row = -1
     self.col = -1
     self.rowSpan = -1
     self.colSpan = -1
     self.sheetReference = None
Exemplo n.º 22
0
 def __init__(self):
     """ CellLocation() -> CellLocation
     Instantiate an empty cell location, i.e. any available cell
     
     """
     Module.__init__(self)
     self.row = -1
     self.col = -1
     self.rowSpan = -1
     self.colSpan = -1
     self.sheetReference = None
Exemplo n.º 23
0
 def __init__(self):
     Module.__init__(self)
     
     #       attr1, attr2, attr3, ...
     # lbl1, val11, val12, val13, ...
     # lbl2, val21, val22, val23, ...
     # lbl3, val31, val32, val33, ...
     # ... , ...  , ...  , ...  , ...
     self.values     = None      # numpy.array
     self.ids        = None      # list<int>
     self.labels     = None      # list<string>
     self.attributes = None      # list<string>
Exemplo n.º 24
0
    def __init__(self):
        Module.__init__(self)

        #       attr1, attr2, attr3, ...
        # lbl1, val11, val12, val13, ...
        # lbl2, val21, val22, val23, ...
        # lbl3, val31, val32, val33, ...
        # ... , ...  , ...  , ...  , ...
        self.values = None  # numpy.array
        self.ids = None  # list<int>
        self.labels = None  # list<string>
        self.attributes = None  # list<string>
Exemplo n.º 25
0
 def __init__(self, access_policy=None, replication_policy=None,
              format=None, submitter=None, owner=None, origin_mn=None,
              auth_mn=None, checksum="SHA-1"):
     Module.__init__(self)
     self.access_policy = access_policy
     self.replication_policy = replication_policy
     self.format = format
     self.submitter = submitter
     self.owner = owner
     self.origin_mn = origin_mn
     self.auth_mn = auth_mn
     self.checksum = checksum
Exemplo n.º 26
0
 def __init__(self,
              filename=None,
              url=None,
              source=None,
              name=None,
              load=False):
     Module.__init__(self)
     self.filename = filename
     self.url = url
     self.source = source
     self.name = name
     self.load = load
     self.file = self.filename
     self.relativizePaths()
Exemplo n.º 27
0
 def __init__(self,
              filename=None,
              url=None,
              source=None,
              name=None,
              load=False):
     Module.__init__(self)
     self.filename = filename
     if url is not None and url.startswith("file://") and url.endswith(
             self.filename):
         self.url = None
     else:
         self.url = url
     self.source = source
     self.name = name
     self.load = load
     self.file = self.filename
     self.relativizePaths()
Exemplo n.º 28
0
 def __init__(self):
     Module.__init__(self)
     self.start_time = 0
Exemplo n.º 29
0
 def __init__(self):
     Module.__init__(self)
     self.observer = None
     self.handler = None
     self.shareddata = None
Exemplo n.º 30
0
 def __init__(self):
     Module.__init__(self)
     self.output_ports_order = []
Exemplo n.º 31
0
 def __init__(self):
     Module.__init__(self)
     self.var = None
Exemplo n.º 32
0
 def __init__(self):
     Module.__init__(self)
     self.decimals = 0
Exemplo n.º 33
0
 def __init__(self, file_entry=None):
     Module.__init__(self)
     if file_entry is not None:
         self.file_entry = file_entry
     else:
         self.file_entry = LoadAppLogic.CSVFileEntry()
Exemplo n.º 34
0
 def __init__(self):
     ThreadSafeMixin.__init__(self)
     Module.__init__(self)
Exemplo n.º 35
0
 def __init__( self ):
     Module.__init__(self)
Exemplo n.º 36
0
 def __init__(self):
     Module.__init__(self)
     self.observer = None
     self.handler = None
     self.shareddata = None
Exemplo n.º 37
0
 def __init__(self, lst, klass=None):
     Module.__init__(self)
     self.lst = lst
     self.klass = klass
Exemplo n.º 38
0
 def update(self):
     self.start_time = time()
     Module.update(self)
Exemplo n.º 39
0
 def __init__(self):
     Module.__init__(self)
     self.pvInstance = None
Exemplo n.º 40
0
 def __init__(self):
     Module.__init__(self)
     self.helper = NrrdHelper()
Exemplo n.º 41
0
 def __init__(self):
     Module.__init__(self)
     self._name = ''
     self.options = {}
Exemplo n.º 42
0
 def __init__(self):
     Module.__init__(self)
     self.feature_model = _OgrMemModel()
Exemplo n.º 43
0
 def __init__(self):
     Module.__init__(self)
     print "test"
Exemplo n.º 44
0
 def __init__(self):
     Module.__init__(self)
     self.input_ports_order = []
     self.values = tuple()
Exemplo n.º 45
0
 def __init__(self):
     Module.__init__(self)
     self.axis=None
Exemplo n.º 46
0
 def __init__(self, db_entry=None):
     Module.__init__(self)
     if db_entry is not None:
         self.db_entry = db_entry
     else:
         self.db_entry = LoadAppLogic.DatabaseEntry()
Exemplo n.º 47
0
 def __init__(self):
     Module.__init__(self)
     self.matrix = None
Exemplo n.º 48
0
 def __init__(self):
     Module.__init__(self)
     self.axis = -1
     self.kind = 'quicksort'
     self.order = None
Exemplo n.º 49
0
 def __init__(self):
     Module.__init__(self)
     self.canvas = None
Exemplo n.º 50
0
 def __init__(self):
     Module.__init__(self)
     Feature.__init__(self)
Exemplo n.º 51
0
 def __init__(self):
     Module.__init__(self)
     self.view = None
     self.reader = None;        
     self.cdms_variables = None;
     self.project_sphere = None;
Exemplo n.º 52
0
 def __init__(self):
     Module.__init__(self)
     self.renderType = "Pseudocolor Plot"