Esempio n. 1
0
 def create_object(self, guid: str):
     """
     Creates a new object of the type associated with guid
     """
     if guid == '00000000-0000-0000-0000-000000000000':
         return None
     if guid in self.NOT_IMPLEMENTED_GUIDS:
         raise NotImplementedException('{} are not implemented yet'.format(
             self.NOT_IMPLEMENTED_GUIDS[guid]))
     elif guid not in self.objects:
         raise UnknownGuidException('Unknown GUID: {}'.format(guid))
     return self.objects[guid]()
Esempio n. 2
0
 def convert_symbol(self, symbol: Symbol):
     """
     Converts a symbol.
     :param symbol: symbol to convert
     """
     if issubclass(symbol.__class__, (FillSymbolLayer, FillSymbol)):
         self.convert_fill_symbol(symbol)
     elif issubclass(symbol.__class__, (LineSymbolLayer, LineSymbol)):
         self.convert_line_symbol(symbol)
     elif issubclass(symbol.__class__, (MarkerSymbolLayer, MarkerSymbol)):
         self.convert_marker_symbol(symbol)
     else:
         raise NotImplementedException(str(symbol.__class__))
Esempio n. 3
0
 def convert_marker_symbol(self, symbol: Union[SymbolLayer, MarkerSymbol]):  # pylint: disable=unused-argument
     """
     Converts a MarkerSymbol
     """
     raise NotImplementedException(
         'Marker symbol conversion not implemented')
Esempio n. 4
0
 def convert_line_symbol(self, symbol: Union[SymbolLayer, LineSymbol]):  # pylint: disable=unused-argument
     """
     Converts a LineSymbol
     """
     raise NotImplementedException('Line symbol conversion not implemented')
Esempio n. 5
0
 def convert_fill_symbol(self, symbol: Union[SymbolLayer, FillSymbol]):  # pylint: disable=unused-argument
     """
     Converts a FillSymbol
     """
     raise NotImplementedException('Fill symbol conversion not implemented')
Esempio n. 6
0
 def convert_color_ramp(self, ramp: ColorRamp):  # pylint: disable=unused-argument
     """
     Converts a color ramp
     """
     raise NotImplementedException('Color ramp conversion not implemented')